Home
last modified time | relevance | path

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

12345

/Linux-v5.15/drivers/input/keyboard/
Dep93xx_keypad.c82 struct ep93xx_keypad *keypad = dev_id; in ep93xx_keypad_irq_handler() local
83 struct input_dev *input_dev = keypad->input_dev; in ep93xx_keypad_irq_handler()
87 status = __raw_readl(keypad->mmio_base + KEY_REG); in ep93xx_keypad_irq_handler()
90 key1 = keypad->keycodes[keycode]; in ep93xx_keypad_irq_handler()
93 key2 = keypad->keycodes[keycode]; in ep93xx_keypad_irq_handler()
96 if (keypad->key1 && key1 != keypad->key1 && key2 != keypad->key1) in ep93xx_keypad_irq_handler()
97 input_report_key(input_dev, keypad->key1, 0); in ep93xx_keypad_irq_handler()
99 if (keypad->key2 && key1 != keypad->key2 && key2 != keypad->key2) in ep93xx_keypad_irq_handler()
100 input_report_key(input_dev, keypad->key2, 0); in ep93xx_keypad_irq_handler()
105 keypad->key1 = key1; in ep93xx_keypad_irq_handler()
[all …]
Dimx_keypad.c78 static void imx_keypad_scan_matrix(struct imx_keypad *keypad, in imx_keypad_scan_matrix() argument
85 if ((keypad->cols_en_mask & (1 << col)) == 0) in imx_keypad_scan_matrix()
93 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
95 writew(reg_val, keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
97 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
98 reg_val &= ~((keypad->cols_en_mask & 0xff) << 8); in imx_keypad_scan_matrix()
99 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
103 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
104 reg_val |= (keypad->cols_en_mask & 0xff) << 8; in imx_keypad_scan_matrix()
105 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
[all …]
Dsamsung-keypad.c79 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 …]
Dnomadik-ske-keypad.c75 static void ske_keypad_set_bits(struct ske_keypad *keypad, u16 addr, in ske_keypad_set_bits() argument
80 spin_lock(&keypad->ske_keypad_lock); in ske_keypad_set_bits()
82 ret = readl(keypad->reg_base + addr); in ske_keypad_set_bits()
85 writel(ret, keypad->reg_base + addr); in ske_keypad_set_bits()
87 spin_unlock(&keypad->ske_keypad_lock); in ske_keypad_set_bits()
95 static int __init ske_keypad_chip_init(struct ske_keypad *keypad) in ske_keypad_chip_init() argument
98 int timeout = keypad->board->debounce_ms; in ske_keypad_chip_init()
101 while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--) in ske_keypad_chip_init()
112 spin_lock(&keypad->ske_keypad_lock); in ske_keypad_chip_init()
113 value = readl(keypad->reg_base + SKE_DBCR); in ske_keypad_chip_init()
[all …]
Dpxa27x_keypad.c90 #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 …]
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 …]
Dmatrix_keypad.c85 static void enable_row_irqs(struct matrix_keypad *keypad) in enable_row_irqs() argument
87 const struct matrix_keypad_platform_data *pdata = keypad->pdata; in enable_row_irqs()
98 static void disable_row_irqs(struct matrix_keypad *keypad) in disable_row_irqs() argument
100 const struct matrix_keypad_platform_data *pdata = keypad->pdata; in disable_row_irqs()
116 struct matrix_keypad *keypad = in matrix_keypad_scan() local
118 struct input_dev *input_dev = keypad->input_dev; in matrix_keypad_scan()
120 const struct matrix_keypad_platform_data *pdata = keypad->pdata; in matrix_keypad_scan()
144 bits_changed = keypad->last_key_state[col] ^ new_state[col]; in matrix_keypad_scan()
152 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in matrix_keypad_scan()
161 memcpy(keypad->last_key_state, new_state, sizeof(new_state)); in matrix_keypad_scan()
[all …]
Dstmpe-keypad.c140 static int stmpe_keypad_read_data(struct stmpe_keypad *keypad, u8 *data) in stmpe_keypad_read_data() argument
142 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_read_data()
143 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_read_data()
164 struct stmpe_keypad *keypad = dev; in stmpe_keypad_irq() local
165 struct input_dev *input = keypad->input; in stmpe_keypad_irq()
166 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_irq()
171 ret = stmpe_keypad_read_data(keypad, fifo); in stmpe_keypad_irq()
187 input_report_key(input, keypad->keymap[code], !up); in stmpe_keypad_irq()
194 static int stmpe_keypad_altfunc_init(struct stmpe_keypad *keypad) in stmpe_keypad_altfunc_init() argument
196 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_altfunc_init()
[all …]
Dst-keyscan.c41 struct st_keyscan *keypad = dev_id; in keyscan_isr() local
42 unsigned short *keycode = keypad->input_dev->keycode; in keyscan_isr()
46 state = readl(keypad->base + KEYSCAN_MATRIX_STATE_OFF) & 0xffff; in keyscan_isr()
47 change = keypad->last_state ^ state; in keyscan_isr()
48 keypad->last_state = state; in keyscan_isr()
51 input_report_key(keypad->input_dev, in keyscan_isr()
54 input_sync(keypad->input_dev); in keyscan_isr()
59 static int keyscan_start(struct st_keyscan *keypad) in keyscan_start() argument
63 error = clk_enable(keypad->clk); in keyscan_start()
67 writel(keypad->debounce_us * (clk_get_rate(keypad->clk) / 1000000), in keyscan_start()
[all …]
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 …]
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()
163 struct max7359_keypad *keypad; in max7359_probe() local
[all …]
DMakefile16 obj-$(CONFIG_KEYBOARD_BCM) += bcm-keypad.o
18 obj-$(CONFIG_KEYBOARD_CLPS711X) += clps711x-keypad.o
26 obj-$(CONFIG_KEYBOARD_TCA6416) += tca6416-keypad.o
48 obj-$(CONFIG_KEYBOARD_NOMADIK) += nomadik-ske-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
53 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-v5.15/Documentation/devicetree/bindings/input/
Dsamsung-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
11 - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad
13 - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad
22 - samsung,keypad-num-rows: Number of row lines connected to the keypad
25 - samsung,keypad-num-columns: Number of column lines connected to the
26 keypad controller.
28 - Keys represented as child nodes: Each key connected to the keypad
29 controller is represented as a child node to the keypad controller
31 - keypad,row: the row number to which the key is connected.
[all …]
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;
Dtwl4030-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,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>;
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 …]
Dqcom,pm8xxx-keypad.txt9 "qcom,pm8058-keypad"
10 "qcom,pm8921-keypad"
15 Definition: address of keypad control register
31 - linux,keypad-no-autorepeat:
39 Definition: use any event on keypad as wakeup event.
40 (Legacy property supported: "linux,keypad-wakeup")
42 - keypad,num-rows:
48 - keypad,num-columns:
74 keypad@148 {
75 compatible = "qcom,pm8921-keypad";
[all …]
Dgpio-matrix-keypad.txt1 * 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";
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";
/Linux-v5.15/arch/arm/boot/dts/
Dexynos4412-smdk4412.dts65 &keypad {
66 samsung,keypad-num-rows = <3>;
67 samsung,keypad-num-columns = <8>;
68 linux,keypad-no-autorepeat;
75 keypad,row = <1>;
76 keypad,column = <3>;
81 keypad,row = <1>;
82 keypad,column = <4>;
87 keypad,row = <1>;
88 keypad,column = <5>;
[all …]
Dexynos4210-smdkv310.dts84 &keypad {
85 samsung,keypad-num-rows = <2>;
86 samsung,keypad-num-columns = <8>;
87 linux,keypad-no-autorepeat;
94 keypad,row = <0>;
95 keypad,column = <3>;
100 keypad,row = <0>;
101 keypad,column = <4>;
106 keypad,row = <0>;
107 keypad,column = <5>;
[all …]
Ds5pv210-smdkv210.dts65 &keypad {
68 samsung,keypad-num-rows = <8>;
69 samsung,keypad-num-columns = <8>;
80 keypad,row = <0>;
81 keypad,column = <3>;
86 keypad,row = <0>;
87 keypad,column = <4>;
92 keypad,row = <0>;
93 keypad,column = <5>;
98 keypad,row = <0>;
[all …]
Ds3c64xx-pinctrl.dtsi448 keypad_col0_0: keypad-col0-0 {
454 keypad_col1_0: keypad-col1-0 {
460 keypad_col2_0: keypad-col2-0 {
466 keypad_col3_0: keypad-col3-0 {
472 keypad_col4_0: keypad-col4-0 {
478 keypad_col5_0: keypad-col5-0 {
484 keypad_col6_0: keypad-col6-0 {
490 keypad_col7_0: keypad-col7-0 {
496 keypad_col0_1: keypad-col0-1 {
502 keypad_col1_1: keypad-col1-1 {
[all …]
Ds5pv210-aquila.dts270 &keypad {
273 samsung,keypad-num-rows = <3>;
274 samsung,keypad-num-columns = <3>;
281 keypad,row = <0>;
282 keypad,column = <1>;
287 keypad,row = <0>;
288 keypad,column = <2>;
293 keypad,row = <1>;
294 keypad,column = <1>;
299 keypad,row = <1>;
[all …]
/Linux-v5.15/drivers/auxdisplay/
Dht16k33.c73 struct ht16k33_keypad keypad; member
244 static bool ht16k33_keypad_scan(struct ht16k33_keypad *keypad) in ht16k33_keypad_scan() argument
246 const unsigned short *keycodes = keypad->dev->keycode; in ht16k33_keypad_scan()
254 rc = i2c_smbus_read_i2c_block_data(keypad->client, 0x40, in ht16k33_keypad_scan()
257 dev_err(&keypad->client->dev, in ht16k33_keypad_scan()
262 for (col = 0; col < keypad->cols; col++) { in ht16k33_keypad_scan()
266 bits_changed = keypad->last_key_state[col] ^ new_state[col]; in ht16k33_keypad_scan()
269 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in ht16k33_keypad_scan()
270 input_event(keypad->dev, EV_MSC, MSC_SCAN, code); in ht16k33_keypad_scan()
271 input_report_key(keypad->dev, keycodes[code], in ht16k33_keypad_scan()
[all …]

12345