Home
last modified time | relevance | path

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

12

/openbmc/linux/Documentation/devicetree/bindings/sound/
H A 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 …]
H A 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':
29 nuvoton,jkdet-polarity:
34 - 0 # active high
35 - 1 # active low
[all …]
/openbmc/linux/drivers/input/keyboard/
H A 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 …]
H A 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 …]
H A 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
63 u32 deb_clks; /* Debounce clocks (based on 32KHz clock) */
66 unsigned short *keymap; /* Pointer to key map for the scan matrix */
74 struct input_dev *input = kscandat->input; in lpc32xx_mod_states()
76 u8 key; in lpc32xx_mod_states() local
78 key = readl(LPC32XX_KS_DATA(kscandat->kscan_base, col)); in lpc32xx_mod_states()
79 changed = key ^ kscandat->lastkeystates[col]; in lpc32xx_mod_states()
[all …]
H A Domap4-keypad.c1 // SPDX-License-Identifier: GPL-2.0-or-later
53 * Errata i689: If a key is released for a time shorter than debounce time,
54 * the keyboard will idle and never detect the key release. The workaround
55 * is to use at least a 12ms debounce time. See omap5432 TRM chapter
60 ((((dbms) * 1000) / ((1 << ((ptv) + 1)) * (1000000 / 32768))) - 1)
76 struct mutex lock; /* for key scan */
85 unsigned short *keymap;
90 return __raw_readl(keypad_data->base + in kbd_readl()
91 keypad_data->reg_offset + offset); in kbd_readl()
97 keypad_data->base + keypad_data->reg_offset + offset); in kbd_writel()
[all …]
H A 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 …]
H A 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 …]
H A 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>
25 #include <linux/platform_data/gpio-omap.h>
26 #include <linux/platform_data/keypad-omap.h>
27 #include <linux/soc/ti/omap1-io.h>
37 static int kp_cur_group = -1;
46 unsigned int debounce; member
47 unsigned short keymap[];
79 for (col = 0; col < omap_kp->cols; col++) { in omap_kp_scan_keypad()
[all …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A Dep93xx_keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
11 * The 3-key reset is triggered by pressing the 3 keys in
15 * Normal operation for the matrix does not autorepeat the key press.
30 #include <linux/platform_data/keypad-ep93xx.h>
36 #define KEY_INIT 0x00 /* Key Scan Initialization register */
37 #define KEY_DIAG 0x04 /* Key Scan Diagnostic register */
38 #define KEY_REG 0x08 /* Key Value Capture register */
40 /* Key Scan Initialization Register bit defines */
50 /* Key Scan Diagnostic Register bit defines */
54 /* Key Value Capture Register bit defines */
[all …]
H A 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 …]
H A 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 …]
H A 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 */
60 unsigned short *keymap;
67 * There are 4 attributes under /sys/devices/platform/gpio-keys/
68 * keys [ro] - bitmap of keys (EV_KEY) which can be
70 * switches [ro] - bitmap of switches (EV_SW) which can be
72 * disabled_keys [rw] - bitmap of keys currently disabled
[all …]
H A Dnomadik-ske-keypad.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson SA 2010
5 * Author: Naveen Kumar G <naveen.gaddipati@stericsson.com> for ST-Ericsson
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
8 * Keypad controller driver for the SKE (Scroll Key Encoder) module used in
22 #include <linux/platform_data/keypad-nomadik-ske.h>
54 * struct ske_keypad - data structure used by keypad driver
69 unsigned short keymap[SKE_KPD_NUM_ROWS * SKE_KPD_NUM_COLS];
80 spin_lock(&keypad->ske_keypad_lock); in ske_keypad_set_bits()
82 ret = readl(keypad->reg_base + addr); in ske_keypad_set_bits()
[all …]
H A 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 …]
/openbmc/linux/include/linux/input/
H A Dmatrix_keypad.h1 /* SPDX-License-Identifier: GPL-2.0 */
13 #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ macro
14 (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\
24 * struct matrix_keymap_data - keymap for matrix keyboards
25 * @keymap: pointer to array of uint32 values encoded with KEY() macro
30 * keymaps to drivers that implement matrix-like keypads/keyboards.
38 * struct matrix_keypad_platform_data - platform-dependent keypad data
46 * @debounce_ms: debounce interval in milliseconds
53 * @no_autorepeat: disable key autorepeat
57 * This structure represents platform-specific data that use used by
[all …]
H A 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 …]
/openbmc/u-boot/arch/arm/dts/
H A Drk3288-tinker.dtsi2 * This file is dual-licensed: you can use it either under the terms
49 ext_gmac: external-gmac-clock {
50 compatible = "fixed-clock";
51 clock-frequency = <125000000>;
52 clock-output-names = "ext_gmac";
53 #clock-cells = <0>;
56 gpio-keys {
57 compatible = "gpio-keys";
60 pinctrl-names = "default";
61 pinctrl-0 = <&pwrbtn>;
[all …]
/openbmc/linux/sound/soc/codecs/
H A 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 …]
H A 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 …]

12