Home
last modified time | relevance | path

Searched +full:short +full:- +full:key +full:- +full:debounce (Results 1 – 25 of 32) sorted by relevance

12

/linux-6.12.1/Documentation/devicetree/bindings/sound/
Dnuvoton,nau8825.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - John Hsu <KCHSU0@nuvoton.com>
13 - $ref: dai-common.yaml#
18 - nuvoton,nau8825
26 nuvoton,jkdet-enable:
31 nuvoton,jkdet-pull-enable:
34 If set - pin pull enabled, otherwise pin in high impedance state.
37 nuvoton,jkdet-pull-up:
[all …]
Dnuvoton,nau8824.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - John Hsu <KCHSU0@nuvoton.com>
13 - $ref: dai-common.yaml#
18 - nuvoton,nau8824
23 '#sound-dai-cells':
28 - description: The phandle of the master clock to the CODEC
30 clock-names:
32 - const: mclk
[all …]
/linux-6.12.1/drivers/input/keyboard/
Dmt6779-keypad.c1 // SPDX-License-Identifier: GPL-2.0
16 #define MTK_KPD_NAME "mt6779-keypad"
36 void (*calc_row_col)(unsigned int key,
51 const unsigned short *keycode = keypad->input_dev->keycode; in mt6779_keypad_irq_handler()
54 unsigned int bit_nr, key; in mt6779_keypad_irq_handler() local
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()
68 * indicate key status. in mt6779_keypad_irq_handler()
73 key = bit_nr / 32 * 16 + bit_nr % 32; in mt6779_keypad_irq_handler()
[all …]
Dpxa27x_keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
29 #include <linux/platform_data/keypad-pxa27x.h>
34 #define KPDK 0x0008 /* Keypad Direct Key register */
36 #define KPMK 0x0018 /* Keypad Matrix Key register */
39 /* Keypad Automatic Scan Multiple Key Presser register 0-3 */
47 #define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
48 #define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
49 #define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
54 #define KPC_IMKP (0x1 << 21) /* Ignore Multiple Key Press */
61 #define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
[all …]
Dep93xx_keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
28 #define KEY_INIT 0x00 /* Key Scan Initialization register */
29 #define KEY_DIAG 0x04 /* Key Scan Diagnostic register */
30 #define KEY_REG 0x08 /* Key Value Capture register */
32 /* Key Scan Initialization Register bit defines */
42 /* Key Scan Diagnostic Register bit defines */
46 /* Key Value Capture Register bit defines */
64 unsigned int debounce; member
69 unsigned short keycodes[EP93XX_MATRIX_SIZE];
82 struct input_dev *input_dev = keypad->input_dev; in ep93xx_keypad_irq_handler()
[all …]
Dlpc32xx-keys.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * NXP LPC32xx SoC Key Scan Interface
12 * This controller supports square key matrices from 1x1 up to 8x8
30 * Key scanner register offsets
62 u32 deb_clks; /* Debounce clocks (based on 32KHz clock) */
66 unsigned short *keymap; /* Pointer to key map for the scan matrix */
73 struct input_dev *input = kscandat->input; in lpc32xx_mod_states()
75 u8 key; in lpc32xx_mod_states() local
77 key = readl(LPC32XX_KS_DATA(kscandat->kscan_base, col)); in lpc32xx_mod_states()
78 changed = key ^ kscandat->lastkeystates[col]; in lpc32xx_mod_states()
[all …]
Domap-keypad.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * linux/drivers/input/keyboard/omap-keypad.c
8 * Written by Timo Teräs <ext-timo.teras@nokia.com>
24 #include <linux/platform_data/gpio-omap.h>
25 #include <linux/platform_data/keypad-omap.h>
26 #include <linux/soc/ti/omap1-io.h>
36 static int kp_cur_group = -1;
45 unsigned int debounce; member
46 unsigned short keymap[];
75 for (col = 0; col < omap_kp->cols; col++) { in omap_kp_scan_keypad()
[all …]
Dlm8323.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2007-2009 Nokia Corporation
50 #define INT_KEYPAD 0x01 /* Key event. */
84 /* Key event fifo length */
88 /* Load ramp counter from duty cycle field (range 0 - 0xff). */
142 unsigned short keymap[LM8323_KEYMAP_SIZE];
151 #define dev_to_lm8323(d) container_of(d, struct lm8323_chip, client->dev)
171 dev_err(&lm->client->dev, "tried to send %d bytes\n", len); in lm8323_write()
185 ret = i2c_master_send(lm->client, data, len); in lm8323_write()
186 if (unlikely(ret == -EREMOTEIO)) in lm8323_write()
[all …]
Dimx_keypad.c1 // SPDX-License-Identifier: GPL-2.0
28 #define KBD_STAT_KPKD (0x1 << 0) /* Key Press Interrupt Status bit (w1c) */
29 #define KBD_STAT_KPKR (0x1 << 1) /* Key Release Interrupt Status bit (w1c) */
30 #define KBD_STAT_KDSC (0x1 << 2) /* Key Depress Synch Chain Status bit (w1c)*/
31 #define KBD_STAT_KRSS (0x1 << 3) /* Key Release Synch Status bit (w1c)*/
32 #define KBD_STAT_KDIE (0x1 << 8) /* Key Depress Interrupt Enable Status bit */
33 #define KBD_STAT_KRIE (0x1 << 9) /* Key Release Interrupt Enable */
64 unsigned short rows_en_mask;
65 unsigned short cols_en_mask;
67 unsigned short keycodes[MAX_MATRIX_KEY_NUM];
[all …]
Dtegra-kbc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (c) 2009-2011, NVIDIA Corporation.
100 unsigned short keycode[KBC_MAX_KEY * 2];
101 unsigned short current_keys[KBC_MAX_KPENT];
113 unsigned short old_keycodes[], in tegra_kbc_report_released_keys()
115 unsigned short new_keycodes[], in tegra_kbc_report_released_keys()
132 unsigned short keycodes[], in tegra_kbc_report_pressed_keys()
146 unsigned short keycodes[KBC_MAX_KPENT]; in tegra_kbc_report_keys()
156 val = readl(kbc->mmio + KBC_KP_ENT0_0 + i); in tegra_kbc_report_keys()
165 keycodes[num_down] = kbc->keycode[scancode]; in tegra_kbc_report_keys()
[all …]
Domap4-keypad.c1 // SPDX-License-Identifier: GPL-2.0-or-later
54 * Errata i689: If a key is released for a time shorter than debounce time,
55 * the keyboard will idle and never detect the key release. The workaround
56 * is to use at least a 12ms debounce time. See omap5432 TRM chapter
61 ((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
77 struct mutex lock; /* for key scan */
86 unsigned short *keymap;
92 return __raw_readl(keypad_data->base + in kbd_readl()
93 keypad_data->reg_offset + offset); in kbd_readl()
99 keypad_data->base + keypad_data->reg_offset + offset); in kbd_writel()
[all …]
Dmax7359_keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * max7359_keypad.c - MAX7359 Key Switch Controller Driver
10 * Datasheet: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5456
57 /* matrix key code map */
58 unsigned short keycodes[MAX7359_MAX_KEY_NUM];
69 dev_err(&client->dev, "%s: reg 0x%x, val 0x%x, err %d\n", in max7359_write_reg()
79 dev_err(&client->dev, "%s: reg 0x%x, err %d\n", in max7359_read_reg()
84 /* runs in an IRQ thread -- can (and will!) sleep */
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()
[all …]
Dtc3589x-keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
73 * struct tc3589x_keypad_platform_data - platform specific keypad data
77 * @debounce_period: platform specific debounce time
95 * struct tc_keypad - data structure used by keypad driver
110 unsigned short *keymap;
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()
121 if (board->kcol > TC3589x_MAX_KPCOL || board->krow > TC3589x_MAX_KPROW) in tc3589x_keypad_init_key_hardware()
122 return -EINVAL; in tc3589x_keypad_init_key_hardware()
[all …]
Dst-keyscan.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * STMicroelectronics Key Scanning driver
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()
65 error = clk_enable(keypad->clk); in keyscan_start()
69 writel(keypad->debounce_us * (clk_get_rate(keypad->clk) / 1000000), in keyscan_start()
[all …]
Dstmpe-keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
5 * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
61 * struct stmpe_keypad_variant - model-specific attributes
63 * auto-increments on multiple read
64 * @set_pullup: whether the pins need to have their pull-ups set
90 .col_gpios = 0x000ff, /* GPIO 0 - 7 */
91 .row_gpios = 0x0ff00, /* GPIO 8 - 15 */
100 .col_gpios = 0x0000ff, /* GPIO 0 - 7*/
101 .row_gpios = 0x1f7f00, /* GPIO 8-14, 16-20 */
[all …]
Dmatrix_keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
30 /* key debounce interval in milli-second */
52 * HiZ when de-activated to cause minmal side effect when scanning other
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()
71 if (on && keypad->col_scan_delay_us) in activate_col()
72 udelay(keypad->col_scan_delay_us); in activate_col()
79 for (col = 0; col < keypad->num_col_gpios; col++) in activate_all_cols()
[all …]
Dpmic8xxx-keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
69 * '0' for key press
70 * '1' for key release
78 * struct pmic8xxx_kp - internal keypad data structure
83 * @key_sense_irq: key press/release irq number
84 * @key_stuck_irq: key stuck notification irq number
85 * @keycodes: array to hold the key codes
87 * @keystate: present key press/release state
88 * @stuckstate: present state when key stuck irq
[all …]
Dadp5588-keys.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * Copyright (C) 2008-2010 Analog Devices Inc.
24 #include <linux/pinctrl/pinconf-generic.h>
34 #define KEY_LCK_EC_STAT 0x03 /* Key Lock and Event Counter Register */
35 #define KEY_EVENTA 0x04 /* Key Event Register A */
36 #define KEY_EVENTB 0x05 /* Key Event Register B */
37 #define KEY_EVENTC 0x06 /* Key Event Register C */
38 #define KEY_EVENTD 0x07 /* Key Event Register D */
39 #define KEY_EVENTE 0x08 /* Key Event Register E */
40 #define KEY_EVENTF 0x09 /* Key Event Register F */
[all …]
Dgpio_keys.c1 // SPDX-License-Identifier: GPL-2.0-only
31 #include <dt-bindings/input/gpio-keys.h>
38 unsigned short *code;
41 unsigned int release_delay; /* in msecs, for IRQ-only buttons */
45 unsigned int software_debounce; /* in msecs, for GPIO-driven buttons */
62 unsigned short *keymap;
69 * There are 4 attributes under /sys/devices/platform/gpio-keys/
70 * keys [ro] - bitmap of keys (EV_KEY) which can be
72 * switches [ro] - bitmap of switches (EV_SW) which can be
74 * disabled_keys [rw] - bitmap of keys currently disabled
[all …]
Dtwl4030_keypad.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * twl4030_keypad.c - driver for 8x8 keypad controller in twl4030 chips
8 * Code re-written for 2430SDP by:
27 * events, since it uses only the always-on 32KiHz oscillator, and has
29 * multi-key combinations.
48 unsigned short keymap[TWL4030_KEYMAP_SIZE];
59 /*----------------------------------------------------------------------*/
100 #define KEYP_PERIOD_US(t, prescale) ((t) / (31 << ((prescale) + 1)) - 1)
123 /*----------------------------------------------------------------------*/
131 dev_warn(kp->dbg_dev, in twl4030_kpread()
[all …]
/linux-6.12.1/include/linux/input/
Dadp5589.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright 2010-2011 Analog Devices Inc.
47 #define ADP5589_GPIMAPSIZE_MAX (ADP5589_GPI_PIN_END - ADP5589_GPI_PIN_BASE + 1)
76 #define ADP5585_GPIMAPSIZE_MAX (ADP5585_GPI_PIN_END - ADP5585_GPI_PIN_BASE + 1)
79 unsigned short pin;
80 unsigned short sw_evt;
114 * ---------------- BIT ------------------
131 * ---- BIT -- -----------
150 const unsigned short *keymap; /* Pointer to keymap */
151 unsigned short keymapsize; /* Keymap size */
[all …]
/linux-6.12.1/sound/soc/codecs/
Darizona-jack.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * extcon-arizona.c - Extcon driver Wolfson Arizona devices
5 * Copyright (C) 2012-2014 Wolfson Microelectronics plc
26 #include <dt-bindings/mfd/arizona.h>
33 * The hardware supports 8 ranges / buttons, but the snd-jack interface
34 * only supports 6 buttons (button 0-5).
76 { .max = 11, .key = BTN_0 },
77 { .max = 28, .key = BTN_1 },
78 { .max = 54, .key = BTN_2 },
79 { .max = 100, .key = BTN_3 },
[all …]
Dnau8824.c1 // SPDX-License-Identifier: GPL-2.0-only
35 static int quirk_override = -1;
37 MODULE_PARM_DESC(quirk, "Board-specific quirk override");
211 ret = down_timeout(&nau8824->jd_sem, timeout); in nau8824_sema_acquire()
213 dev_warn(nau8824->dev, "Acquire semaphore timeout\n"); in nau8824_sema_acquire()
215 ret = down_interruptible(&nau8824->jd_sem); in nau8824_sema_acquire()
217 dev_warn(nau8824->dev, "Acquire semaphore fail\n"); in nau8824_sema_acquire()
225 up(&nau8824->jd_sem); in nau8824_sema_release()
304 "Off", "NC", "u-law", "A-law" };
359 static const DECLARE_TLV_DB_MINMAX(hp_vol_tlv, -3000, 0);
[all …]
Dnau8825.c1 // SPDX-License-Identifier: GPL-2.0-only
8 * Co-author: Meng-Huang Kuo <mhkuo@nuvoton.com>
35 #define NUVOTON_CODEC_DAI "nau8825-hifi"
223 * nau8825_sema_acquire - acquire the semaphore of nau88l25
233 * this function returns -ETIME. If the sleep is interrupted by a signal,
234 * this function will return -EINTR. It returns 0 if the semaphore was
246 ret = down_timeout(&nau8825->xtalk_sem, timeout); in nau8825_sema_acquire()
248 dev_warn(nau8825->dev, "Acquire semaphore timeout\n"); in nau8825_sema_acquire()
250 ret = down_trylock(&nau8825->xtalk_sem); in nau8825_sema_acquire()
252 dev_warn(nau8825->dev, "Acquire semaphore fail\n"); in nau8825_sema_acquire()
[all …]
/linux-6.12.1/drivers/auxdisplay/
Dht16k33.c1 // SPDX-License-Identifier: GPL-2.0
30 #include "line-display.h"
140 uint8_t data = REG_DISPLAY_SETUP | REG_DISPLAY_SETUP_ON | priv->blink; in ht16k33_display_on()
142 return i2c_smbus_write_byte(priv->client, data); in ht16k33_display_on()
147 return i2c_smbus_write_byte(priv->client, REG_DISPLAY_SETUP); in ht16k33_display_off()
156 priv->blink = REG_DISPLAY_SETUP_BLINK_OFF; in ht16k33_brightness_set()
164 return i2c_smbus_write_byte(priv->client, in ht16k33_brightness_set()
165 REG_BRIGHTNESS | (brightness - 1)); in ht16k33_brightness_set()
198 err = i2c_smbus_write_byte(priv->client, in ht16k33_blink_set()
204 priv->blink = blink; in ht16k33_blink_set()
[all …]

12