/linux/drivers/input/keyboard/ |
H A D | matrix_keypad.c | 56 static void __activate_col(struct matrix_keypad *keypad, int col, bool on) in __activate_col() argument 59 gpiod_direction_output(keypad->col_gpios[col], 1); in __activate_col() 61 gpiod_set_value_cansleep(keypad->col_gpios[col], 0); in __activate_col() 62 if (!keypad->drive_inactive_cols) in __activate_col() 63 gpiod_direction_input(keypad->col_gpios[col]); in __activate_col() 67 static void activate_col(struct matrix_keypad *keypad, int col, bool on) in activate_col() argument 69 __activate_col(keypad, col, on); in activate_col() 71 if (on && keypad->col_scan_delay_us) in activate_col() 72 udelay(keypad->col_scan_delay_us); in activate_col() 75 static void activate_all_cols(struct matrix_keypad *keypad, bool on) in activate_all_cols() argument [all …]
|
H A D | imx_keypad.c | 79 static void imx_keypad_scan_matrix(struct imx_keypad *keypad, in imx_keypad_scan_matrix() argument 86 if ((keypad->cols_en_mask & (1 << col)) == 0) in imx_keypad_scan_matrix() 94 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_scan_matrix() 96 writew(reg_val, keypad->mmio_base + KPDR); in imx_keypad_scan_matrix() 98 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_scan_matrix() 99 reg_val &= ~((keypad->cols_en_mask & 0xff) << 8); in imx_keypad_scan_matrix() 100 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_scan_matrix() 104 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_scan_matrix() 105 reg_val |= (keypad->cols_en_mask & 0xff) << 8; in imx_keypad_scan_matrix() 106 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_scan_matrix() [all …]
|
H A D | samsung-keypad.c | 79 static void samsung_keypad_scan(struct samsung_keypad *keypad, in samsung_keypad_scan() argument 85 for (col = 0; col < keypad->cols; col++) { in samsung_keypad_scan() 86 if (keypad->type == KEYPAD_TYPE_S5PV210) { in samsung_keypad_scan() 94 writel(val, keypad->base + SAMSUNG_KEYIFCOL); in samsung_keypad_scan() 97 val = readl(keypad->base + SAMSUNG_KEYIFROW); in samsung_keypad_scan() 98 row_state[col] = ~val & ((1 << keypad->rows) - 1); in samsung_keypad_scan() 102 writel(0, keypad->base + SAMSUNG_KEYIFCOL); in samsung_keypad_scan() 105 static bool samsung_keypad_report(struct samsung_keypad *keypad, in samsung_keypad_report() argument 108 struct input_dev *input_dev = keypad->input_dev; in samsung_keypad_report() 115 for (col = 0; col < keypad->cols; col++) { in samsung_keypad_report() [all …]
|
H A D | pxa27x_keypad.c | 90 #define keypad_readl(off) __raw_readl(keypad->mmio_base + (off)) 91 #define keypad_writel(off, v) __raw_writel((v), keypad->mmio_base + (off)) 118 static int pxa27x_keypad_matrix_key_parse_dt(struct pxa27x_keypad *keypad, in pxa27x_keypad_matrix_key_parse_dt() argument 121 struct input_dev *input_dev = keypad->input_dev; in pxa27x_keypad_matrix_key_parse_dt() 141 keypad->keycodes, input_dev); in pxa27x_keypad_matrix_key_parse_dt() 148 static int pxa27x_keypad_direct_key_parse_dt(struct pxa27x_keypad *keypad, in pxa27x_keypad_direct_key_parse_dt() argument 151 struct input_dev *input_dev = keypad->input_dev; in pxa27x_keypad_direct_key_parse_dt() 201 keypad->keycodes[MAX_MATRIX_KEY_NUM + i] = code; in pxa27x_keypad_direct_key_parse_dt() 208 static int pxa27x_keypad_rotary_parse_dt(struct pxa27x_keypad *keypad, in pxa27x_keypad_rotary_parse_dt() argument 217 struct input_dev *input_dev = keypad->input_dev; in pxa27x_keypad_rotary_parse_dt() [all …]
|
H A D | nspire-keypad.c | 52 struct nspire_keypad *keypad = dev_id; in nspire_keypad_irq() local 53 struct input_dev *input = keypad->input; in nspire_keypad_irq() 61 int_sts = readl(keypad->reg_base + KEYPAD_INT) & keypad->int_mask; in nspire_keypad_irq() 65 memcpy_fromio(state, keypad->reg_base + KEYPAD_DATA, sizeof(state)); in nspire_keypad_irq() 69 if (keypad->active_low) in nspire_keypad_irq() 72 changed = bits ^ keypad->state[row]; in nspire_keypad_irq() 76 keypad->state[row] = bits; in nspire_keypad_irq() 82 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in nspire_keypad_irq() 91 writel(0x3, keypad->reg_base + KEYPAD_INT); in nspire_keypad_irq() 98 struct nspire_keypad *keypad = input_get_drvdata(input); in nspire_keypad_open() local [all …]
|
H A D | mt6779-keypad.c | 50 struct mt6779_keypad *keypad = dev_id; in mt6779_keypad_irq_handler() local 51 const unsigned short *keycode = keypad->input_dev->keycode; in mt6779_keypad_irq_handler() 57 unsigned int row_shift = get_count_order(keypad->n_cols); in mt6779_keypad_irq_handler() 60 regmap_bulk_read(keypad->regmap, MTK_KPD_MEM, in mt6779_keypad_irq_handler() 63 bitmap_xor(change, new_state, keypad->keymap_state, MTK_KPD_NUM_BITS); in mt6779_keypad_irq_handler() 74 keypad->calc_row_col(key, &row, &col); in mt6779_keypad_irq_handler() 79 dev_dbg(&keypad->input_dev->dev, "%s", in mt6779_keypad_irq_handler() 82 input_event(keypad->input_dev, EV_MSC, MSC_SCAN, scancode); in mt6779_keypad_irq_handler() 83 input_report_key(keypad->input_dev, keycode[scancode], pressed); in mt6779_keypad_irq_handler() 84 input_sync(keypad->input_dev); in mt6779_keypad_irq_handler() [all …]
|
H A D | stmpe-keypad.c | 141 static int stmpe_keypad_read_data(struct stmpe_keypad *keypad, u8 *data) in stmpe_keypad_read_data() argument 143 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_read_data() 144 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_read_data() 165 struct stmpe_keypad *keypad = dev; in stmpe_keypad_irq() local 166 struct input_dev *input = keypad->input; in stmpe_keypad_irq() 167 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_irq() 172 ret = stmpe_keypad_read_data(keypad, fifo); in stmpe_keypad_irq() 188 input_report_key(input, keypad->keymap[code], !up); in stmpe_keypad_irq() 195 static int stmpe_keypad_altfunc_init(struct stmpe_keypad *keypad) in stmpe_keypad_altfunc_init() argument 197 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_altfunc_init() [all …]
|
H A D | st-keyscan.c | 43 struct st_keyscan *keypad = dev_id; in keyscan_isr() local 44 unsigned short *keycode = keypad->input_dev->keycode; in keyscan_isr() 48 state = readl(keypad->base + KEYSCAN_MATRIX_STATE_OFF) & 0xffff; in keyscan_isr() 49 change = keypad->last_state ^ state; in keyscan_isr() 50 keypad->last_state = state; in keyscan_isr() 53 input_report_key(keypad->input_dev, in keyscan_isr() 56 input_sync(keypad->input_dev); in keyscan_isr() 61 static int keyscan_start(struct st_keyscan *keypad) in keyscan_start() argument 65 error = clk_enable(keypad->clk); in keyscan_start() 69 writel(keypad->debounce_us * (clk_get_rate(keypad->clk) / 1000000), in keyscan_start() [all …]
|
H A D | tc3589x-keypad.c | 114 static int tc3589x_keypad_init_key_hardware(struct tc_keypad *keypad) in tc3589x_keypad_init_key_hardware() argument 117 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_init_key_hardware() 118 const struct tc3589x_keypad_platform_data *board = keypad->board; in tc3589x_keypad_init_key_hardware() 191 struct tc_keypad *keypad = dev; in tc3589x_keypad_irq() local 192 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_irq() 211 input_event(keypad->input, EV_MSC, MSC_SCAN, code); in tc3589x_keypad_irq() 212 input_report_key(keypad->input, keypad->keymap[code], !up); in tc3589x_keypad_irq() 213 input_sync(keypad->input); in tc3589x_keypad_irq() 226 static int tc3589x_keypad_enable(struct tc_keypad *keypad) in tc3589x_keypad_enable() argument 228 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_enable() [all …]
|
H A D | max7359_keypad.c | 87 struct max7359_keypad *keypad = dev_id; in max7359_interrupt() local 88 struct input_dev *input_dev = keypad->input_dev; in max7359_interrupt() 91 val = max7359_read_reg(keypad->client, MAX7359_REG_KEYFIFO); in max7359_interrupt() 98 dev_dbg(&keypad->client->dev, in max7359_interrupt() 102 input_report_key(input_dev, keypad->keycodes[code], !release); in max7359_interrupt() 129 struct max7359_keypad *keypad = input_get_drvdata(dev); in max7359_open() local 131 max7359_take_catnap(keypad->client); in max7359_open() 138 struct max7359_keypad *keypad = input_get_drvdata(dev); in max7359_close() local 140 max7359_fall_deepsleep(keypad->client); in max7359_close() 162 struct max7359_keypad *keypad; in max7359_probe() local [all …]
|
H A D | Makefile | 16 obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o 18 obj-$(CONFIG_KEYBOARD_CLPS711X) += clps711x-keypad.o 26 obj-$(CONFIG_KEYBOARD_TCA6416) += tca6416-keypad.o 46 obj-$(CONFIG_KEYBOARD_MT6779) += mt6779-keypad.o 49 obj-$(CONFIG_KEYBOARD_NSPIRE) += nspire-keypad.o 50 obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o 51 obj-$(CONFIG_KEYBOARD_OMAP4) += omap4-keypad.o 54 obj-$(CONFIG_KEYBOARD_PMIC8XXX) += pmic8xxx-keypad.o 59 obj-$(CONFIG_KEYBOARD_SAMSUNG) += samsung-keypad.o 63 obj-$(CONFIG_KEYBOARD_STMPE) += stmpe-keypad.o [all …]
|
/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos4412-smdk4412.dts | 69 &keypad { 70 samsung,keypad-num-rows = <3>; 71 samsung,keypad-num-columns = <8>; 79 keypad,row = <1>; 80 keypad,column = <3>; 85 keypad,row = <1>; 86 keypad,column = <4>; 91 keypad,row = <1>; 92 keypad,column = <5>; 97 keypad,row = <1>; [all …]
|
H A D | exynos4210-smdkv310.dts | 88 &keypad { 89 samsung,keypad-num-rows = <2>; 90 samsung,keypad-num-columns = <8>; 98 keypad,row = <0>; 99 keypad,column = <3>; 104 keypad,row = <0>; 105 keypad,column = <4>; 110 keypad,row = <0>; 111 keypad,column = <5>; 116 keypad,row = <0>; [all …]
|
H A D | s5pv210-smdkv210.dts | 73 &keypad { 76 samsung,keypad-num-rows = <8>; 77 samsung,keypad-num-columns = <8>; 88 keypad,row = <0>; 89 keypad,column = <3>; 94 keypad,row = <0>; 95 keypad,column = <4>; 100 keypad,row = <0>; 101 keypad,column = <5>; 106 keypad,row = <0>; [all …]
|
H A D | s3c64xx-pinctrl.dtsi | 448 keypad_col0_0: keypad-col0-0-pins { 454 keypad_col1_0: keypad-col1-0-pins { 460 keypad_col2_0: keypad-col2-0-pins { 466 keypad_col3_0: keypad-col3-0-pins { 472 keypad_col4_0: keypad-col4-0-pins { 478 keypad_col5_0: keypad-col5-0-pins { 484 keypad_col6_0: keypad-col6-0-pins { 490 keypad_col7_0: keypad-col7-0-pins { 496 keypad_col0_1: keypad-col0-1-pins { 502 keypad_col1_1: keypad-col1-1-pins { [all …]
|
H A D | s5pv210-aquila.dts | 269 &keypad { 272 samsung,keypad-num-rows = <3>; 273 samsung,keypad-num-columns = <3>; 280 keypad,row = <0>; 281 keypad,column = <1>; 286 keypad,row = <0>; 287 keypad,column = <2>; 292 keypad,row = <1>; 293 keypad,column = <1>; 298 keypad,row = <1>; [all …]
|
H A D | s5pv210-goni.dts | 252 &keypad { 255 samsung,keypad-num-rows = <3>; 256 samsung,keypad-num-columns = <3>; 263 keypad,row = <0>; 264 keypad,column = <1>; 269 keypad,row = <0>; 270 keypad,column = <2>; 275 keypad,row = <1>; 276 keypad,column = <1>; 281 keypad,row = <1>; [all …]
|
/linux/Documentation/devicetree/bindings/input/ |
H A D | omap-keypad.txt | 4 keypad device. The keypad controller supports multiple row and column lines. 6 The keypad controller can sense a key-press and key-release and report the 12 keypad,num-rows and keypad,num-columns are required. 16 - "ti,omap4-keypad": For controllers compatible with omap4 keypad 20 - linux,keypad-no-autorepeat: do no enable autorepeat feature. 23 keypad@4ae1c000{ 24 compatible = "ti,omap4-keypad"; 25 keypad,num-rows = <2>; 26 keypad,num-columns = <8>; 27 linux,keypad-no-autorepeat;
|
H A D | twl4030-keypad.txt | 4 keypad device. The keypad controller supports multiple row and column lines. 6 The keypad controller can sense a key-press and key-release and report the 12 * keypad,num-rows and keypad,num-columns are required. 16 - "ti,twl4030-keypad": For controllers compatible with twl4030 keypad 19 - <1>: For controllers compatible with twl4030 keypad controller. 22 twl_keypad: keypad { 23 compatible = "ti,twl4030-keypad"; 25 keypad,num-rows = <8>; 26 keypad,num-columns = <8>;
|
H A D | brcm,bcm-keypad.txt | 4 keypad device. The keypad controller supports multiple row and column lines. 6 The keypad controller can sense a key-press and key-release and report the 12 keypad,num-rows and keypad,num-columns are required. 15 - compatible: should be "brcm,bcm-keypad" 23 - keypad,num-rows: Number of row lines connected to the keypad 26 - keypad,num-columns: Number of column lines connected to the 27 keypad controller. 56 If specified implies the keypad scan pull-up has been enabled. 68 keypad: keypad@180ac000 { 70 compatible = "brcm,bcm-keypad"; [all …]
|
H A D | gpio-matrix-keypad.txt | 1 * GPIO driven matrix keypad device tree bindings 3 GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. 4 The matrix keypad supports multiple row and column lines, a key can be 6 keypad can sense a key-press and key-release by means of GPIO lines and 10 - compatible: Should be "gpio-matrix-keypad" 22 - wakeup-source: use any event on keypad as wakeup event. 26 before we can scan keypad after activating column gpio 31 matrix-keypad { 32 compatible = "gpio-matrix-keypad";
|
H A D | clps711x-keypad.txt | 1 * Cirrus Logic CLPS711X matrix keypad device tree bindings 4 - compatible: Shall contain "cirrus,ep7209-keypad". 14 keypad { 15 compatible = "cirrus,ep7312-keypad", "cirrus,ep7209-keypad";
|
H A D | st-keyscan.txt | 22 - keypad,num-rows: Number of row lines connected to the keypad controller. 24 - keypad,num-columns: Number of column lines connected to the keypad 40 keypad,num-rows = <4>; 41 keypad,num-columns = <4>;
|
/linux/drivers/auxdisplay/ |
H A D | ht16k33.c | 93 struct ht16k33_keypad keypad; member 328 static bool ht16k33_keypad_scan(struct ht16k33_keypad *keypad) in ht16k33_keypad_scan() argument 330 const unsigned short *keycodes = keypad->dev->keycode; in ht16k33_keypad_scan() 338 rc = i2c_smbus_read_i2c_block_data(keypad->client, 0x40, in ht16k33_keypad_scan() 341 dev_err(&keypad->client->dev, in ht16k33_keypad_scan() 346 for (col = 0; col < keypad->cols; col++) { in ht16k33_keypad_scan() 350 bits_changed = keypad->last_key_state[col] ^ new_state[col]; in ht16k33_keypad_scan() 353 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in ht16k33_keypad_scan() 354 input_event(keypad->dev, EV_MSC, MSC_SCAN, code); in ht16k33_keypad_scan() 355 input_report_key(keypad->dev, keycodes[code], in ht16k33_keypad_scan() [all …]
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | tc3589x.txt | 4 following built-in devices: gpio, keypad, rotator (vibrator), PWM (for 45 This keypad is the same on all variants, supporting up to 96 different 48 - compatible : must be "toshiba,tc3589x-keypad" 50 - keypad,num-rows : number of rows in the matrix, see 52 - keypad,num-columns : number of columns in the matrix, see 57 - wakeup-source: use any event on keypad as wakeup event. 81 compatible = "toshiba,tc3589x-keypad"; 84 keypad,num-columns = <8>; 85 keypad,num-rows = <8>;
|