Home
last modified time | relevance | path

Searched refs:keypad (Results 1 – 25 of 102) sorted by relevance

12345

/linux/drivers/input/keyboard/
H A Dep93xx_keypad.c81 struct ep93xx_keypad *keypad = dev_id; in ep93xx_keypad_irq_handler() local
82 struct input_dev *input_dev = keypad->input_dev; in ep93xx_keypad_irq_handler()
86 status = __raw_readl(keypad->mmio_base + KEY_REG); in ep93xx_keypad_irq_handler()
89 key1 = keypad->keycodes[keycode]; in ep93xx_keypad_irq_handler()
92 key2 = keypad->keycodes[keycode]; in ep93xx_keypad_irq_handler()
95 if (keypad->key1 && key1 != keypad->key1 && key2 != keypad->key1) in ep93xx_keypad_irq_handler()
96 input_report_key(input_dev, keypad->key1, 0); in ep93xx_keypad_irq_handler()
98 if (keypad->key2 && key1 != keypad->key2 && key2 != keypad->key2) in ep93xx_keypad_irq_handler()
99 input_report_key(input_dev, keypad->key2, 0); in ep93xx_keypad_irq_handler()
104 keypad->key1 = key1; in ep93xx_keypad_irq_handler()
[all …]
H A Dimx_keypad.c79 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 Dsamsung-keypad.c78 static void samsung_keypad_scan(struct samsung_keypad *keypad, in samsung_keypad_scan() argument
84 for (col = 0; col < keypad->cols; col++) { in samsung_keypad_scan()
86 val <<= keypad->chip->column_shift; in samsung_keypad_scan()
88 writel(val, keypad->base + SAMSUNG_KEYIFCOL); in samsung_keypad_scan()
91 val = readl(keypad->base + SAMSUNG_KEYIFROW); in samsung_keypad_scan()
92 row_state[col] = ~val & GENMASK(keypad->rows - 1, 0); in samsung_keypad_scan()
96 writel(0, keypad->base + SAMSUNG_KEYIFCOL); in samsung_keypad_scan()
99 static bool samsung_keypad_report(struct samsung_keypad *keypad, in samsung_keypad_report() argument
102 struct input_dev *input_dev = keypad->input_dev; in samsung_keypad_report()
109 for (col = 0; col < keypad->cols; col++) { in samsung_keypad_report()
[all …]
H A Dnspire-keypad.c52 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 Dmt6779-keypad.c50 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 Dstmpe-keypad.c141 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 Dst-keyscan.c43 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 Dtc3589x-keypad.c114 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 Dmax7359_keypad.c87 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 Dadp5585-keys.c39 unsigned long keypad; member
61 if (test_bit(row, &kpad->keypad) && in adp5585_keys_validate_events()
62 test_bit(col + kpad->info->max_rows, &kpad->keypad)) in adp5585_keys_validate_events()
98 for_each_set_bit(pin, &kpad->keypad, adp5585->n_pins) in adp5585_keys_pins_free()
149 __set_bit(keypad_pins[pin], &kpad->keypad); in adp5585_keys_parse_fw()
160 rows = find_last_bit(&kpad->keypad, kpad->info->max_rows) + 1; in adp5585_keys_parse_fw()
165 cols = find_last_bit(&kpad->keypad, kpad->info->max_cols + kpad->info->max_rows); in adp5585_keys_parse_fw()
204 keys_bits = bitmap_read(&kpad->keypad, start, nbits); in adp5585_keys_setup()
/linux/arch/arm/boot/dts/samsung/
H A Dexynos4412-smdk4412.dts69 &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 Dexynos4210-smdkv310.dts88 &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 Ds5pv210-smdkv210.dts73 &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 Ds3c64xx-pinctrl.dtsi448 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 Ds5pv210-aquila.dts269 &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 Ds5pv210-goni.dts252 &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 …]
H A Dexynos4412-origen.dts453 &keypad {
454 samsung,keypad-num-rows = <3>;
455 samsung,keypad-num-columns = <2>;
463 keypad,row = <0>;
464 keypad,column = <0>;
469 keypad,row = <0>;
470 keypad,column = <1>;
475 keypad,row = <1>;
476 keypad,column = <0>;
481 keypad,row = <1>;
[all …]
/linux/drivers/auxdisplay/
H A Dht16k33.c93 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/input/
H A Domap-keypad.txt4 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 Dbrcm,bcm-keypad.txt4 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 Dclps711x-keypad.txt1 * 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 Dst-keyscan.txt22 - 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>;
H A Dpxa27x-keypad.txt4 - compatible : should be "marvell,pxa27x-keypad"
6 - interrupts : The interrupt for the keypad controller
38 keypad: keypad@d4012000 {
39 keypad,num-rows = <3>;
40 keypad,num-columns = <5>;
/linux/Documentation/devicetree/bindings/mfd/
H A Dtc3589x.txt4 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>;
/linux/Documentation/devicetree/bindings/goldfish/
H A Devents.txt3 Android goldfish events keypad device generated by android emulator.
7 - compatible : should contain "google,goldfish-events-keypad" to match emulator
14 compatible = "google,goldfish-events-keypad";

12345