regulator, mc13xxx: Remove pointless test for unsigned less than zero
[zen-stable.git] / arch / arm / mach-pxa / tavorevb3.c
blob70191a9450eb279e2b4b31b70489716e83424b5a
1 /*
2 * linux/arch/arm/mach-pxa/tavorevb3.c
4 * Support for the Marvell EVB3 Development Platform.
6 * Copyright: (C) Copyright 2008-2010 Marvell International Ltd.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * publishhed by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/interrupt.h>
17 #include <linux/i2c.h>
18 #include <linux/gpio.h>
19 #include <linux/mfd/88pm860x.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
24 #include <mach/pxa930.h>
26 #include <plat/i2c.h>
28 #include "devices.h"
29 #include "generic.h"
31 #define TAVOREVB3_NR_IRQS (IRQ_BOARD_START + 24)
33 static mfp_cfg_t evb3_mfp_cfg[] __initdata = {
34 /* UART */
35 GPIO53_UART1_TXD,
36 GPIO54_UART1_RXD,
38 /* PMIC */
39 PMIC_INT_GPIO83,
42 #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
43 static struct pm860x_touch_pdata evb3_touch = {
44 .gpadc_prebias = 1,
45 .slot_cycle = 1,
46 .tsi_prebias = 6,
47 .pen_prebias = 16,
48 .pen_prechg = 2,
49 .res_x = 300,
52 static struct pm860x_backlight_pdata evb3_backlight[] = {
54 .id = PM8606_ID_BACKLIGHT,
55 .iset = PM8606_WLED_CURRENT(24),
56 .flags = PM8606_BACKLIGHT1,
58 {},
61 static struct pm860x_led_pdata evb3_led[] = {
63 .id = PM8606_ID_LED,
64 .iset = PM8606_LED_CURRENT(12),
65 .flags = PM8606_LED1_RED,
66 }, {
67 .id = PM8606_ID_LED,
68 .iset = PM8606_LED_CURRENT(12),
69 .flags = PM8606_LED1_GREEN,
70 }, {
71 .id = PM8606_ID_LED,
72 .iset = PM8606_LED_CURRENT(12),
73 .flags = PM8606_LED1_BLUE,
74 }, {
75 .id = PM8606_ID_LED,
76 .iset = PM8606_LED_CURRENT(12),
77 .flags = PM8606_LED2_RED,
78 }, {
79 .id = PM8606_ID_LED,
80 .iset = PM8606_LED_CURRENT(12),
81 .flags = PM8606_LED2_GREEN,
82 }, {
83 .id = PM8606_ID_LED,
84 .iset = PM8606_LED_CURRENT(12),
85 .flags = PM8606_LED2_BLUE,
89 static struct pm860x_platform_data evb3_pm8607_info = {
90 .touch = &evb3_touch,
91 .backlight = &evb3_backlight[0],
92 .led = &evb3_led[0],
93 .companion_addr = 0x10,
94 .irq_mode = 0,
95 .irq_base = IRQ_BOARD_START,
97 .i2c_port = GI2C_PORT,
100 static struct i2c_board_info evb3_i2c_info[] = {
102 .type = "88PM860x",
103 .addr = 0x34,
104 .platform_data = &evb3_pm8607_info,
105 .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)),
109 static void __init evb3_init_i2c(void)
111 pxa_set_i2c_info(NULL);
112 i2c_register_board_info(0, ARRAY_AND_SIZE(evb3_i2c_info));
114 #else
115 static inline void evb3_init_i2c(void) {}
116 #endif
118 static void __init evb3_init(void)
120 /* initialize MFP configurations */
121 pxa3xx_mfp_config(ARRAY_AND_SIZE(evb3_mfp_cfg));
123 pxa_set_ffuart_info(NULL);
125 evb3_init_i2c();
128 MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)")
129 .boot_params = 0xa0000100,
130 .map_io = pxa3xx_map_io,
131 .nr_irqs = TAVOREVB3_NR_IRQS,
132 .init_irq = pxa3xx_init_irq,
133 .timer = &pxa_timer,
134 .init_machine = evb3_init,
135 MACHINE_END