aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 18:33:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 18:33:45 -0500
commit6c5096e5538b455bc3bea2b02588c380f070d8c6 (patch)
treea2d08974a0c6a6fd19dff90bd3ab1827c23a5764 /arch/arm/mach-omap1
parentbab588fcfb6335c767d811a8955979f5440328e0 (diff)
parentf628e3d92465303792d52c98fb0c95bef558f936 (diff)
Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board specific changes from Arnd Bergmann: "These updates are all for board specific code, including - defconfig updates for shmobile, davinci, bcm2835, imx, omap and tegra - SD/MMC and I2C support on bcm2835 (Raspberry PI) - minor updates for PXA - shmobile updates to GPIO usage in board files - More things in OMAP board files are moved over to device tree probing - Better support for audio devices on some OMAP platforms" * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (55 commits) ARM: imx_v4_v5_defconfig: Add VPU support ARM: imx: configs: enable netfilter support ARM: OMAP2+: Fix twl section warnings related to omap_twl4030_audio_init ARM: OMAP2+: omap2plus_defconfig: enable omap1 rtc RX-51: Register twl4030-madc device RX-51: Add leds lp5523 names from Maemo 5 2.6.28 kernel ARM: OMAP2+: AM33XX: omap2plus_defconfig: Add support for few drivers ARM: OMAP1: nokia770: enable CBUS/Retu ARM: OMAP2+: omap2plus_defconfig: enable CMA allocator ARM: OMAP2+: omap2plus_defconfig: enable TFP410 chip support ARM: OMAP3: igep0020: simplify GPIO LEDs dependencies ARM: OMAP2+: craneboard: support the TPS65910 PMU ARM: OMAP2+: craneboard: support NAND device ARM: OMAP3: cm-t3517: add MMC support ARM: OMAP2+: Remove apollon board support ARM: shmobile: armadillo800eva: set clock rates before timer init ARM: tegra: defconfig updates ARM: shmobile: mackerel: Use gpio_request_one() ARM: shmobile: kzm9g: Use gpio_request_one() ARM: shmobile: bonito: Use gpio_request_one() ...
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 4695ca717706..62a15e289c79 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -7,6 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/irq.h>
10#include <linux/gpio.h> 11#include <linux/gpio.h>
11#include <linux/kernel.h> 12#include <linux/kernel.h>
12#include <linux/init.h> 13#include <linux/init.h>
@@ -23,6 +24,8 @@
23 24
24#include <linux/platform_data/keypad-omap.h> 25#include <linux/platform_data/keypad-omap.h>
25#include <linux/platform_data/lcd-mipid.h> 26#include <linux/platform_data/lcd-mipid.h>
27#include <linux/platform_data/gpio-omap.h>
28#include <linux/platform_data/i2c-cbus-gpio.h>
26 29
27#include <asm/mach-types.h> 30#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -212,6 +215,45 @@ static inline void nokia770_mmc_init(void)
212} 215}
213#endif 216#endif
214 217
218#if defined(CONFIG_I2C_CBUS_GPIO) || defined(CONFIG_I2C_CBUS_GPIO_MODULE)
219static struct i2c_cbus_platform_data nokia770_cbus_data = {
220 .clk_gpio = OMAP_MPUIO(9),
221 .dat_gpio = OMAP_MPUIO(10),
222 .sel_gpio = OMAP_MPUIO(11),
223};
224
225static struct platform_device nokia770_cbus_device = {
226 .name = "i2c-cbus-gpio",
227 .id = 2,
228 .dev = {
229 .platform_data = &nokia770_cbus_data,
230 },
231};
232
233static struct i2c_board_info nokia770_i2c_board_info_2[] __initdata = {
234 {
235 I2C_BOARD_INFO("retu-mfd", 0x01),
236 },
237};
238
239static void __init nokia770_cbus_init(void)
240{
241 const int retu_irq_gpio = 62;
242
243 if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ"))
244 return;
245 irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
246 nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio);
247 i2c_register_board_info(2, nokia770_i2c_board_info_2,
248 ARRAY_SIZE(nokia770_i2c_board_info_2));
249 platform_device_register(&nokia770_cbus_device);
250}
251#else /* CONFIG_I2C_CBUS_GPIO */
252static void __init nokia770_cbus_init(void)
253{
254}
255#endif /* CONFIG_I2C_CBUS_GPIO */
256
215static void __init omap_nokia770_init(void) 257static void __init omap_nokia770_init(void)
216{ 258{
217 /* On Nokia 770, the SleepX signal is masked with an 259 /* On Nokia 770, the SleepX signal is masked with an
@@ -233,6 +275,7 @@ static void __init omap_nokia770_init(void)
233 mipid_dev_init(); 275 mipid_dev_init();
234 omap1_usb_init(&nokia770_usb_config); 276 omap1_usb_init(&nokia770_usb_config);
235 nokia770_mmc_init(); 277 nokia770_mmc_init();
278 nokia770_cbus_init();
236} 279}
237 280
238MACHINE_START(NOKIA770, "Nokia 770") 281MACHINE_START(NOKIA770, "Nokia 770")