aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/matrix_keypad.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index c964cd7f436a..80352ad6581a 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -41,6 +41,9 @@ struct matrix_keymap_data {
41 * @col_scan_delay_us: delay, measured in microseconds, that is 41 * @col_scan_delay_us: delay, measured in microseconds, that is
42 * needed before we can keypad after activating column gpio 42 * needed before we can keypad after activating column gpio
43 * @debounce_ms: debounce interval in milliseconds 43 * @debounce_ms: debounce interval in milliseconds
44 * @clustered_irq: may be specified if interrupts of all row/column GPIOs
45 * are bundled to one single irq
46 * @clustered_irq_flags: flags that are needed for the clustered irq
44 * @active_low: gpio polarity 47 * @active_low: gpio polarity
45 * @wakeup: controls whether the device should be set up as wakeup 48 * @wakeup: controls whether the device should be set up as wakeup
46 * source 49 * source
@@ -63,6 +66,9 @@ struct matrix_keypad_platform_data {
63 /* key debounce interval in milli-second */ 66 /* key debounce interval in milli-second */
64 unsigned int debounce_ms; 67 unsigned int debounce_ms;
65 68
69 unsigned int clustered_irq;
70 unsigned int clustered_irq_flags;
71
66 bool active_low; 72 bool active_low;
67 bool wakeup; 73 bool wakeup;
68 bool no_autorepeat; 74 bool no_autorepeat;
n>, 0x01 }, { 7, 0x10 }, { 9, 0x1E }, { 10, 0x04 }, { 17, 0xFF }, { 21, 0x8A }, { 22, 0x00 }, { 23, 0x82 }, { 24, 0x24 }, { 25, 0x22 }, { 26, 0x6D }, { 27, 0xEB }, { 28, 0xB9 }, { 29, 0x3A }, { 49, 0x1A }, { 50, 0x16 }, { 51, 0x05 }, { 55, 0x7F }, { 56, 0x15 }, { 57, 0x7B }, { 60, 0x05 }, { 61, 0x0C }, { 62, 0x80 }, { 63, 0x00 }, { 92, 0x90 }, { 97, 0x01 }, { 98, 0xFF }, { 113, 0x11 }, { 114, 0x02 }, { 115, 0x08 }, { 123, 0xAB }, { 124, 0x04 }, { 6, 0x02 }, { 133, 0x00 }, { 134, 0xFE }, { 135, 0x22 }, { 136, 0x0B }, { 137, 0xFF }, { 138, 0x0F }, { 139, 0x00 }, { 140, 0xFE }, { 141, 0x22 }, { 142, 0x0B }, { 143, 0xFF }, { 144, 0x0F }, { 145, 0x00 }, { 146, 0xFE }, { 147, 0x22 }, { 148, 0x0B }, { 149, 0xFF }, { 150, 0x0F }, { 202, 0x30 }, { 30, 0x01 }, { 4, 0x01 }, { 31, 0x41 }, }; static struct sharp_state_type sharp_state = { 0 }; static struct msm_panel_common_pdata *lcdc_sharp_pdata; static void sharp_spi_write_byte(u8 val) { int i; /* Clock should be Low before entering */ for (i = 0; i < 8; i++) { /* #1: Drive the Data (High or Low) */ if (val & bit_shift[i]) gpio_set_value(spi_mosi, 1); else gpio_set_value(spi_mosi, 0); /* #2: Drive the Clk High and then Low */ gpio_set_value(spi_sclk, 1); gpio_set_value(spi_sclk, 0); } } static void serigo(u8 reg, u8 data) { /* Enable the Chip Select - low */ gpio_set_value(spi_cs, 0); udelay(1); /* Transmit register address first, then data */ sharp_spi_write_byte(reg); /* Idle state of MOSI is Low */ gpio_set_value(spi_mosi, 0); udelay(1); sharp_spi_write_byte(data); gpio_set_value(spi_mosi, 0); gpio_set_value(spi_cs, 1); } static void sharp_spi_init(void) { spi_sclk = *(lcdc_sharp_pdata->gpio_num); spi_cs = *(lcdc_sharp_pdata->gpio_num + 1); spi_mosi = *(lcdc_sharp_pdata->gpio_num + 2); spi_miso = *(lcdc_sharp_pdata->gpio_num + 3); /* Set the output so that we don't disturb the slave device */ gpio_set_value(spi_sclk, 0); gpio_set_value(spi_mosi, 0); /* Set the Chip Select deasserted (active low) */ gpio_set_value(spi_cs, 1); } static void sharp_disp_powerup(void) { if (!sharp_state.disp_powered_up && !sharp_state.display_on) sharp_state.disp_powered_up = TRUE; } static void sharp_disp_on(void) { int i; if (sharp_state.disp_powered_up && !sharp_state.display_on) { for (i = 0; i < ARRAY_SIZE(init_sequence); i++) { serigo(init_sequence[i].addr, init_sequence[i].data); } mdelay(10); serigo(31, 0xC1); mdelay(10); serigo(31, 0xD9); serigo(31, 0xDF); sharp_state.display_on = TRUE; } } static int lcdc_sharp_panel_on(struct platform_device *pdev) { if (!sharp_state.disp_initialized) { lcdc_sharp_pdata->panel_config_gpio(1); sharp_spi_init();