aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 15:46:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 15:46:37 -0500
commit31564cbd77baa88405862d4aa0d00893ab1d8cb7 (patch)
tree2eaec947ab64ccfa2d94ca29bf14feb70b8a4b61 /arch
parent6842d98de7bb726dfddc719cb9ae022b26a0f2b8 (diff)
parent022573c275500e1a50889949f679d04b5446edf6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull second round of input updates from Dmitry Torokhov: "As usual, there are a couple of new drivers, input core now supports managed input devices (devres), a slew of drivers now have device tree support and a bunch of fixes and cleanups." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (71 commits) Input: walkera0701 - fix crash on startup Input: matrix-keymap - provide a proper module license Input: gpio_keys_polled - switch to using gpio_request_one() Input: gpio_keys - switch to using gpio_request_one() Input: wacom - fix touch support for Bamboo Fun CTH-461 Input: xpad - add a few new VID/PID combinations Input: xpad - minor formatting fixes Input: gpio-keys-polled - honor 'autorepeat' setting in platform data Input: tca8418-keypad - switch to using managed resources Input: tca8418_keypad - increase severity of failures in probe() Input: tca8418_keypad - move device ID tables closer to where they are used Input: tca8418_keypad - use dev_get_platdata() to retrieve platform data Input: tca8418_keypad - use a temporary variable for parent device Input: tca8418_keypad - add support for shared interrupt Input: tca8418_keypad - add support for device tree bindings Input: remove Compaq iPAQ H3600 (Bitsy) touchscreen driver Input: bu21013_ts - add support for Device Tree booting Input: bu21013_ts - move GPIO init and exit functions into the driver Input: bu21013_ts - request regulator that actually exists ARM: ux500: Strip out duplicate touch screen platform information ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c14
-rw-r--r--arch/arm/mach-ux500/board-mop500-stuib.c71
2 files changed, 2 insertions, 83 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 3e8ead67e459..24d2f2df11a0 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -112,17 +112,6 @@ static void __init mipid_dev_init(void)
112 omapfb_set_lcd_config(&nokia770_lcd_config); 112 omapfb_set_lcd_config(&nokia770_lcd_config);
113} 113}
114 114
115static void __init ads7846_dev_init(void)
116{
117 if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
118 printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
119}
120
121static int ads7846_get_pendown_state(void)
122{
123 return !gpio_get_value(ADS7846_PENDOWN_GPIO);
124}
125
126static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { 115static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
127 .x_max = 0x0fff, 116 .x_max = 0x0fff,
128 .y_max = 0x0fff, 117 .y_max = 0x0fff,
@@ -131,7 +120,7 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =
131 .debounce_max = 10, 120 .debounce_max = 10,
132 .debounce_tol = 3, 121 .debounce_tol = 3,
133 .debounce_rep = 1, 122 .debounce_rep = 1,
134 .get_pendown_state = ads7846_get_pendown_state, 123 .gpio_pendown = ADS7846_PENDOWN_GPIO,
135}; 124};
136 125
137static struct spi_board_info nokia770_spi_board_info[] __initdata = { 126static struct spi_board_info nokia770_spi_board_info[] __initdata = {
@@ -241,7 +230,6 @@ static void __init omap_nokia770_init(void)
241 omap_serial_init(); 230 omap_serial_init();
242 omap_register_i2c_bus(1, 100, NULL, 0); 231 omap_register_i2c_bus(1, 100, NULL, 0);
243 hwa742_dev_init(); 232 hwa742_dev_init();
244 ads7846_dev_init();
245 mipid_dev_init(); 233 mipid_dev_init();
246 omap1_usb_init(&nokia770_usb_config); 234 omap1_usb_init(&nokia770_usb_config);
247 nokia770_mmc_init(); 235 nokia770_mmc_init();
diff --git a/arch/arm/mach-ux500/board-mop500-stuib.c b/arch/arm/mach-ux500/board-mop500-stuib.c
index 564f57d5d8a7..7e1f294f0434 100644
--- a/arch/arm/mach-ux500/board-mop500-stuib.c
+++ b/arch/arm/mach-ux500/board-mop500-stuib.c
@@ -77,9 +77,6 @@ static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
77 * BU21013 ROHM touchscreen interface on the STUIBs 77 * BU21013 ROHM touchscreen interface on the STUIBs
78 */ 78 */
79 79
80/* tracks number of bu21013 devices being enabled */
81static int bu21013_devices;
82
83#define TOUCH_GPIO_PIN 84 80#define TOUCH_GPIO_PIN 84
84 81
85#define TOUCH_XMAX 384 82#define TOUCH_XMAX 384
@@ -88,73 +85,8 @@ static int bu21013_devices;
88#define PRCMU_CLOCK_OCR 0x1CC 85#define PRCMU_CLOCK_OCR 0x1CC
89#define TSC_EXT_CLOCK_9_6MHZ 0x840000 86#define TSC_EXT_CLOCK_9_6MHZ 0x840000
90 87
91/**
92 * bu21013_gpio_board_init : configures the touch panel.
93 * @reset_pin: reset pin number
94 * This function can be used to configures
95 * the voltage and reset the touch panel controller.
96 */
97static int bu21013_gpio_board_init(int reset_pin)
98{
99 int retval = 0;
100
101 bu21013_devices++;
102 if (bu21013_devices == 1) {
103 retval = gpio_request(reset_pin, "touchp_reset");
104 if (retval) {
105 printk(KERN_ERR "Unable to request gpio reset_pin");
106 return retval;
107 }
108 retval = gpio_direction_output(reset_pin, 1);
109 if (retval < 0) {
110 printk(KERN_ERR "%s: gpio direction failed\n",
111 __func__);
112 return retval;
113 }
114 }
115
116 return retval;
117}
118
119/**
120 * bu21013_gpio_board_exit : deconfigures the touch panel controller
121 * @reset_pin: reset pin number
122 * This function can be used to deconfigures the chip selection
123 * for touch panel controller.
124 */
125static int bu21013_gpio_board_exit(int reset_pin)
126{
127 int retval = 0;
128
129 if (bu21013_devices == 1) {
130 retval = gpio_direction_output(reset_pin, 0);
131 if (retval < 0) {
132 printk(KERN_ERR "%s: gpio direction failed\n",
133 __func__);
134 return retval;
135 }
136 gpio_set_value(reset_pin, 0);
137 }
138 bu21013_devices--;
139
140 return retval;
141}
142
143/**
144 * bu21013_read_pin_val : get the interrupt pin value
145 * This function can be used to get the interrupt pin value for touch panel
146 * controller.
147 */
148static int bu21013_read_pin_val(void)
149{
150 return gpio_get_value(TOUCH_GPIO_PIN);
151}
152
153static struct bu21013_platform_device tsc_plat_device = { 88static struct bu21013_platform_device tsc_plat_device = {
154 .cs_en = bu21013_gpio_board_init, 89 .touch_pin = TOUCH_GPIO_PIN,
155 .cs_dis = bu21013_gpio_board_exit,
156 .irq_read_val = bu21013_read_pin_val,
157 .irq = NOMADIK_GPIO_TO_IRQ(TOUCH_GPIO_PIN),
158 .touch_x_max = TOUCH_XMAX, 90 .touch_x_max = TOUCH_XMAX,
159 .touch_y_max = TOUCH_YMAX, 91 .touch_y_max = TOUCH_YMAX,
160 .ext_clk = false, 92 .ext_clk = false,
@@ -171,7 +103,6 @@ static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = {
171 I2C_BOARD_INFO("bu21013_tp", 0x5D), 103 I2C_BOARD_INFO("bu21013_tp", 0x5D),
172 .platform_data = &tsc_plat_device, 104 .platform_data = &tsc_plat_device,
173 }, 105 },
174
175}; 106};
176 107
177void __init mop500_stuib_init(void) 108void __init mop500_stuib_init(void)