ARM: msm: move platform_data definitions
authorArnd Bergmann <arnd@arndb.de>
Fri, 24 Aug 2012 13:14:41 +0000 (15:14 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 14 Sep 2012 09:17:35 +0000 (11:17 +0200)
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the msm include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: Chris Ball <cjb@laptop.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-arm-msm@vger.kernel.org
20 files changed:
arch/arm/mach-msm/board-qsd8x50.c
arch/arm/mach-msm/board-trout-mmc.c
arch/arm/mach-msm/board-trout-panel.c
arch/arm/mach-msm/devices-msm7x00.c
arch/arm/mach-msm/devices-msm7x30.c
arch/arm/mach-msm/devices-qsd8x50.c
arch/arm/mach-msm/include/mach/board.h
arch/arm/mach-msm/include/mach/mmc.h [deleted file]
arch/arm/mach-msm/include/mach/msm_fb.h [deleted file]
drivers/mmc/host/msm_sdcc.c
drivers/video/msm/mddi.c
drivers/video/msm/mddi_client_dummy.c
drivers/video/msm/mddi_client_nt35399.c
drivers/video/msm/mddi_client_toshiba.c
drivers/video/msm/mdp.c
drivers/video/msm/mdp_hw.h
drivers/video/msm/mdp_ppp.c
drivers/video/msm/msm_fb.c
include/linux/platform_data/mmc-msm_sdcc.h [new file with mode: 0644]
include/linux/platform_data/video-msm_fb.h [new file with mode: 0644]

index c8fe0edb9761961f877378601dad5c3c0a810be4..b21bb4cfc642e00f1528bc83bc96ee17487a633d 100644 (file)
@@ -32,7 +32,7 @@
 #include <mach/irqs.h>
 #include <mach/sirc.h>
 #include <mach/vreg.h>
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 
 #include "devices.h"
 
index 8650342b7493e00e4828ffd1bf057c81979efee3..3723e55819d603a3279791fbc6200ba617a13d1a 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <mach/vreg.h>
 
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 
 #include "devices.h"
 
index 89bf6b426699863d8230d9fcdf2b9d66bfa3cdc3..f9a5db6d2ced5cd7f1fa68f9d31ac03472045050 100644 (file)
@@ -14,7 +14,7 @@
 #include <asm/mach-types.h>
 #include <asm/system_info.h>
 
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 #include <mach/vreg.h>
 
 #include "board-trout.h"
index 993780f490ada952cf54f80aa184c7ed53c68985..f66ee6ea8720e9799763767e900b1dea3bfea62c 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "clock.h"
 #include "clock-pcom.h"
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 
 static struct resource resources_uart1[] = {
        {
index 09b4f14038246f6004aa4e9ef5d2721baba285c8..e90ab5938c5fec8f7aafe62608290bc0707b2f98 100644 (file)
@@ -31,7 +31,7 @@
 #include "clock-pcom.h"
 #include "clock-7x30.h"
 
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 
 static struct resource resources_uart2[] = {
        {
index 131633b12a34d7c52395fb01683aeb13abf5e35f..4db61d5fe317d8eda7329b07edb022c357f8ee61 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <asm/mach/flash.h>
 
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 #include "clock-pcom.h"
 
 static struct resource resources_uart3[] = {
index 435f8edfafd1bb78855a5ba8ece372935e78f481..70e0f98ecdb9e374b9c29e5b69d0d1ac87d5e2cc 100644 (file)
@@ -18,7 +18,7 @@
 #define __ASM_ARCH_MSM_BOARD_H
 
 #include <linux/types.h>
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 
 /* platform device data structures */
 
diff --git a/arch/arm/mach-msm/include/mach/mmc.h b/arch/arm/mach-msm/include/mach/mmc.h
deleted file mode 100644 (file)
index ffcd9e3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  arch/arm/include/asm/mach/mmc.h
- */
-#ifndef ASMARM_MACH_MMC_H
-#define ASMARM_MACH_MMC_H
-
-#include <linux/mmc/host.h>
-#include <linux/mmc/card.h>
-#include <linux/mmc/sdio_func.h>
-
-struct msm_mmc_gpio {
-       unsigned no;
-       const char *name;
-};
-
-struct msm_mmc_gpio_data {
-       struct msm_mmc_gpio *gpio;
-       u8 size;
-};
-
-struct msm_mmc_platform_data {
-       unsigned int ocr_mask;                  /* available voltages */
-       u32 (*translate_vdd)(struct device *, unsigned int);
-       unsigned int (*status)(struct device *);
-       int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
-       struct msm_mmc_gpio_data *gpio_data;
-       void (*init_card)(struct mmc_card *card);
-};
-
-#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_fb.h b/arch/arm/mach-msm/include/mach/msm_fb.h
deleted file mode 100644 (file)
index 1f4fc81..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/* arch/arm/mach-msm/include/mach/msm_fb.h
- *
- * Internal shared definitions for various MSM framebuffer parts.
- *
- * Copyright (C) 2007 Google Incorporated
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef _MSM_FB_H_
-#define _MSM_FB_H_
-
-#include <linux/device.h>
-
-struct mddi_info;
-
-struct msm_fb_data {
-       int xres;       /* x resolution in pixels */
-       int yres;       /* y resolution in pixels */
-       int width;      /* disply width in mm */
-       int height;     /* display height in mm */
-       unsigned output_format;
-};
-
-struct msmfb_callback {
-       void (*func)(struct msmfb_callback *);
-};
-
-enum {
-       MSM_MDDI_PMDH_INTERFACE,
-       MSM_MDDI_EMDH_INTERFACE,
-       MSM_EBI2_INTERFACE,
-};
-
-#define MSMFB_CAP_PARTIAL_UPDATES      (1 << 0)
-
-struct msm_panel_data {
-       /* turns off the fb memory */
-       int (*suspend)(struct msm_panel_data *);
-       /* turns on the fb memory */
-       int (*resume)(struct msm_panel_data *);
-       /* turns off the panel */
-       int (*blank)(struct msm_panel_data *);
-       /* turns on the panel */
-       int (*unblank)(struct msm_panel_data *);
-       void (*wait_vsync)(struct msm_panel_data *);
-       void (*request_vsync)(struct msm_panel_data *, struct msmfb_callback *);
-       void (*clear_vsync)(struct msm_panel_data *);
-       /* from the enum above */
-       unsigned interface_type;
-       /* data to be passed to the fb driver */
-       struct msm_fb_data *fb_data;
-
-       /* capabilities supported by the panel */
-       uint32_t caps;
-};
-
-struct msm_mddi_client_data {
-       void (*suspend)(struct msm_mddi_client_data *);
-       void (*resume)(struct msm_mddi_client_data *);
-       void (*activate_link)(struct msm_mddi_client_data *);
-       void (*remote_write)(struct msm_mddi_client_data *, uint32_t val,
-                            uint32_t reg);
-       uint32_t (*remote_read)(struct msm_mddi_client_data *, uint32_t reg);
-       void (*auto_hibernate)(struct msm_mddi_client_data *, int);
-       /* custom data that needs to be passed from the board file to a 
-        * particular client */
-       void *private_client_data;
-       struct resource *fb_resource;
-       /* from the list above */
-       unsigned interface_type;
-};
-
-struct msm_mddi_platform_data {
-       unsigned int clk_rate;
-       void (*power_client)(struct msm_mddi_client_data *, int on);
-
-       /* fixup the mfr name, product id */
-       void (*fixup)(uint16_t *mfr_name, uint16_t *product_id);
-
-       struct resource *fb_resource; /*optional*/
-       /* number of clients in the list that follows */
-       int num_clients;
-       /* array of client information of clients */
-       struct {
-               unsigned product_id; /* mfr id in top 16 bits, product id
-                                     * in lower 16 bits
-                                     */
-               char *name;     /* the device name will be the platform
-                                * device name registered for the client,
-                                * it should match the name of the associated
-                                * driver
-                                */
-               unsigned id;    /* id for mddi client device node, will also
-                                * be used as device id of panel devices, if
-                                * the client device will have multiple panels
-                                * space must be left here for them
-                                */
-               void *client_data;      /* required private client data */
-               unsigned int clk_rate;  /* optional: if the client requires a
-                                       * different mddi clk rate
-                                       */
-       } client_platform_data[];
-};
-
-struct mdp_blit_req;
-struct fb_info;
-struct mdp_device {
-       struct device dev;
-       void (*dma)(struct mdp_device *mpd, uint32_t addr,
-                   uint32_t stride, uint32_t w, uint32_t h, uint32_t x,
-                   uint32_t y, struct msmfb_callback *callback, int interface);
-       void (*dma_wait)(struct mdp_device *mdp);
-       int (*blit)(struct mdp_device *mdp, struct fb_info *fb,
-                   struct mdp_blit_req *req);
-       void (*set_grp_disp)(struct mdp_device *mdp, uint32_t disp_id);
-};
-
-struct class_interface;
-int register_mdp_client(struct class_interface *class_intf);
-
-/**** private client data structs go below this line ***/
-
-struct msm_mddi_bridge_platform_data {
-       /* from board file */
-       int (*init)(struct msm_mddi_bridge_platform_data *,
-                   struct msm_mddi_client_data *);
-       int (*uninit)(struct msm_mddi_bridge_platform_data *,
-                     struct msm_mddi_client_data *);
-       /* passed to panel for use by the fb driver */
-       int (*blank)(struct msm_mddi_bridge_platform_data *,
-                    struct msm_mddi_client_data *);
-       int (*unblank)(struct msm_mddi_bridge_platform_data *,
-                      struct msm_mddi_client_data *);
-       struct msm_fb_data fb_data;
-};
-
-
-
-#endif
index 1d14cda95e56c8191c2168b26d4e0543eb39ddac..7c0af0e80047af0bc7b25e167f815d0f06d133b3 100644 (file)
@@ -42,7 +42,7 @@
 #include <asm/div64.h>
 #include <asm/sizes.h>
 
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-msm_sdcc.h>
 #include <mach/msm_iomap.h>
 #include <mach/dma.h>
 #include <mach/clk.h>
index b061d709bc44ce78e114908f3e17e2eff54583d4..bf73f048006183da73d75377faddce1d143917d2 100644 (file)
@@ -29,7 +29,7 @@
 #include <mach/msm_iomap.h>
 #include <mach/irqs.h>
 #include <mach/board.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 #include "mddi_hw.h"
 
 #define FLAG_DISABLE_HIBERNATION 0x0001
index d2a091cebe2c31f42edabb2524d7053acc5956e3..f1b0dfcc97172f59de3624a1ce74c48838061dfc 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 
 struct panel_info {
        struct platform_device pdev;
index 7fcd67e132bf19114dff0ad9b05bb007b1ee5efc..d7a5bf84fb2ac07a08eda5957fd179981ed4dca0 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/sched.h>
 #include <linux/gpio.h>
 #include <linux/slab.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 
 static DECLARE_WAIT_QUEUE_HEAD(nt35399_vsync_wait);
 
index 053eb6877330ba5644edb9d82748a99baffe58c3..061d7dfebbf3006a6eb56ba3d652f4b64e5f0c60 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/gpio.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 
 
 #define LCD_CONTROL_BLOCK_BASE 0x110000
index cb2ddf164c98cfb527181d46de66e489102c4a1f..d1f881e8030ed42828c690dcab66fe7bb3f99cb6 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/slab.h>
 
 #include <mach/msm_iomap.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 #include <linux/platform_device.h>
 #include <linux/export.h>
 
index d80477415caaa3bdd401814c511a3359bb98bd97..a0bacf581b32896deb3186168c08808791e733fa 100644 (file)
@@ -16,7 +16,7 @@
 #define _MDP_HW_H_
 
 #include <mach/msm_iomap.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 
 struct mdp_info {
        struct mdp_device mdp_dev;
index 2b6564e8bfeaa37e7f785904af2604ac847b4493..be6079cdfbb6b7bff4da0b4dc4cdb69f52997aa3 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/file.h>
 #include <linux/delay.h>
 #include <linux/msm_mdp.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 
 #include "mdp_hw.h"
 #include "mdp_scale_tables.h"
index c6e3b4fcdd683b52eaebc7da3afd49bd24497590..ec08a9ec377db54cdec5d698ccef859f83bc04e7 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/msm_mdp.h>
 #include <linux/io.h>
 #include <linux/uaccess.h>
-#include <mach/msm_fb.h>
+#include <linux/platform_data/video-msm_fb.h>
 #include <mach/board.h>
 #include <linux/workqueue.h>
 #include <linux/clk.h>
diff --git a/include/linux/platform_data/mmc-msm_sdcc.h b/include/linux/platform_data/mmc-msm_sdcc.h
new file mode 100644 (file)
index 0000000..ffcd9e3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  arch/arm/include/asm/mach/mmc.h
+ */
+#ifndef ASMARM_MACH_MMC_H
+#define ASMARM_MACH_MMC_H
+
+#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
+#include <linux/mmc/sdio_func.h>
+
+struct msm_mmc_gpio {
+       unsigned no;
+       const char *name;
+};
+
+struct msm_mmc_gpio_data {
+       struct msm_mmc_gpio *gpio;
+       u8 size;
+};
+
+struct msm_mmc_platform_data {
+       unsigned int ocr_mask;                  /* available voltages */
+       u32 (*translate_vdd)(struct device *, unsigned int);
+       unsigned int (*status)(struct device *);
+       int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
+       struct msm_mmc_gpio_data *gpio_data;
+       void (*init_card)(struct mmc_card *card);
+};
+
+#endif
diff --git a/include/linux/platform_data/video-msm_fb.h b/include/linux/platform_data/video-msm_fb.h
new file mode 100644 (file)
index 0000000..1f4fc81
--- /dev/null
@@ -0,0 +1,147 @@
+/* arch/arm/mach-msm/include/mach/msm_fb.h
+ *
+ * Internal shared definitions for various MSM framebuffer parts.
+ *
+ * Copyright (C) 2007 Google Incorporated
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _MSM_FB_H_
+#define _MSM_FB_H_
+
+#include <linux/device.h>
+
+struct mddi_info;
+
+struct msm_fb_data {
+       int xres;       /* x resolution in pixels */
+       int yres;       /* y resolution in pixels */
+       int width;      /* disply width in mm */
+       int height;     /* display height in mm */
+       unsigned output_format;
+};
+
+struct msmfb_callback {
+       void (*func)(struct msmfb_callback *);
+};
+
+enum {
+       MSM_MDDI_PMDH_INTERFACE,
+       MSM_MDDI_EMDH_INTERFACE,
+       MSM_EBI2_INTERFACE,
+};
+
+#define MSMFB_CAP_PARTIAL_UPDATES      (1 << 0)
+
+struct msm_panel_data {
+       /* turns off the fb memory */
+       int (*suspend)(struct msm_panel_data *);
+       /* turns on the fb memory */
+       int (*resume)(struct msm_panel_data *);
+       /* turns off the panel */
+       int (*blank)(struct msm_panel_data *);
+       /* turns on the panel */
+       int (*unblank)(struct msm_panel_data *);
+       void (*wait_vsync)(struct msm_panel_data *);
+       void (*request_vsync)(struct msm_panel_data *, struct msmfb_callback *);
+       void (*clear_vsync)(struct msm_panel_data *);
+       /* from the enum above */
+       unsigned interface_type;
+       /* data to be passed to the fb driver */
+       struct msm_fb_data *fb_data;
+
+       /* capabilities supported by the panel */
+       uint32_t caps;
+};
+
+struct msm_mddi_client_data {
+       void (*suspend)(struct msm_mddi_client_data *);
+       void (*resume)(struct msm_mddi_client_data *);
+       void (*activate_link)(struct msm_mddi_client_data *);
+       void (*remote_write)(struct msm_mddi_client_data *, uint32_t val,
+                            uint32_t reg);
+       uint32_t (*remote_read)(struct msm_mddi_client_data *, uint32_t reg);
+       void (*auto_hibernate)(struct msm_mddi_client_data *, int);
+       /* custom data that needs to be passed from the board file to a 
+        * particular client */
+       void *private_client_data;
+       struct resource *fb_resource;
+       /* from the list above */
+       unsigned interface_type;
+};
+
+struct msm_mddi_platform_data {
+       unsigned int clk_rate;
+       void (*power_client)(struct msm_mddi_client_data *, int on);
+
+       /* fixup the mfr name, product id */
+       void (*fixup)(uint16_t *mfr_name, uint16_t *product_id);
+
+       struct resource *fb_resource; /*optional*/
+       /* number of clients in the list that follows */
+       int num_clients;
+       /* array of client information of clients */
+       struct {
+               unsigned product_id; /* mfr id in top 16 bits, product id
+                                     * in lower 16 bits
+                                     */
+               char *name;     /* the device name will be the platform
+                                * device name registered for the client,
+                                * it should match the name of the associated
+                                * driver
+                                */
+               unsigned id;    /* id for mddi client device node, will also
+                                * be used as device id of panel devices, if
+                                * the client device will have multiple panels
+                                * space must be left here for them
+                                */
+               void *client_data;      /* required private client data */
+               unsigned int clk_rate;  /* optional: if the client requires a
+                                       * different mddi clk rate
+                                       */
+       } client_platform_data[];
+};
+
+struct mdp_blit_req;
+struct fb_info;
+struct mdp_device {
+       struct device dev;
+       void (*dma)(struct mdp_device *mpd, uint32_t addr,
+                   uint32_t stride, uint32_t w, uint32_t h, uint32_t x,
+                   uint32_t y, struct msmfb_callback *callback, int interface);
+       void (*dma_wait)(struct mdp_device *mdp);
+       int (*blit)(struct mdp_device *mdp, struct fb_info *fb,
+                   struct mdp_blit_req *req);
+       void (*set_grp_disp)(struct mdp_device *mdp, uint32_t disp_id);
+};
+
+struct class_interface;
+int register_mdp_client(struct class_interface *class_intf);
+
+/**** private client data structs go below this line ***/
+
+struct msm_mddi_bridge_platform_data {
+       /* from board file */
+       int (*init)(struct msm_mddi_bridge_platform_data *,
+                   struct msm_mddi_client_data *);
+       int (*uninit)(struct msm_mddi_bridge_platform_data *,
+                     struct msm_mddi_client_data *);
+       /* passed to panel for use by the fb driver */
+       int (*blank)(struct msm_mddi_bridge_platform_data *,
+                    struct msm_mddi_client_data *);
+       int (*unblank)(struct msm_mddi_bridge_platform_data *,
+                      struct msm_mddi_client_data *);
+       struct msm_fb_data fb_data;
+};
+
+
+
+#endif
This page took 0.038219 seconds and 5 git commands to generate.