Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'input-for-v6.16-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

- support for game controllers requiring delayed initialization
packets, such as ByoWave Proteus, in xpad driver

- a change to atkbd driver to not reset the keyboard on Loongson
devices

- tweaks to gpio-keys and matrix_keypad drivers

- fixes to documentation for Amiga joysticks

- a fix to ims-pcu driver to better handle malformed firmware

* tag 'input-for-v6.16-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: ims-pcu - check record size in ims_pcu_flash_firmware()
Input: gpio-keys - fix possible concurrent access in gpio_keys_irq_timer()
Input: gpio-keys - fix a sleep while atomic with PREEMPT_RT
Input: amijoy - make headings compliant w/ guidelines in documentation
Input: amijoy - fix grammar in documentation
Input: amijoy - fix Amiga 4-joystick adapter pinout in documentation
Input: amijoy - fix broken table formatting in documentation
Input: atkbd - do not reset keyboard by default on Loongson
Input: xpad - send LED and auth done packets to all Xbox One controllers
Input: xpad - add the ByoWave Proteus controller
Input: xpad - allow delaying init packets
MAINTAINERS: update dlg,da72??.txt to yaml
dt-bindings: input: convert dlg,da7280.txt to dt-schema
dt-bindings: input: touchscreen: edt-ft5x06: use unevaluatedProperties
Input: snvs_pwrkey - support power-off-time-sec
dt-bindings: crypto: fsl,sec-v4.0-mon: Add "power-off-time-sec"
Input: matrix_keypad - detect change during scan
Input: matrix_keypad - add function for reading row state

+425 -194
+5
Documentation/devicetree/bindings/crypto/fsl,sec-v4.0-mon.yaml
··· 83 83 by SNVS ONOFF, the driver can report the status of POWER key and wakeup 84 84 system if pressed after system suspend. 85 85 86 + $ref: /schemas/input/input.yaml 87 + 86 88 properties: 87 89 compatible: 88 90 const: fsl,sec-v4.0-pwrkey ··· 112 110 linux,keycodes: 113 111 maxItems: 1 114 112 default: 116 113 + 114 + power-off-time-sec: 115 + enum: [0, 5, 10, 15] 115 116 116 117 required: 117 118 - compatible
-108
Documentation/devicetree/bindings/input/dlg,da7280.txt
··· 1 - Dialog Semiconductor DA7280 Haptics bindings 2 - 3 - Required properties: 4 - - compatible: Should be "dlg,da7280". 5 - - reg: Specifies the I2C slave address. 6 - 7 - - interrupt-parent : Specifies the phandle of the interrupt controller to 8 - which the IRQs from DA7280 are delivered to. 9 - 10 - - dlg,actuator-type: Set Actuator type. it should be one of: 11 - "LRA" - Linear Resonance Actuator type. 12 - "ERM-bar" - Bar type Eccentric Rotating Mass. 13 - "ERM-coin" - Coin type Eccentric Rotating Mass. 14 - 15 - - dlg,const-op-mode: Haptic operation mode for FF_CONSTANT. 16 - Possible values: 17 - 1 - Direct register override(DRO) mode triggered by i2c(default), 18 - 2 - PWM data source mode controlled by PWM duty, 19 - - dlg,periodic-op-mode: Haptic operation mode for FF_PERIODIC. 20 - Possible values: 21 - 1 - Register triggered waveform memory(RTWM) mode, the pattern 22 - assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP, 23 - 2 - Edge triggered waveform memory(ETWM) mode, external GPI(N) 24 - control are required to enable/disable and it needs to keep 25 - device enabled by sending magnitude (X > 0), 26 - the pattern is assigned to the GPI(N)_SEQUENCE_ID below. 27 - The default value is 1 for both of the operation modes. 28 - For more details, please see the datasheet. 29 - 30 - - dlg,nom-microvolt: Nominal actuator voltage rating. 31 - Valid values: 0 - 6000000. 32 - - dlg,abs-max-microvolt: Absolute actuator maximum voltage rating. 33 - Valid values: 0 - 6000000. 34 - - dlg,imax-microamp: Actuator max current rating. 35 - Valid values: 0 - 252000. 36 - Default: 130000. 37 - - dlg,impd-micro-ohms: the impedance of the actuator in micro ohms. 38 - Valid values: 0 - 1500000000. 39 - 40 - Optional properties: 41 - - pwms : phandle to the physical PWM(Pulse Width Modulation) device. 42 - PWM properties should be named "pwms". And number of cell is different 43 - for each pwm device. 44 - (See Documentation/devicetree/bindings/pwm/pwm.txt 45 - for further information relating to pwm properties) 46 - 47 - - dlg,ps-seq-id: the PS_SEQ_ID(pattern ID in waveform memory inside chip) 48 - to play back when RTWM-MODE is enabled. 49 - Valid range: 0 - 15. 50 - - dlg,ps-seq-loop: the PS_SEQ_LOOP, Number of times the pre-stored sequence 51 - pointed to by PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated. 52 - Valid range: 0 - 15. 53 - - dlg,gpiN-seq-id: the GPI(N)_SEQUENCE_ID, pattern to play 54 - when gpi0 is triggered, 'N' must be 0 - 2. 55 - Valid range: 0 - 15. 56 - - dlg,gpiN-mode: the pattern mode which can select either 57 - "Single-pattern" or "Multi-pattern", 'N' must be 0 - 2. 58 - - dlg,gpiN-polarity: gpiN polarity which can be chosen among 59 - "Rising-edge", "Falling-edge" and "Both-edge", 60 - 'N' must be 0 - 2 61 - Haptic will work by this edge option in case of ETWM mode. 62 - 63 - - dlg,resonant-freq-hz: use in case of LRA. 64 - the frequency range: 50 - 300. 65 - Default: 205. 66 - 67 - - dlg,bemf-sens-enable: Enable for internal loop computations. 68 - - dlg,freq-track-enable: Enable for resonant frequency tracking. 69 - - dlg,acc-enable: Enable for active acceleration. 70 - - dlg,rapid-stop-enable: Enable for rapid stop. 71 - - dlg,amp-pid-enable: Enable for the amplitude PID. 72 - - dlg,mem-array: Customized waveform memory(patterns) data downloaded to 73 - the device during initialization. This is an array of 100 values(u8). 74 - 75 - For further information, see device datasheet. 76 - 77 - ====== 78 - 79 - Example: 80 - 81 - haptics: da7280-haptics@4a { 82 - compatible = "dlg,da7280"; 83 - reg = <0x4a>; 84 - interrupt-parent = <&gpio6>; 85 - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 86 - dlg,actuator-type = "LRA"; 87 - dlg,dlg,const-op-mode = <1>; 88 - dlg,dlg,periodic-op-mode = <1>; 89 - dlg,nom-microvolt = <2000000>; 90 - dlg,abs-max-microvolt = <2000000>; 91 - dlg,imax-microamp = <170000>; 92 - dlg,resonant-freq-hz = <180>; 93 - dlg,impd-micro-ohms = <10500000>; 94 - dlg,freq-track-enable; 95 - dlg,rapid-stop-enable; 96 - dlg,mem-array = < 97 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 98 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 99 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 100 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 101 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 102 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 103 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 104 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 105 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 106 - 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 107 - >; 108 - };
+248
Documentation/devicetree/bindings/input/dlg,da7280.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/dlg,da7280.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver 8 + 9 + maintainers: 10 + - Roy Im <roy.im.opensource@diasemi.com> 11 + 12 + properties: 13 + compatible: 14 + const: dlg,da7280 15 + 16 + reg: 17 + maxItems: 1 18 + description: I2C address of the device. 19 + 20 + interrupts: 21 + maxItems: 1 22 + 23 + dlg,actuator-type: 24 + enum: 25 + - LRA # Linear Resonance Actuator type 26 + - ERM-bar # Bar type Eccentric Rotating Mass 27 + - ERM-coin # Coin type Eccentric Rotating Mass 28 + 29 + dlg,const-op-mode: 30 + $ref: /schemas/types.yaml#/definitions/uint32 31 + enum: 32 + - 1 # Direct register override (DRO) mode triggered by i2c (default) 33 + - 2 # PWM data source mode controlled by PWM duty 34 + description: 35 + Haptic operation mode for FF_CONSTANT 36 + 37 + dlg,periodic-op-mode: 38 + $ref: /schemas/types.yaml#/definitions/uint32 39 + enum: 40 + - 1 # Register triggered waveform memory(RTWM) mode, the pattern 41 + # assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP 42 + - 2 # Edge triggered waveform memory(ETWM) mode, external GPI(N) 43 + # control are required to enable/disable and it needs to keep 44 + # device enabled by sending magnitude (X > 0), 45 + # the pattern is assigned to the GPI(N)_SEQUENCE_ID below 46 + default: 1 47 + description: 48 + Haptic operation mode for FF_PERIODIC. 49 + The default value is 1 for both of the operation modes. 50 + For more details, please see the datasheet 51 + 52 + dlg,nom-microvolt: 53 + minimum: 0 54 + maximum: 6000000 55 + description: 56 + Nominal actuator voltage rating 57 + 58 + dlg,abs-max-microvolt: 59 + minimum: 0 60 + maximum: 6000000 61 + description: 62 + Absolute actuator maximum voltage rating 63 + 64 + dlg,imax-microamp: 65 + minimum: 0 66 + maximum: 252000 67 + default: 130000 68 + description: 69 + Actuator max current rating 70 + 71 + dlg,impd-micro-ohms: 72 + minimum: 0 73 + maximum: 1500000000 74 + description: 75 + Impedance of the actuator 76 + 77 + pwms: 78 + maxItems: 1 79 + 80 + dlg,ps-seq-id: 81 + $ref: /schemas/types.yaml#/definitions/uint32 82 + minimum: 0 83 + maximum: 15 84 + description: 85 + The PS_SEQ_ID(pattern ID in waveform memory inside chip) 86 + to play back when RTWM-MODE is enabled 87 + 88 + dlg,ps-seq-loop: 89 + $ref: /schemas/types.yaml#/definitions/uint32 90 + minimum: 0 91 + maximum: 15 92 + description: 93 + The PS_SEQ_LOOP, Number of times the pre-stored sequence pointed to by 94 + PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated 95 + 96 + dlg,gpi0-seq-id: 97 + $ref: /schemas/types.yaml#/definitions/uint32 98 + minimum: 0 99 + maximum: 15 100 + description: 101 + the GPI0_SEQUENCE_ID, pattern to play when gpi0 is triggered 102 + 103 + dlg,gpi1-seq-id: 104 + $ref: /schemas/types.yaml#/definitions/uint32 105 + minimum: 0 106 + maximum: 15 107 + description: 108 + the GPI1_SEQUENCE_ID, pattern to play when gpi1 is triggered 109 + 110 + dlg,gpi2-seq-id: 111 + $ref: /schemas/types.yaml#/definitions/uint32 112 + minimum: 0 113 + maximum: 15 114 + description: 115 + the GPI2_SEQUENCE_ID, pattern to play when gpi2 is triggered 116 + 117 + dlg,gpi0-mode: 118 + enum: 119 + - Single-pattern 120 + - Multi-pattern 121 + description: 122 + Pattern mode for gpi0 123 + 124 + dlg,gpi1-mode: 125 + enum: 126 + - Single-pattern 127 + - Multi-pattern 128 + description: 129 + Pattern mode for gpi1 130 + 131 + dlg,gpi2-mode: 132 + enum: 133 + - Single-pattern 134 + - Multi-pattern 135 + description: 136 + Pattern mode for gpi2 137 + 138 + dlg,gpi0-polarity: 139 + enum: 140 + - Rising-edge 141 + - Falling-edge 142 + - Both-edge 143 + description: 144 + gpi0 polarity, Haptic will work by this edge option in case of ETWM mode 145 + 146 + dlg,gpi1-polarity: 147 + enum: 148 + - Rising-edge 149 + - Falling-edge 150 + - Both-edge 151 + description: 152 + gpi1 polarity, Haptic will work by this edge option in case of ETWM mode 153 + 154 + dlg,gpi2-polarity: 155 + enum: 156 + - Rising-edge 157 + - Falling-edge 158 + - Both-edge 159 + description: 160 + gpi2 polarity, Haptic will work by this edge option in case of ETWM mode 161 + 162 + dlg,resonant-freq-hz: 163 + minimum: 50 164 + maximum: 300 165 + default: 205 166 + 167 + dlg,bemf-sens-enable: 168 + $ref: /schemas/types.yaml#/definitions/flag 169 + description: 170 + Enable for internal loop computations 171 + 172 + dlg,freq-track-enable: 173 + $ref: /schemas/types.yaml#/definitions/flag 174 + description: 175 + Enable for resonant frequency tracking 176 + 177 + dlg,acc-enable: 178 + $ref: /schemas/types.yaml#/definitions/flag 179 + description: 180 + Enable for active acceleration 181 + 182 + dlg,rapid-stop-enable: 183 + $ref: /schemas/types.yaml#/definitions/flag 184 + description: 185 + Enable for rapid stop 186 + 187 + dlg,amp-pid-enable: 188 + $ref: /schemas/types.yaml#/definitions/flag 189 + description: 190 + Enable for the amplitude PID 191 + 192 + dlg,mem-array: 193 + $ref: /schemas/types.yaml#/definitions/uint32-array 194 + minItems: 100 195 + description: 196 + Customized waveform memory (patterns) data downloaded to the device during initialization. 197 + Each entry value must be included between 0 and 255. 198 + 199 + required: 200 + - compatible 201 + - reg 202 + - interrupts 203 + - dlg,actuator-type 204 + - dlg,const-op-mode 205 + - dlg,periodic-op-mode 206 + - dlg,nom-microvolt 207 + - dlg,abs-max-microvolt 208 + - dlg,imax-microamp 209 + - dlg,impd-micro-ohms 210 + 211 + additionalProperties: false 212 + 213 + examples: 214 + - | 215 + #include <dt-bindings/gpio/gpio.h> 216 + #include <dt-bindings/interrupt-controller/irq.h> 217 + 218 + i2c { 219 + #address-cells = <1>; 220 + #size-cells = <0>; 221 + 222 + haptics@4a { 223 + compatible = "dlg,da7280"; 224 + reg = <0x4a>; 225 + interrupt-parent = <&gpio6>; 226 + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 227 + dlg,actuator-type = "LRA"; 228 + dlg,const-op-mode = <1>; 229 + dlg,periodic-op-mode = <1>; 230 + dlg,nom-microvolt = <2000000>; 231 + dlg,abs-max-microvolt = <2000000>; 232 + dlg,imax-microamp = <170000>; 233 + dlg,resonant-freq-hz = <180>; 234 + dlg,impd-micro-ohms = <10500000>; 235 + dlg,freq-track-enable; 236 + dlg,rapid-stop-enable; 237 + dlg,mem-array = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 238 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 239 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 240 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 241 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 242 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 243 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 244 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 245 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 246 + 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>; 247 + }; 248 + };
+1 -8
Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml
··· 103 103 minimum: 0 104 104 maximum: 255 105 105 106 - touchscreen-size-x: true 107 - touchscreen-size-y: true 108 - touchscreen-fuzz-x: true 109 - touchscreen-fuzz-y: true 110 - touchscreen-inverted-x: true 111 - touchscreen-inverted-y: true 112 - touchscreen-swapped-x-y: true 113 106 interrupt-controller: true 114 107 115 - additionalProperties: false 108 + unevaluatedProperties: false 116 109 117 110 required: 118 111 - compatible
+67 -58
Documentation/input/devices/amijoy.rst
··· 1 - ~~~~~~~~~~~~~~~~~~~~~~~~~ 2 - Amiga joystick extensions 3 - ~~~~~~~~~~~~~~~~~~~~~~~~~ 1 + =============== 2 + Amiga joysticks 3 + =============== 4 4 5 + Pinouts 6 + ======= 5 7 6 - Amiga 4-joystick parport extension 7 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 8 + Amiga 4-joystick parallel port extension 9 + ---------------------------------------- 8 10 9 11 Parallel port pins: 10 - 11 12 12 13 ===== ======== ==== ========== 13 14 Pin Meaning Pin Meaning ··· 18 17 4 Left1 8 Left2 19 18 5 Right1 9 Right2 20 19 13 Fire1 11 Fire2 21 - 18 Gnd1 18 Gnd2 20 + 19 Gnd1 18 Gnd2 22 21 ===== ======== ==== ========== 23 22 24 - Amiga digital joystick pinout 25 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 + Amiga digital joystick 24 + ---------------------- 26 25 27 26 === ============ 28 27 Pin Meaning ··· 38 37 9 Thumb button 39 38 === ============ 40 39 41 - Amiga mouse pinout 42 - ~~~~~~~~~~~~~~~~~~ 40 + Amiga mouse 41 + ----------- 43 42 44 43 === ============ 45 44 Pin Meaning ··· 55 54 9 Right button 56 55 === ============ 57 56 58 - Amiga analog joystick pinout 59 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 57 + Amiga analog joystick 58 + --------------------- 60 59 61 60 === ============== 62 61 Pin Meaning ··· 72 71 9 Analog Y 73 72 === ============== 74 73 75 - Amiga lightpen pinout 76 - ~~~~~~~~~~~~~~~~~~~~~ 74 + Amiga lightpen 75 + -------------- 77 76 78 77 === ============= 79 78 Pin Meaning ··· 89 88 9 Stylus button 90 89 === ============= 91 90 92 - ------------------------------------------------------------------------------- 91 + Register addresses 92 + ================== 93 93 94 - ======== === ==== ==== ====== ======================================== 94 + JOY0DAT/JOY1DAT 95 + --------------- 96 + 97 + ======== === ==== ==== ====== =========================================== 95 98 NAME rev ADDR type chip Description 96 - ======== === ==== ==== ====== ======================================== 97 - JOY0DAT 00A R Denise Joystick-mouse 0 data (left vert, horiz) 98 - JOY1DAT 00C R Denise Joystick-mouse 1 data (right vert,horiz) 99 - ======== === ==== ==== ====== ======================================== 99 + ======== === ==== ==== ====== =========================================== 100 + JOY0DAT 00A R Denise Joystick-mouse 0 data (left vert., horiz.) 101 + JOY1DAT 00C R Denise Joystick-mouse 1 data (right vert., horiz.) 102 + ======== === ==== ==== ====== =========================================== 100 103 101 104 These addresses each read a 16 bit register. These in turn 102 105 are loaded from the MDAT serial stream and are clocked in on 103 106 the rising edge of SCLK. MLD output is used to parallel load 104 - the external parallel-to-serial converter.This in turn is 107 + the external parallel-to-serial converter. This in turn is 105 108 loaded with the 4 quadrature inputs from each of two game 106 109 controller ports (8 total) plus 8 miscellaneous control bits 107 110 which are new for LISA and can be read in upper 8 bits of ··· 113 108 114 109 Register bits are as follows: 115 110 116 - - Mouse counter usage (pins 1,3 =Yclock, pins 2,4 =Xclock) 111 + - Mouse counter usage (pins 1,3 =Yclock, pins 2,4 =Xclock) 117 112 118 113 ======== === === === === === === === === ====== === === === === === === === 119 114 BIT# 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 ··· 128 123 clocked by 2 of the signals input from the mouse serial 129 124 stream. Starting with first bit received: 130 125 131 - +-------------------+-----------------------------------------+ 126 + +--------+----------+-----------------------------------------+ 132 127 | Serial | Bit Name | Description | 133 128 +========+==========+=========================================+ 134 129 | 0 | M0H | JOY0DAT Horizontal Clock | ··· 165 160 | Right | 4 | X1 | 166 161 +------------+------+---------------------------------+ 167 162 168 - ------------------------------------------------------------------------------- 163 + JOYTEST 164 + ------- 169 165 170 166 ======== === ==== ==== ====== ================================================= 171 167 NAME rev ADDR type chip Description ··· 183 177 JOYxDAT Y7 Y6 Y5 Y4 Y3 Y2 xx xx X7 X6 X5 X4 X3 X2 xx xx 184 178 ========= === === === === === === === === ====== === === === === === === === 185 179 186 - ------------------------------------------------------------------------------- 180 + POT0DAT/POT1DAT 181 + --------------- 187 182 188 - ======= === ==== ==== ====== ======================================== 183 + ======= === ==== ==== ====== =========================================== 189 184 NAME rev ADDR type chip Description 190 - ======= === ==== ==== ====== ======================================== 191 - POT0DAT h 012 R Paula Pot counter data left pair (vert, horiz) 192 - POT1DAT h 014 R Paula Pot counter data right pair (vert,horiz) 193 - ======= === ==== ==== ====== ======================================== 185 + ======= === ==== ==== ====== =========================================== 186 + POT0DAT h 012 R Paula Pot counter data left pair (vert., horiz.) 187 + POT1DAT h 014 R Paula Pot counter data right pair (vert., horiz.) 188 + ======= === ==== ==== ====== =========================================== 194 189 195 190 These addresses each read a pair of 8 bit pot counters. 196 191 (4 counters total). The bit assignment for both ··· 220 213 +-------+------+-----+-----+-------+ 221 214 222 215 With normal (NTSC or PAL) horiz. line rate, the pots will 223 - give a full scale (FF) reading with about 500kohms in one 224 - frame time. With proportionally faster horiz line times, 216 + give a full scale (FF) reading with about 500k ohm in one 217 + frame time. With proportionally faster horiz. line times, 225 218 the counters will count proportionally faster. 226 219 This should be noted when doing variable beam displays. 227 220 228 - ------------------------------------------------------------------------------- 221 + POTGO 222 + ----- 229 223 230 224 ====== === ==== ==== ====== ================================================ 231 225 NAME rev ADDR type chip Description ··· 235 227 counter start. 236 228 ====== === ==== ==== ====== ================================================ 237 229 238 - ------------------------------------------------------------------------------- 230 + POTINP 231 + ------ 239 232 240 233 ====== === ==== ==== ====== ================================================ 241 234 NAME rev ADDR type chip Description ··· 247 238 This register controls a 4 bit bi-direction I/O port 248 239 that shares the same 4 pins as the 4 pot counters above. 249 240 250 - +-------+----------+---------------------------------------------+ 251 - | BIT# | FUNCTION | DESCRIPTION | 252 - +=======+==========+=============================================+ 253 - | 15 | OUTRY | Output enable for Paula pin 33 | 254 - +-------+----------+---------------------------------------------+ 255 - | 14 | DATRY | I/O data Paula pin 33 | 256 - +-------+----------+---------------------------------------------+ 257 - | 13 | OUTRX | Output enable for Paula pin 32 | 258 - +-------+----------+---------------------------------------------+ 259 - | 12 | DATRX | I/O data Paula pin 32 | 260 - +-------+----------+---------------------------------------------+ 261 - | 11 | OUTLY | Out put enable for Paula pin 36 | 262 - +-------+----------+---------------------------------------------+ 263 - | 10 | DATLY | I/O data Paula pin 36 | 264 - +-------+----------+---------------------------------------------+ 265 - | 09 | OUTLX | Output enable for Paula pin 35 | 266 - +-------+----------+---------------------------------------------+ 267 - | 08 | DATLX | I/O data Paula pin 35 | 268 - +-------+----------+---------------------------------------------+ 269 - | 07-01 | X | Not used | 270 - +-------+----------+---------------------------------------------+ 271 - | 00 | START | Start pots (dump capacitors,start counters) | 272 - +-------+----------+---------------------------------------------+ 241 + +-------+----------+----------------------------------------------+ 242 + | BIT# | FUNCTION | DESCRIPTION | 243 + +=======+==========+==============================================+ 244 + | 15 | OUTRY | Output enable for Paula pin 33 | 245 + +-------+----------+----------------------------------------------+ 246 + | 14 | DATRY | I/O data Paula pin 33 | 247 + +-------+----------+----------------------------------------------+ 248 + | 13 | OUTRX | Output enable for Paula pin 32 | 249 + +-------+----------+----------------------------------------------+ 250 + | 12 | DATRX | I/O data Paula pin 32 | 251 + +-------+----------+----------------------------------------------+ 252 + | 11 | OUTLY | Out put enable for Paula pin 36 | 253 + +-------+----------+----------------------------------------------+ 254 + | 10 | DATLY | I/O data Paula pin 36 | 255 + +-------+----------+----------------------------------------------+ 256 + | 09 | OUTLX | Output enable for Paula pin 35 | 257 + +-------+----------+----------------------------------------------+ 258 + | 08 | DATLX | I/O data Paula pin 35 | 259 + +-------+----------+----------------------------------------------+ 260 + | 07-01 | X | Not used | 261 + +-------+----------+----------------------------------------------+ 262 + | 00 | START | Start pots (dump capacitors, start counters) | 263 + +-------+----------+----------------------------------------------+
+1 -1
MAINTAINERS
··· 6942 6942 M: Support Opensource <support.opensource@diasemi.com> 6943 6943 S: Supported 6944 6944 W: http://www.dialog-semiconductor.com/products 6945 - F: Documentation/devicetree/bindings/input/dlg,da72??.txt 6945 + F: Documentation/devicetree/bindings/input/dlg,da72??.yaml 6946 6946 F: Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml 6947 6947 F: Documentation/devicetree/bindings/mfd/da90*.txt 6948 6948 F: Documentation/devicetree/bindings/mfd/dlg,da90*.yaml
+40 -13
drivers/input/joystick/xpad.c
··· 105 105 #define PKT_XBE2_FW_5_EARLY 3 106 106 #define PKT_XBE2_FW_5_11 4 107 107 108 + #define FLAG_DELAY_INIT BIT(0) 109 + 108 110 static bool dpad_to_buttons; 109 111 module_param(dpad_to_buttons, bool, S_IRUGO); 110 112 MODULE_PARM_DESC(dpad_to_buttons, "Map D-PAD to buttons rather than axes for unknown pads"); ··· 129 127 char *name; 130 128 u8 mapping; 131 129 u8 xtype; 130 + u8 flags; 132 131 } xpad_device[] = { 133 132 /* Please keep this list sorted by vendor and product ID. */ 134 133 { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, ··· 419 416 { 0x3285, 0x0663, "Nacon Evol-X", 0, XTYPE_XBOXONE }, 420 417 { 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 }, 421 418 { 0x3537, 0x1010, "GameSir G7 SE", 0, XTYPE_XBOXONE }, 419 + { 0x366c, 0x0005, "ByoWave Proteus Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE, FLAG_DELAY_INIT }, 422 420 { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, 423 421 { 0x413d, 0x2104, "Black Shark Green Ghost Gamepad", 0, XTYPE_XBOX360 }, 424 422 { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, ··· 575 571 XPAD_XBOXONE_VENDOR(0x3285), /* Nacon Evol-X */ 576 572 XPAD_XBOX360_VENDOR(0x3537), /* GameSir Controllers */ 577 573 XPAD_XBOXONE_VENDOR(0x3537), /* GameSir Controllers */ 574 + XPAD_XBOXONE_VENDOR(0x366c), /* ByoWave controllers */ 578 575 XPAD_XBOX360_VENDOR(0x413d), /* Black Shark Green Ghost Controller */ 579 576 { } 580 577 }; ··· 604 599 * - https://github.com/medusalix/xone/blob/master/bus/protocol.c 605 600 */ 606 601 #define GIP_CMD_ACK 0x01 602 + #define GIP_CMD_ANNOUNCE 0x02 607 603 #define GIP_CMD_IDENTIFY 0x04 608 604 #define GIP_CMD_POWER 0x05 609 605 #define GIP_CMD_AUTHENTICATE 0x06 ··· 679 673 }; 680 674 681 675 /* 682 - * This packet is required for most (all?) of the PDP pads to start 683 - * sending input reports. These pads include: (0x0e6f:0x02ab), 684 - * (0x0e6f:0x02a4), (0x0e6f:0x02a6). 676 + * This packet is sent by default on Windows, and is required for some pads to 677 + * start sending input reports, including most (all?) of the PDP. These pads 678 + * include: (0x0e6f:0x02ab), (0x0e6f:0x02a4), (0x0e6f:0x02a6). 685 679 */ 686 - static const u8 xboxone_pdp_led_on[] = { 687 - GIP_CMD_LED, GIP_OPT_INTERNAL, GIP_SEQ0, GIP_PL_LEN(3), 0x00, GIP_LED_ON, 0x14 688 - }; 680 + static const u8 xboxone_led_on[] = { GIP_CMD_LED, GIP_OPT_INTERNAL, GIP_SEQ0, 681 + GIP_PL_LEN(3), 0x00, GIP_LED_ON, 0x14 }; 689 682 690 683 /* 691 684 * This packet is required for most (all?) of the PDP pads to start 692 685 * sending input reports. These pads include: (0x0e6f:0x02ab), 693 686 * (0x0e6f:0x02a4), (0x0e6f:0x02a6). 694 687 */ 695 - static const u8 xboxone_pdp_auth[] = { 688 + static const u8 xboxone_auth_done[] = { 696 689 GIP_CMD_AUTHENTICATE, GIP_OPT_INTERNAL, GIP_SEQ0, GIP_PL_LEN(2), 0x01, 0x00 697 690 }; 698 691 ··· 728 723 XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), 729 724 XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), 730 725 XBOXONE_INIT_PKT(0x045e, 0x0b00, extra_input_packet_init), 731 - XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_led_on), 732 - XBOXONE_INIT_PKT(0x0f0d, 0x01b2, xboxone_pdp_led_on), 733 - XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_led_on), 734 - XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_auth), 735 - XBOXONE_INIT_PKT(0x0f0d, 0x01b2, xboxone_pdp_auth), 736 - XBOXONE_INIT_PKT(0x20d6, 0xa01a, xboxone_pdp_auth), 726 + XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_led_on), 727 + XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_auth_done), 737 728 XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), 738 729 XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init), 739 730 XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init), ··· 789 788 const char *name; /* name of the device */ 790 789 struct work_struct work; /* init/remove device from callback */ 791 790 time64_t mode_btn_down_ts; 791 + bool delay_init; /* init packets should be delayed */ 792 + bool delayed_init_done; 792 793 }; 793 794 794 795 static int xpad_init_input(struct usb_xpad *xpad); 795 796 static void xpad_deinit_input(struct usb_xpad *xpad); 797 + static int xpad_start_input(struct usb_xpad *xpad); 796 798 static void xpadone_ack_mode_report(struct usb_xpad *xpad, u8 seq_num); 797 799 static void xpad360w_poweroff_controller(struct usb_xpad *xpad); 798 800 ··· 1080 1076 1081 1077 do_sync = true; 1082 1078 } 1079 + } else if (data[0] == GIP_CMD_ANNOUNCE) { 1080 + int error; 1081 + 1082 + if (xpad->delay_init && !xpad->delayed_init_done) { 1083 + xpad->delayed_init_done = true; 1084 + error = xpad_start_input(xpad); 1085 + if (error) 1086 + dev_warn(&xpad->dev->dev, 1087 + "unable to start delayed input: %d\n", 1088 + error); 1089 + } 1083 1090 } else if (data[0] == GIP_CMD_INPUT) { /* The main valid packet type for inputs */ 1084 1091 /* menu/view buttons */ 1085 1092 input_report_key(dev, BTN_START, data[4] & BIT(2)); ··· 1267 1252 const struct xboxone_init_packet *init_packet; 1268 1253 1269 1254 if (xpad->xtype != XTYPE_XBOXONE) 1255 + return false; 1256 + 1257 + /* 1258 + * Some dongles will discard init packets if they're sent before the 1259 + * controller connects. In these cases, we need to wait until we get 1260 + * an announce packet from them to send the init packet sequence. 1261 + */ 1262 + if (xpad->delay_init && !xpad->delayed_init_done) 1270 1263 return false; 1271 1264 1272 1265 /* Perform initialization sequence for Xbox One pads that require it */ ··· 2092 2069 xpad->mapping = xpad_device[i].mapping; 2093 2070 xpad->xtype = xpad_device[i].xtype; 2094 2071 xpad->name = xpad_device[i].name; 2072 + if (xpad_device[i].flags & FLAG_DELAY_INIT) 2073 + xpad->delay_init = true; 2074 + 2095 2075 xpad->packet_type = PKT_XB; 2096 2076 INIT_WORK(&xpad->work, xpad_presence_work); 2097 2077 ··· 2294 2268 struct usb_xpad *xpad = usb_get_intfdata(intf); 2295 2269 struct input_dev *input = xpad->dev; 2296 2270 2271 + xpad->delayed_init_done = false; 2297 2272 if (xpad->xtype == XTYPE_XBOX360W) 2298 2273 return xpad360w_start_input(xpad); 2299 2274
+1 -1
drivers/input/keyboard/atkbd.c
··· 37 37 module_param_named(set, atkbd_set, int, 0); 38 38 MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3 = PS/2 native)"); 39 39 40 - #if defined(__i386__) || defined(__x86_64__) || defined(__hppa__) 40 + #if defined(__i386__) || defined(__x86_64__) || defined(__hppa__) || defined(__loongarch__) 41 41 static bool atkbd_reset; 42 42 #else 43 43 static bool atkbd_reset = true;
+4 -2
drivers/input/keyboard/gpio_keys.c
··· 449 449 release_timer); 450 450 struct input_dev *input = bdata->input; 451 451 452 + guard(spinlock_irqsave)(&bdata->lock); 453 + 452 454 if (bdata->key_pressed) { 453 455 input_report_key(input, *bdata->code, 0); 454 456 input_sync(input); ··· 488 486 if (bdata->release_delay) 489 487 hrtimer_start(&bdata->release_timer, 490 488 ms_to_ktime(bdata->release_delay), 491 - HRTIMER_MODE_REL_HARD); 489 + HRTIMER_MODE_REL); 492 490 out: 493 491 return IRQ_HANDLED; 494 492 } ··· 630 628 631 629 bdata->release_delay = button->debounce_interval; 632 630 hrtimer_setup(&bdata->release_timer, gpio_keys_irq_timer, 633 - CLOCK_REALTIME, HRTIMER_MODE_REL_HARD); 631 + CLOCK_REALTIME, HRTIMER_MODE_REL); 634 632 635 633 isr = gpio_keys_irq_isr; 636 634 irqflags = 0;
+27 -3
drivers/input/keyboard/matrix_keypad.c
··· 104 104 disable_irq_nosync(keypad->row_irqs[i]); 105 105 } 106 106 107 + static uint32_t read_row_state(struct matrix_keypad *keypad) 108 + { 109 + int row; 110 + u32 row_state = 0; 111 + 112 + for (row = 0; row < keypad->num_row_gpios; row++) 113 + row_state |= row_asserted(keypad, row) ? BIT(row) : 0; 114 + return row_state; 115 + } 116 + 107 117 /* 108 118 * This gets the keys from keyboard and reports it to input subsystem 109 119 */ ··· 125 115 const unsigned short *keycodes = input_dev->keycode; 126 116 uint32_t new_state[MATRIX_MAX_COLS]; 127 117 int row, col, code; 118 + u32 init_row_state, new_row_state; 119 + 120 + /* read initial row state to detect changes between scan */ 121 + init_row_state = read_row_state(keypad); 128 122 129 123 /* de-activate all columns for scanning */ 130 124 activate_all_cols(keypad, false); ··· 143 129 144 130 activate_col(keypad, col, true); 145 131 146 - for (row = 0; row < keypad->num_row_gpios; row++) 147 - new_state[col] |= 148 - row_asserted(keypad, row) ? BIT(row) : 0; 132 + new_state[col] = read_row_state(keypad); 149 133 150 134 activate_col(keypad, col, false); 151 135 } ··· 176 164 scoped_guard(spinlock_irq, &keypad->lock) { 177 165 keypad->scan_pending = false; 178 166 enable_row_irqs(keypad); 167 + } 168 + 169 + /* read new row state and detect if value has changed */ 170 + new_row_state = read_row_state(keypad); 171 + if (init_row_state != new_row_state) { 172 + guard(spinlock_irq)(&keypad->lock); 173 + if (unlikely(keypad->scan_pending || keypad->stopped)) 174 + return; 175 + disable_row_irqs(keypad); 176 + keypad->scan_pending = true; 177 + schedule_delayed_work(&keypad->work, 178 + msecs_to_jiffies(keypad->debounce_ms)); 179 179 } 180 180 } 181 181
+25
drivers/input/keyboard/snvs_pwrkey.c
··· 27 27 #define SNVS_HPSR_BTN BIT(6) 28 28 #define SNVS_LPSR_SPO BIT(18) 29 29 #define SNVS_LPCR_DEP_EN BIT(5) 30 + #define SNVS_LPCR_BPT_SHIFT 16 31 + #define SNVS_LPCR_BPT_MASK (3 << SNVS_LPCR_BPT_SHIFT) 30 32 31 33 #define DEBOUNCE_TIME 30 32 34 #define REPEAT_INTERVAL 60 ··· 116 114 struct device_node *np; 117 115 struct clk *clk; 118 116 int error; 117 + unsigned int val; 118 + unsigned int bpt; 119 119 u32 vid; 120 120 121 121 /* Get SNVS register Page */ ··· 151 147 pdata->irq = platform_get_irq(pdev, 0); 152 148 if (pdata->irq < 0) 153 149 return -EINVAL; 150 + 151 + error = of_property_read_u32(np, "power-off-time-sec", &val); 152 + if (!error) { 153 + switch (val) { 154 + case 0: 155 + bpt = 0x3; 156 + break; 157 + case 5: 158 + case 10: 159 + case 15: 160 + bpt = (val / 5) - 1; 161 + break; 162 + default: 163 + dev_err(&pdev->dev, 164 + "power-off-time-sec %d out of range\n", val); 165 + return -EINVAL; 166 + } 167 + 168 + regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_BPT_MASK, 169 + bpt << SNVS_LPCR_BPT_SHIFT); 170 + } 154 171 155 172 regmap_read(pdata->snvs, SNVS_HPVIDR1_REG, &vid); 156 173 pdata->minor_rev = vid & 0xff;
+6
drivers/input/misc/ims-pcu.c
··· 844 844 addr = be32_to_cpu(rec->addr) / 2; 845 845 len = be16_to_cpu(rec->len); 846 846 847 + if (len > sizeof(pcu->cmd_buf) - 1 - sizeof(*fragment)) { 848 + dev_err(pcu->dev, 849 + "Invalid record length in firmware: %d\n", len); 850 + return -EINVAL; 851 + } 852 + 847 853 fragment = (void *)&pcu->cmd_buf[1]; 848 854 put_unaligned_le32(addr, &fragment->addr); 849 855 fragment->len = len;