ARM: w90x900: move platform_data definitions
authorArnd Bergmann <arnd@arndb.de>
Fri, 24 Aug 2012 13:18:36 +0000 (15:18 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 14 Sep 2012 09:18:59 +0000 (11:18 +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 w90x900 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>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
15 files changed:
arch/arm/mach-w90x900/dev.c
arch/arm/mach-w90x900/include/mach/fb.h [deleted file]
arch/arm/mach-w90x900/include/mach/i2c.h [deleted file]
arch/arm/mach-w90x900/include/mach/nuc900_spi.h [deleted file]
arch/arm/mach-w90x900/include/mach/w90p910_keypad.h [deleted file]
arch/arm/mach-w90x900/mach-nuc950evb.c
drivers/i2c/busses/i2c-nuc900.c
drivers/input/keyboard/w90p910_keypad.c
drivers/spi/spi-nuc900.c
drivers/video/nuc900fb.c
drivers/video/nuc900fb.h
include/linux/platform_data/i2c-nuc900.h [new file with mode: 0644]
include/linux/platform_data/keypad-w90p910.h [new file with mode: 0644]
include/linux/platform_data/spi-nuc900.h [new file with mode: 0644]
include/linux/platform_data/video-nuc900fb.h [new file with mode: 0644]

index 48f5b9fdfb7fe7624c710e0b3e57400edcf1a1cc..7abdb9645c5b37e186939fbb89835bf3832300e1 100644 (file)
 #include <asm/mach-types.h>
 
 #include <mach/regs-serial.h>
-#include <mach/nuc900_spi.h>
+#include <linux/platform_data/spi-nuc900.h>
 #include <mach/map.h>
-#include <mach/fb.h>
+#include <linux/platform_data/video-nuc900fb.h>
 #include <mach/regs-ldm.h>
-#include <mach/w90p910_keypad.h>
+#include <linux/platform_data/keypad-w90p910.h>
 
 #include "cpu.h"
 
diff --git a/arch/arm/mach-w90x900/include/mach/fb.h b/arch/arm/mach-w90x900/include/mach/fb.h
deleted file mode 100644 (file)
index cec5ece..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/* linux/include/asm/arch-nuc900/fb.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Changelog:
- *
- *   2008/08/26     vincen.zswan modify this file for LCD.
- */
-
-#ifndef __ASM_ARM_FB_H
-#define __ASM_ARM_FB_H
-
-
-
-/* LCD Controller Hardware Desc */
-struct nuc900fb_hw {
-       unsigned int lcd_dccs;
-       unsigned int lcd_device_ctrl;
-       unsigned int lcd_mpulcd_cmd;
-       unsigned int lcd_int_cs;
-       unsigned int lcd_crtc_size;
-       unsigned int lcd_crtc_dend;
-       unsigned int lcd_crtc_hr;
-       unsigned int lcd_crtc_hsync;
-       unsigned int lcd_crtc_vr;
-       unsigned int lcd_va_baddr0;
-       unsigned int lcd_va_baddr1;
-       unsigned int lcd_va_fbctrl;
-       unsigned int lcd_va_scale;
-       unsigned int lcd_va_test;
-       unsigned int lcd_va_win;
-       unsigned int lcd_va_stuff;
-};
-
-/* LCD Display Description */
-struct nuc900fb_display {
-       /* LCD Image type */
-       unsigned type;
-
-       /* LCD Screen Size */
-       unsigned short width;
-       unsigned short height;
-
-       /* LCD Screen Info */
-       unsigned short xres;
-       unsigned short yres;
-       unsigned short bpp;
-
-       unsigned long pixclock;
-       unsigned short left_margin;
-       unsigned short right_margin;
-       unsigned short hsync_len;
-       unsigned short upper_margin;
-       unsigned short lower_margin;
-       unsigned short vsync_len;
-
-       /* hardware special register value */
-       unsigned int dccs;
-       unsigned int devctl;
-       unsigned int fbctrl;
-       unsigned int scale;
-};
-
-struct nuc900fb_mach_info {
-       struct nuc900fb_display *displays;
-       unsigned num_displays;
-       unsigned default_display;
-       /* GPIO Setting  Info */
-       unsigned gpio_dir;
-       unsigned gpio_dir_mask;
-       unsigned gpio_data;
-       unsigned gpio_data_mask;
-};
-
-extern void __init nuc900_fb_set_platdata(struct nuc900fb_mach_info *);
-
-#endif /* __ASM_ARM_FB_H */
diff --git a/arch/arm/mach-w90x900/include/mach/i2c.h b/arch/arm/mach-w90x900/include/mach/i2c.h
deleted file mode 100644 (file)
index 9ffb12d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __ASM_ARCH_NUC900_I2C_H
-#define __ASM_ARCH_NUC900_I2C_H
-
-struct nuc900_platform_i2c {
-       int             bus_num;
-       unsigned long   bus_freq;
-};
-
-#endif /* __ASM_ARCH_NUC900_I2C_H */
diff --git a/arch/arm/mach-w90x900/include/mach/nuc900_spi.h b/arch/arm/mach-w90x900/include/mach/nuc900_spi.h
deleted file mode 100644 (file)
index 2c4e0c1..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * arch/arm/mach-w90x900/include/mach/nuc900_spi.h
- *
- * Copyright (c) 2009 Nuvoton technology corporation.
- *
- * Wan ZongShun <mcuos.com@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation;version 2 of the License.
- *
- */
-
-#ifndef __ASM_ARCH_SPI_H
-#define __ASM_ARCH_SPI_H
-
-extern void mfp_set_groupg(struct device *dev, const char *subname);
-
-struct nuc900_spi_info {
-       unsigned int num_cs;
-       unsigned int lsb;
-       unsigned int txneg;
-       unsigned int rxneg;
-       unsigned int divider;
-       unsigned int sleep;
-       unsigned int txnum;
-       unsigned int txbitlen;
-       int bus_num;
-};
-
-struct nuc900_spi_chip {
-       unsigned char bits_per_word;
-};
-
-#endif /* __ASM_ARCH_SPI_H */
diff --git a/arch/arm/mach-w90x900/include/mach/w90p910_keypad.h b/arch/arm/mach-w90x900/include/mach/w90p910_keypad.h
deleted file mode 100644 (file)
index 556778e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __ASM_ARCH_W90P910_KEYPAD_H
-#define __ASM_ARCH_W90P910_KEYPAD_H
-
-#include <linux/input/matrix_keypad.h>
-
-extern void mfp_set_groupi(struct device *dev);
-
-struct w90p910_keypad_platform_data {
-       const struct matrix_keymap_data *keymap_data;
-
-       unsigned int    prescale;
-       unsigned int    debounce;
-};
-
-#endif /* __ASM_ARCH_W90P910_KEYPAD_H */
index 067d8f9166dc2a1131d0a647402fb0b546afa4a9..500fe5932ce98af8113872becbc6799a734f5f62 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach-types.h>
 #include <mach/map.h>
-#include <mach/fb.h>
+#include <linux/platform_data/video-nuc900fb.h>
 
 #include "nuc950.h"
 
index a26dfb8cd58690ce3df06c1c1685118899259a11..f41502ef3f55086db9f87610b95d2acb07d72434 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/io.h>
 
 #include <mach/mfp.h>
-#include <mach/i2c.h>
+#include <linux/platform_data/i2c-nuc900.h>
 
 /* nuc900 i2c registers offset */
 
index 085ede4d972d7265652aefd060cefa8aafaa8937..e0f6cd1ad0fd5b2f9a4bf2b976163fd50c91731c 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 
-#include <mach/w90p910_keypad.h>
+#include <linux/platform_data/keypad-w90p910.h>
 
 /* Keypad Interface Control Registers */
 #define KPI_CONF               0x00
index dae8be229c5d1bfdd38fe36b7ec00e3714a1081e..a6eca6ffdabe7f6db23cc448d45c2b2d8726afaf 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
 
-#include <mach/nuc900_spi.h>
+#include <linux/platform_data/spi-nuc900.h>
 
 /* usi registers offset */
 #define USI_CNT                0x00
index e10f551ade2121eba471f4ddca476cc4e0b49d20..93387555337e6a35170625b1385c264be81338f5 100644 (file)
@@ -38,7 +38,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-ldm.h>
-#include <mach/fb.h>
+#include <linux/platform_data/video-nuc900fb.h>
 
 #include "nuc900fb.h"
 
index bc7c9300f2766f3eb9318b7e90a0d03f53824224..9a1ca6dbb6b2b704707c805d4994f32324146026 100644 (file)
@@ -16,7 +16,7 @@
 #define __NUC900FB_H
 
 #include <mach/map.h>
-#include <mach/fb.h>
+#include <linux/platform_data/video-nuc900fb.h>
 
 enum nuc900_lcddrv_type {
        LCDDRV_NUC910,
diff --git a/include/linux/platform_data/i2c-nuc900.h b/include/linux/platform_data/i2c-nuc900.h
new file mode 100644 (file)
index 0000000..9ffb12d
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef __ASM_ARCH_NUC900_I2C_H
+#define __ASM_ARCH_NUC900_I2C_H
+
+struct nuc900_platform_i2c {
+       int             bus_num;
+       unsigned long   bus_freq;
+};
+
+#endif /* __ASM_ARCH_NUC900_I2C_H */
diff --git a/include/linux/platform_data/keypad-w90p910.h b/include/linux/platform_data/keypad-w90p910.h
new file mode 100644 (file)
index 0000000..556778e
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __ASM_ARCH_W90P910_KEYPAD_H
+#define __ASM_ARCH_W90P910_KEYPAD_H
+
+#include <linux/input/matrix_keypad.h>
+
+extern void mfp_set_groupi(struct device *dev);
+
+struct w90p910_keypad_platform_data {
+       const struct matrix_keymap_data *keymap_data;
+
+       unsigned int    prescale;
+       unsigned int    debounce;
+};
+
+#endif /* __ASM_ARCH_W90P910_KEYPAD_H */
diff --git a/include/linux/platform_data/spi-nuc900.h b/include/linux/platform_data/spi-nuc900.h
new file mode 100644 (file)
index 0000000..2c4e0c1
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * arch/arm/mach-w90x900/include/mach/nuc900_spi.h
+ *
+ * Copyright (c) 2009 Nuvoton technology corporation.
+ *
+ * Wan ZongShun <mcuos.com@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation;version 2 of the License.
+ *
+ */
+
+#ifndef __ASM_ARCH_SPI_H
+#define __ASM_ARCH_SPI_H
+
+extern void mfp_set_groupg(struct device *dev, const char *subname);
+
+struct nuc900_spi_info {
+       unsigned int num_cs;
+       unsigned int lsb;
+       unsigned int txneg;
+       unsigned int rxneg;
+       unsigned int divider;
+       unsigned int sleep;
+       unsigned int txnum;
+       unsigned int txbitlen;
+       int bus_num;
+};
+
+struct nuc900_spi_chip {
+       unsigned char bits_per_word;
+};
+
+#endif /* __ASM_ARCH_SPI_H */
diff --git a/include/linux/platform_data/video-nuc900fb.h b/include/linux/platform_data/video-nuc900fb.h
new file mode 100644 (file)
index 0000000..cec5ece
--- /dev/null
@@ -0,0 +1,83 @@
+/* linux/include/asm/arch-nuc900/fb.h
+ *
+ * Copyright (c) 2008 Nuvoton technology corporation
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Changelog:
+ *
+ *   2008/08/26     vincen.zswan modify this file for LCD.
+ */
+
+#ifndef __ASM_ARM_FB_H
+#define __ASM_ARM_FB_H
+
+
+
+/* LCD Controller Hardware Desc */
+struct nuc900fb_hw {
+       unsigned int lcd_dccs;
+       unsigned int lcd_device_ctrl;
+       unsigned int lcd_mpulcd_cmd;
+       unsigned int lcd_int_cs;
+       unsigned int lcd_crtc_size;
+       unsigned int lcd_crtc_dend;
+       unsigned int lcd_crtc_hr;
+       unsigned int lcd_crtc_hsync;
+       unsigned int lcd_crtc_vr;
+       unsigned int lcd_va_baddr0;
+       unsigned int lcd_va_baddr1;
+       unsigned int lcd_va_fbctrl;
+       unsigned int lcd_va_scale;
+       unsigned int lcd_va_test;
+       unsigned int lcd_va_win;
+       unsigned int lcd_va_stuff;
+};
+
+/* LCD Display Description */
+struct nuc900fb_display {
+       /* LCD Image type */
+       unsigned type;
+
+       /* LCD Screen Size */
+       unsigned short width;
+       unsigned short height;
+
+       /* LCD Screen Info */
+       unsigned short xres;
+       unsigned short yres;
+       unsigned short bpp;
+
+       unsigned long pixclock;
+       unsigned short left_margin;
+       unsigned short right_margin;
+       unsigned short hsync_len;
+       unsigned short upper_margin;
+       unsigned short lower_margin;
+       unsigned short vsync_len;
+
+       /* hardware special register value */
+       unsigned int dccs;
+       unsigned int devctl;
+       unsigned int fbctrl;
+       unsigned int scale;
+};
+
+struct nuc900fb_mach_info {
+       struct nuc900fb_display *displays;
+       unsigned num_displays;
+       unsigned default_display;
+       /* GPIO Setting  Info */
+       unsigned gpio_dir;
+       unsigned gpio_dir_mask;
+       unsigned gpio_data;
+       unsigned gpio_data_mask;
+};
+
+extern void __init nuc900_fb_set_platdata(struct nuc900fb_mach_info *);
+
+#endif /* __ASM_ARM_FB_H */