Home
last modified time | relevance | path

Searched full:keypad (Results 1 – 25 of 489) sorted by relevance

12345678910>>...20

/kernel/linux/linux-5.10/drivers/input/keyboard/
Dep93xx_keypad.c3 * Driver for the Cirrus EP93xx matrix keypad controller.
7 * Based on the pxa27x matrix keypad controller by Rodolfo Giometti.
28 #include <linux/platform_data/keypad-ep93xx.h>
31 * Keypad Interface Register offsets
82 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()
[all …]
Dsamsung-keypad.c3 * Samsung keypad driver
23 #include <linux/input/samsung-keypad.h>
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
[all …]
Dnomadik-ske-keypad.c8 * Keypad controller driver for the SKE (Scroll Key Encoder) module used in
22 #include <linux/platform_data/keypad-nomadik-ske.h>
44 /* keypad auto scan registers */
54 * struct ske_keypad - data structure used by keypad driver
58 * @board: keypad platform device
73 static void ske_keypad_set_bits(struct ske_keypad *keypad, u16 addr, in ske_keypad_set_bits() argument
78 spin_lock(&keypad->ske_keypad_lock); in ske_keypad_set_bits()
80 ret = readl(keypad->reg_base + addr); in ske_keypad_set_bits()
83 writel(ret, keypad->reg_base + addr); in ske_keypad_set_bits()
85 spin_unlock(&keypad->ske_keypad_lock); in ske_keypad_set_bits()
[all …]
Dimx_keypad.c3 // Driver for the IMX keypad port.
22 * Keypad Controller registers (halfword)
24 #define KPCR 0x00 /* Keypad Control Register */
26 #define KPSR 0x02 /* Keypad Status Register */
33 #define KBD_STAT_KPPEN (0x1 << 10) /* Keypad Clock Enable */
35 #define KDDR 0x04 /* Keypad Data Direction Register */
36 #define KPDR 0x06 /* Keypad Data Register */
78 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()
88 * Discharge keypad capacitance: in imx_keypad_scan_matrix()
[all …]
Dpxa27x_keypad.c29 #include <linux/platform_data/keypad-pxa27x.h>
31 * Keypad Controller registers
33 #define KPC 0x0000 /* Keypad Control register */
34 #define KPDK 0x0008 /* Keypad Direct Key register */
35 #define KPREC 0x0010 /* Keypad Rotary Encoder register */
36 #define KPMK 0x0018 /* Keypad Matrix Key register */
37 #define KPAS 0x0020 /* Keypad Automatic Scan register */
39 /* Keypad Automatic Scan Multiple Key Presser register 0-3 */
59 #define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
61 #define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
[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 …]
Dtc3589x-keypad.c8 * TC35893 MFD Keypad Controller driver
21 /* Maximum supported keypad matrix row/columns size */
25 /* keypad related Constants */
73 * struct tc35893_keypad_platform_data - platform specific keypad data
80 * @enable_wakeup: specifies if keypad event can wake up system from sleep
95 * struct tc_keypad - data structure used by keypad driver
98 * @board: keypad platform device
102 * @keypad_stopped: holds keypad status
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()
[all …]
Dstmpe-keypad.c115 * struct stmpe_keypad - STMPE keypad state container
140 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
[all …]
/kernel/linux/linux-6.6/drivers/input/keyboard/
Dsamsung-keypad.c3 * Samsung keypad driver
23 #include <linux/input/samsung-keypad.h>
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
[all …]
Dep93xx_keypad.c3 * Driver for the Cirrus EP93xx matrix keypad controller.
7 * Based on the pxa27x matrix keypad controller by Rodolfo Giometti.
30 #include <linux/platform_data/keypad-ep93xx.h>
34 * Keypad Interface Register offsets
85 struct ep93xx_keypad *keypad = dev_id; in ep93xx_keypad_irq_handler() local
86 struct input_dev *input_dev = keypad->input_dev; in ep93xx_keypad_irq_handler()
90 status = __raw_readl(keypad->mmio_base + KEY_REG); in ep93xx_keypad_irq_handler()
93 key1 = keypad->keycodes[keycode]; in ep93xx_keypad_irq_handler()
96 key2 = keypad->keycodes[keycode]; in ep93xx_keypad_irq_handler()
99 if (keypad->key1 && key1 != keypad->key1 && key2 != keypad->key1) in ep93xx_keypad_irq_handler()
[all …]
Dnomadik-ske-keypad.c8 * Keypad controller driver for the SKE (Scroll Key Encoder) module used in
22 #include <linux/platform_data/keypad-nomadik-ske.h>
44 /* keypad auto scan registers */
54 * struct ske_keypad - data structure used by keypad driver
58 * @board: keypad platform device
62 * @ske_keypad_lock: spinlock protecting the keypad read/writes
75 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()
[all …]
Dimx_keypad.c3 // Driver for the IMX keypad port.
23 * Keypad Controller registers (halfword)
25 #define KPCR 0x00 /* Keypad Control Register */
27 #define KPSR 0x02 /* Keypad Status Register */
34 #define KBD_STAT_KPPEN (0x1 << 10) /* Keypad Clock Enable */
36 #define KDDR 0x04 /* Keypad Data Direction Register */
37 #define KPDR 0x06 /* Keypad Data Register */
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()
89 * Discharge keypad capacitance: in imx_keypad_scan_matrix()
[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 …]
Dmt6779-keypad.c16 #define MTK_KPD_NAME "mt6779-keypad"
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()
[all …]
Dpxa27x_keypad.c29 #include <linux/platform_data/keypad-pxa27x.h>
31 * Keypad Controller registers
33 #define KPC 0x0000 /* Keypad Control register */
34 #define KPDK 0x0008 /* Keypad Direct Key register */
35 #define KPREC 0x0010 /* Keypad Rotary Encoder register */
36 #define KPMK 0x0018 /* Keypad Matrix Key register */
37 #define KPAS 0x0020 /* Keypad Automatic Scan register */
39 /* Keypad Automatic Scan Multiple Key Presser register 0-3 */
59 #define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
61 #define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
[all …]
Dmatrix_keypad.c86 static void enable_row_irqs(struct matrix_keypad *keypad) in enable_row_irqs() argument
88 const struct matrix_keypad_platform_data *pdata = keypad->pdata; in enable_row_irqs()
99 static void disable_row_irqs(struct matrix_keypad *keypad) in disable_row_irqs() argument
101 const struct matrix_keypad_platform_data *pdata = keypad->pdata; in disable_row_irqs()
117 struct matrix_keypad *keypad = in matrix_keypad_scan() local
119 struct input_dev *input_dev = keypad->input_dev; in matrix_keypad_scan()
121 const struct matrix_keypad_platform_data *pdata = keypad->pdata; in matrix_keypad_scan()
148 bits_changed = keypad->last_key_state[col] ^ new_state[col]; in matrix_keypad_scan()
156 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in matrix_keypad_scan()
165 memcpy(keypad->last_key_state, new_state, sizeof(new_state)); in matrix_keypad_scan()
[all …]
Dtc3589x-keypad.c8 * TC35893 MFD Keypad Controller driver
21 /* Maximum supported keypad matrix row/columns size */
25 /* keypad related Constants */
73 * struct tc3589x_keypad_platform_data - platform specific keypad data
80 * @enable_wakeup: specifies if keypad event can wake up system from sleep
95 * struct tc_keypad - data structure used by keypad driver
98 * @board: keypad platform device
102 * @keypad_stopped: holds keypad status
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()
[all …]
Dstmpe-keypad.c116 * struct stmpe_keypad - STMPE keypad state container
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
[all …]
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 …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/input/
Dsamsung-keypad.txt1 * Samsung's Keypad Controller device tree bindings
3 Samsung's Keypad controller is used to interface a SoC with a matrix-type
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
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
[all …]
Domap-keypad.txt1 * TI's Keypad Controller device tree bindings
3 TI's Keypad controller is used to interface a SoC with a matrix-type
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>;
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/input/
Dsamsung-keypad.txt1 * Samsung's Keypad Controller device tree bindings
3 Samsung's Keypad controller is used to interface a SoC with a matrix-type
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
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
[all …]
Domap-keypad.txt1 * TI's Keypad Controller device tree bindings
3 TI's Keypad controller is used to interface a SoC with a matrix-type
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>;
[all …]
/kernel/linux/linux-5.10/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 …]

12345678910>>...20