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

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

- several device tree bindings for input devices have been converted to
yaml

- dropped no longer used ixp4xx-beeper and CSR Prima2 PWRC drivers

- analog joystick has been converted to use ktime API and no longer
warn about low resolution timers

- a few driver fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (24 commits)
Input: analog - always use ktime functions
Input: mms114 - support MMS134S
Input: elan_i2c - reduce the resume time for controller in Whitebox
Input: edt-ft5x06 - added case for EDT EP0110M09
Input: adc-keys - drop bogus __refdata annotation
Input: Fix spelling mistake in Kconfig "useable" -> "usable"
Input: Fix spelling mistake in Kconfig "Modul" -> "Module"
Input: remove dead CSR Prima2 PWRC driver
Input: adp5589-keys - use the right header
Input: adp5588-keys - use the right header
dt-bindings: input: tsc2005: Convert to YAML schema
Input: ep93xx_keypad - prepare clock before using it
dt-bindings: input: sun4i-lradc: Add wakeup-source
dt-bindings: input: Convert Regulator Haptic binding to a schema
dt-bindings: input: Convert Pixcir Touchscreen binding to a schema
dt-bindings: input: Convert ChipOne ICN8318 binding to a schema
Input: pm8941-pwrkey - fix comma vs semicolon issue
dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml
dt-bindings: input: pm8941-pwrkey: Convert pm8941 power key binding to yaml
dt-bindings: power: reset: Change 'additionalProperties' to true
...

+472 -799
+2
Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
··· 29 29 description: 30 30 Regulator for the LRADC reference voltage 31 31 32 + wakeup-source: true 33 + 32 34 patternProperties: 33 35 "^button-[0-9]+$": 34 36 type: object
-55
Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
··· 1 - Qualcomm PM8941 PMIC Power Key 2 - 3 - PROPERTIES 4 - 5 - - compatible: 6 - Usage: required 7 - Value type: <string> 8 - Definition: must be one of: 9 - "qcom,pm8941-pwrkey" 10 - "qcom,pm8941-resin" 11 - "qcom,pmk8350-pwrkey" 12 - "qcom,pmk8350-resin" 13 - 14 - - reg: 15 - Usage: required 16 - Value type: <prop-encoded-array> 17 - Definition: base address of registers for block 18 - 19 - - interrupts: 20 - Usage: required 21 - Value type: <prop-encoded-array> 22 - Definition: key change interrupt; The format of the specifier is 23 - defined by the binding document describing the node's 24 - interrupt parent. 25 - 26 - - debounce: 27 - Usage: optional 28 - Value type: <u32> 29 - Definition: time in microseconds that key must be pressed or released 30 - for state change interrupt to trigger. 31 - 32 - - bias-pull-up: 33 - Usage: optional 34 - Value type: <empty> 35 - Definition: presence of this property indicates that the KPDPWR_N pin 36 - should be configured for pull up. 37 - 38 - - linux,code: 39 - Usage: optional 40 - Value type: <u32> 41 - Definition: The input key-code associated with the power key. 42 - Use the linux event codes defined in 43 - include/dt-bindings/input/linux-event-codes.h 44 - When property is omitted KEY_POWER is assumed. 45 - 46 - EXAMPLE 47 - 48 - pwrkey@800 { 49 - compatible = "qcom,pm8941-pwrkey"; 50 - reg = <0x800>; 51 - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 52 - debounce = <15625>; 53 - bias-pull-up; 54 - linux,code = <KEY_POWER>; 55 - };
+51
Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/qcom,pm8941-pwrkey.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm PM8941 PMIC Power Key 8 + 9 + maintainers: 10 + - Courtney Cavin <courtney.cavin@sonymobile.com> 11 + - Vinod Koul <vkoul@kernel.org> 12 + 13 + allOf: 14 + - $ref: input.yaml# 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - qcom,pm8941-pwrkey 20 + - qcom,pm8941-resin 21 + - qcom,pmk8350-pwrkey 22 + - qcom,pmk8350-resin 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + debounce: 28 + description: | 29 + Time in microseconds that key must be pressed or 30 + released for state change interrupt to trigger. 31 + $ref: /schemas/types.yaml#/definitions/uint32 32 + 33 + bias-pull-up: 34 + description: | 35 + Presence of this property indicates that the KPDPWR_N 36 + pin should be configured for pull up. 37 + $ref: /schemas/types.yaml#/definitions/flag 38 + 39 + linux,code: 40 + description: | 41 + The input key-code associated with the power key. 42 + Use the linux event codes defined in 43 + include/dt-bindings/input/linux-event-codes.h 44 + When property is omitted KEY_POWER is assumed. 45 + 46 + required: 47 + - compatible 48 + - interrupts 49 + 50 + unevaluatedProperties: false 51 + ...
-21
Documentation/devicetree/bindings/input/regulator-haptic.txt
··· 1 - * Regulator Haptic Device Tree Bindings 2 - 3 - Required Properties: 4 - - compatible : Should be "regulator-haptic" 5 - - haptic-supply : Power supply to the haptic motor. 6 - [*] refer Documentation/devicetree/bindings/regulator/regulator.txt 7 - 8 - - max-microvolt : The maximum voltage value supplied to the haptic motor. 9 - [The unit of the voltage is a micro] 10 - 11 - - min-microvolt : The minimum voltage value supplied to the haptic motor. 12 - [The unit of the voltage is a micro] 13 - 14 - Example: 15 - 16 - haptics { 17 - compatible = "regulator-haptic"; 18 - haptic-supply = <&motor_regulator>; 19 - max-microvolt = <2700000>; 20 - min-microvolt = <1100000>; 21 - };
+43
Documentation/devicetree/bindings/input/regulator-haptic.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/input/regulator-haptic.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: Regulator Haptic Device Tree Bindings 8 + 9 + maintainers: 10 + - Jaewon Kim <jaewon02.kim@samsung.com> 11 + 12 + properties: 13 + compatible: 14 + const: regulator-haptic 15 + 16 + haptic-supply: 17 + description: > 18 + Power supply to the haptic motor 19 + 20 + max-microvolt: 21 + description: > 22 + The maximum voltage value supplied to the haptic motor 23 + 24 + min-microvolt: 25 + description: > 26 + The minimum voltage value supplied to the haptic motor 27 + 28 + required: 29 + - compatible 30 + - haptic-supply 31 + - max-microvolt 32 + - min-microvolt 33 + 34 + additionalProperties: false 35 + 36 + examples: 37 + - | 38 + haptics { 39 + compatible = "regulator-haptic"; 40 + haptic-supply = <&motor_regulator>; 41 + max-microvolt = <2700000>; 42 + min-microvolt = <1100000>; 43 + };
+62
Documentation/devicetree/bindings/input/touchscreen/chipone,icn8318.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/touchscreen/chipone,icn8318.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ChipOne ICN8318 Touchscreen Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Dmitry Torokhov <dmitry.torokhov@gmail.com> 11 + 12 + allOf: 13 + - $ref: touchscreen.yaml# 14 + 15 + properties: 16 + compatible: 17 + const: chipone,icn8318 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + interrupts: 23 + maxItems: 1 24 + 25 + wake-gpios: 26 + maxItems: 1 27 + 28 + unevaluatedProperties: false 29 + 30 + required: 31 + - compatible 32 + - reg 33 + - interrupts 34 + - wake-gpios 35 + - touchscreen-size-x 36 + - touchscreen-size-y 37 + 38 + examples: 39 + - | 40 + #include <dt-bindings/gpio/gpio.h> 41 + #include <dt-bindings/interrupt-controller/arm-gic.h> 42 + 43 + i2c { 44 + #address-cells = <1>; 45 + #size-cells = <0>; 46 + 47 + touchscreen@40 { 48 + compatible = "chipone,icn8318"; 49 + reg = <0x40>; 50 + interrupt-parent = <&pio>; 51 + interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */ 52 + pinctrl-names = "default"; 53 + pinctrl-0 = <&ts_wake_pin_p66>; 54 + wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ 55 + touchscreen-size-x = <800>; 56 + touchscreen-size-y = <480>; 57 + touchscreen-inverted-x; 58 + touchscreen-swapped-x-y; 59 + }; 60 + }; 61 + 62 + ...
-44
Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
··· 1 - * ChipOne icn8318 I2C touchscreen controller 2 - 3 - Required properties: 4 - - compatible : "chipone,icn8318" 5 - - reg : I2C slave address of the chip (0x40) 6 - - interrupts : interrupt specification for the icn8318 interrupt 7 - - wake-gpios : GPIO specification for the WAKE input 8 - - touchscreen-size-x : horizontal resolution of touchscreen (in pixels) 9 - - touchscreen-size-y : vertical resolution of touchscreen (in pixels) 10 - 11 - Optional properties: 12 - - pinctrl-names : should be "default" 13 - - pinctrl-0: : a phandle pointing to the pin settings for the 14 - control gpios 15 - - touchscreen-fuzz-x : horizontal noise value of the absolute input 16 - device (in pixels) 17 - - touchscreen-fuzz-y : vertical noise value of the absolute input 18 - device (in pixels) 19 - - touchscreen-inverted-x : X axis is inverted (boolean) 20 - - touchscreen-inverted-y : Y axis is inverted (boolean) 21 - - touchscreen-swapped-x-y : X and Y axis are swapped (boolean) 22 - Swapping is done after inverting the axis 23 - 24 - Example: 25 - 26 - i2c@00000000 { 27 - /* ... */ 28 - 29 - chipone_icn8318@40 { 30 - compatible = "chipone,icn8318"; 31 - reg = <0x40>; 32 - interrupt-parent = <&pio>; 33 - interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */ 34 - pinctrl-names = "default"; 35 - pinctrl-0 = <&ts_wake_pin_p66>; 36 - wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ 37 - touchscreen-size-x = <800>; 38 - touchscreen-size-y = <480>; 39 - touchscreen-inverted-x; 40 - touchscreen-swapped-x-y; 41 - }; 42 - 43 - /* ... */ 44 - };
+68
Documentation/devicetree/bindings/input/touchscreen/pixcir,pixcir_ts.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/touchscreen/pixcir,pixcir_ts.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Pixcir Touchscreen Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Dmitry Torokhov <dmitry.torokhov@gmail.com> 11 + 12 + allOf: 13 + - $ref: touchscreen.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - pixcir,pixcir_ts 19 + - pixcir,pixcir_tangoc 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + attb-gpio: 28 + maxItems: 1 29 + 30 + reset-gpios: 31 + maxItems: 1 32 + 33 + enable-gpios: 34 + maxItems: 1 35 + 36 + wake-gpios: 37 + maxItems: 1 38 + 39 + unevaluatedProperties: false 40 + 41 + required: 42 + - compatible 43 + - reg 44 + - interrupts 45 + - attb-gpio 46 + - touchscreen-size-x 47 + - touchscreen-size-y 48 + 49 + examples: 50 + - | 51 + #include <dt-bindings/gpio/gpio.h> 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + 54 + i2c { 55 + #address-cells = <1>; 56 + #size-cells = <0>; 57 + 58 + touchscreen@5c { 59 + compatible = "pixcir,pixcir_ts"; 60 + reg = <0x5c>; 61 + interrupts = <2 0>; 62 + attb-gpio = <&gpf 2 0 2>; 63 + touchscreen-size-x = <800>; 64 + touchscreen-size-y = <600>; 65 + }; 66 + }; 67 + 68 + ...
-31
Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt
··· 1 - * Pixcir I2C touchscreen controllers 2 - 3 - Required properties: 4 - - compatible: must be "pixcir,pixcir_ts" or "pixcir,pixcir_tangoc" 5 - - reg: I2C address of the chip 6 - - interrupts: interrupt to which the chip is connected 7 - - attb-gpio: GPIO connected to the ATTB line of the chip 8 - - touchscreen-size-x: horizontal resolution of touchscreen (in pixels) 9 - - touchscreen-size-y: vertical resolution of touchscreen (in pixels) 10 - 11 - Optional properties: 12 - - reset-gpios: GPIO connected to the RESET line of the chip 13 - - enable-gpios: GPIO connected to the ENABLE line of the chip 14 - - wake-gpios: GPIO connected to the WAKE line of the chip 15 - 16 - Example: 17 - 18 - i2c@00000000 { 19 - /* ... */ 20 - 21 - pixcir_ts@5c { 22 - compatible = "pixcir,pixcir_ts"; 23 - reg = <0x5c>; 24 - interrupts = <2 0>; 25 - attb-gpio = <&gpf 2 0 2>; 26 - touchscreen-size-x = <800>; 27 - touchscreen-size-y = <600>; 28 - }; 29 - 30 - /* ... */ 31 - };
+128
Documentation/devicetree/bindings/input/touchscreen/ti,tsc2005.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/touchscreen/ti,tsc2005.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments TSC2004 and TSC2005 touchscreen controller bindings 8 + 9 + maintainers: 10 + - Marek Vasut <marex@denx.de> 11 + - Michael Welling <mwelling@ieee.org> 12 + 13 + properties: 14 + $nodename: 15 + pattern: "^touchscreen(@.*)?$" 16 + 17 + compatible: 18 + enum: 19 + - ti,tsc2004 20 + - ti,tsc2005 21 + 22 + reg: 23 + maxItems: 1 24 + description: | 25 + I2C address when used on the I2C bus, or the SPI chip select index 26 + when used on the SPI bus 27 + 28 + interrupts: 29 + maxItems: 1 30 + 31 + reset-gpios: 32 + maxItems: 1 33 + description: GPIO specifier for the controller reset line 34 + 35 + spi-max-frequency: 36 + description: TSC2005 SPI bus clock frequency. 37 + maximum: 25000000 38 + 39 + ti,x-plate-ohms: 40 + description: resistance of the touchscreen's X plates in ohm (defaults to 280) 41 + 42 + ti,esd-recovery-timeout-ms: 43 + description: | 44 + if the touchscreen does not respond after the configured time 45 + (in milli seconds), the driver will reset it. This is disabled 46 + by default. 47 + 48 + vio-supply: 49 + description: Regulator specifier 50 + 51 + touchscreen-fuzz-pressure: true 52 + touchscreen-fuzz-x: true 53 + touchscreen-fuzz-y: true 54 + touchscreen-max-pressure: true 55 + touchscreen-size-x: true 56 + touchscreen-size-y: true 57 + 58 + allOf: 59 + - $ref: touchscreen.yaml# 60 + - if: 61 + properties: 62 + compatible: 63 + contains: 64 + const: ti,tsc2004 65 + then: 66 + properties: 67 + spi-max-frequency: false 68 + 69 + additionalProperties: false 70 + 71 + required: 72 + - compatible 73 + - reg 74 + - interrupts 75 + 76 + examples: 77 + - | 78 + #include <dt-bindings/interrupt-controller/irq.h> 79 + #include <dt-bindings/gpio/gpio.h> 80 + i2c { 81 + #address-cells = <1>; 82 + #size-cells = <0>; 83 + touchscreen@48 { 84 + compatible = "ti,tsc2004"; 85 + reg = <0x48>; 86 + vio-supply = <&vio>; 87 + 88 + reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; 89 + interrupts-extended = <&gpio1 27 IRQ_TYPE_EDGE_RISING>; 90 + 91 + touchscreen-fuzz-x = <4>; 92 + touchscreen-fuzz-y = <7>; 93 + touchscreen-fuzz-pressure = <2>; 94 + touchscreen-size-x = <4096>; 95 + touchscreen-size-y = <4096>; 96 + touchscreen-max-pressure = <2048>; 97 + 98 + ti,x-plate-ohms = <280>; 99 + ti,esd-recovery-timeout-ms = <8000>; 100 + }; 101 + }; 102 + - | 103 + #include <dt-bindings/interrupt-controller/irq.h> 104 + #include <dt-bindings/gpio/gpio.h> 105 + spi { 106 + #address-cells = <1>; 107 + #size-cells = <0>; 108 + touchscreen@0 { 109 + compatible = "ti,tsc2005"; 110 + spi-max-frequency = <6000000>; 111 + reg = <0>; 112 + 113 + vio-supply = <&vio>; 114 + 115 + reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */ 116 + interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */ 117 + 118 + touchscreen-fuzz-x = <4>; 119 + touchscreen-fuzz-y = <7>; 120 + touchscreen-fuzz-pressure = <2>; 121 + touchscreen-size-x = <4096>; 122 + touchscreen-size-y = <4096>; 123 + touchscreen-max-pressure = <2048>; 124 + 125 + ti,x-plate-ohms = <280>; 126 + ti,esd-recovery-timeout-ms = <8000>; 127 + }; 128 + };
-64
Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt
··· 1 - * Texas Instruments tsc2004 and tsc2005 touchscreen controllers 2 - 3 - Required properties: 4 - - compatible : "ti,tsc2004" or "ti,tsc2005" 5 - - reg : Device address 6 - - interrupts : IRQ specifier 7 - - spi-max-frequency : Maximum SPI clocking speed of the device 8 - (for tsc2005) 9 - 10 - Optional properties: 11 - - vio-supply : Regulator specifier 12 - - reset-gpios : GPIO specifier for the controller reset line 13 - - ti,x-plate-ohms : integer, resistance of the touchscreen's X plates 14 - in ohm (defaults to 280) 15 - - ti,esd-recovery-timeout-ms : integer, if the touchscreen does not respond after 16 - the configured time (in milli seconds), the driver 17 - will reset it. This is disabled by default. 18 - - properties defined in touchscreen.txt 19 - 20 - Example: 21 - 22 - &i2c3 { 23 - tsc2004@48 { 24 - compatible = "ti,tsc2004"; 25 - reg = <0x48>; 26 - vio-supply = <&vio>; 27 - 28 - reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; 29 - interrupts-extended = <&gpio1 27 IRQ_TYPE_EDGE_RISING>; 30 - 31 - touchscreen-fuzz-x = <4>; 32 - touchscreen-fuzz-y = <7>; 33 - touchscreen-fuzz-pressure = <2>; 34 - touchscreen-size-x = <4096>; 35 - touchscreen-size-y = <4096>; 36 - touchscreen-max-pressure = <2048>; 37 - 38 - ti,x-plate-ohms = <280>; 39 - ti,esd-recovery-timeout-ms = <8000>; 40 - }; 41 - } 42 - 43 - &mcspi1 { 44 - tsc2005@0 { 45 - compatible = "ti,tsc2005"; 46 - spi-max-frequency = <6000000>; 47 - reg = <0>; 48 - 49 - vio-supply = <&vio>; 50 - 51 - reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */ 52 - interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */ 53 - 54 - touchscreen-fuzz-x = <4>; 55 - touchscreen-fuzz-y = <7>; 56 - touchscreen-fuzz-pressure = <2>; 57 - touchscreen-size-x = <4096>; 58 - touchscreen-size-y = <4096>; 59 - touchscreen-max-pressure = <2048>; 60 - 61 - ti,x-plate-ohms = <280>; 62 - ti,esd-recovery-timeout-ms = <8000>; 63 - }; 64 - }
-49
Documentation/devicetree/bindings/power/reset/qcom,pon.txt
··· 1 - Qualcomm PON Device 2 - 3 - The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey 4 - and resin along with the Android reboot-mode. 5 - 6 - This DT node has pwrkey and resin as sub nodes. 7 - 8 - Required Properties: 9 - -compatible: Must be one of: 10 - "qcom,pm8916-pon" 11 - "qcom,pms405-pon" 12 - "qcom,pm8998-pon" 13 - 14 - -reg: Specifies the physical address of the pon register 15 - 16 - Optional subnode: 17 - -pwrkey: Specifies the subnode pwrkey and should follow the 18 - qcom,pm8941-pwrkey.txt description. 19 - -resin: Specifies the subnode resin and should follow the 20 - qcom,pm8xxx-pwrkey.txt description. 21 - 22 - The rest of the properties should follow the generic reboot-mode description 23 - found in reboot-mode.txt 24 - 25 - Example: 26 - 27 - pon@800 { 28 - compatible = "qcom,pm8916-pon"; 29 - 30 - reg = <0x800>; 31 - mode-bootloader = <0x2>; 32 - mode-recovery = <0x1>; 33 - 34 - pwrkey { 35 - compatible = "qcom,pm8941-pwrkey"; 36 - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 37 - debounce = <15625>; 38 - bias-pull-up; 39 - linux,code = <KEY_POWER>; 40 - }; 41 - 42 - resin { 43 - compatible = "qcom,pm8941-resin"; 44 - interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 45 - debounce = <15625>; 46 - bias-pull-up; 47 - linux,code = <KEY_VOLUMEDOWN>; 48 - }; 49 - };
+80
Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm PON Device 8 + 9 + maintainers: 10 + - Vinod Koul <vkoul@kernel.org> 11 + 12 + description: | 13 + The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey 14 + and resin along with the Android reboot-mode. 15 + 16 + This DT node has pwrkey and resin as sub nodes. 17 + 18 + allOf: 19 + - $ref: reboot-mode.yaml# 20 + 21 + properties: 22 + compatible: 23 + enum: 24 + - qcom,pm8916-pon 25 + - qcom,pms405-pon 26 + - qcom,pm8998-pon 27 + 28 + reg: 29 + maxItems: 1 30 + 31 + pwrkey: 32 + type: object 33 + $ref: "../../input/qcom,pm8941-pwrkey.yaml#" 34 + 35 + resin: 36 + type: object 37 + $ref: "../../input/qcom,pm8941-pwrkey.yaml#" 38 + 39 + required: 40 + - compatible 41 + - reg 42 + 43 + unevaluatedProperties: false 44 + 45 + examples: 46 + - | 47 + #include <dt-bindings/interrupt-controller/irq.h> 48 + #include <dt-bindings/input/linux-event-codes.h> 49 + #include <dt-bindings/spmi/spmi.h> 50 + spmi_bus: spmi@c440000 { 51 + reg = <0x0c440000 0x1100>; 52 + #address-cells = <2>; 53 + #size-cells = <0>; 54 + pmk8350: pmic@0 { 55 + reg = <0x0 SPMI_USID>; 56 + #address-cells = <1>; 57 + #size-cells = <0>; 58 + pmk8350_pon: pon_hlos@1300 { 59 + reg = <0x1300>; 60 + compatible = "qcom,pm8998-pon"; 61 + 62 + pwrkey { 63 + compatible = "qcom,pm8941-pwrkey"; 64 + interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >; 65 + debounce = <15625>; 66 + bias-pull-up; 67 + linux,code = <KEY_POWER>; 68 + }; 69 + 70 + resin { 71 + compatible = "qcom,pm8941-resin"; 72 + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 73 + debounce = <15625>; 74 + bias-pull-up; 75 + linux,code = <KEY_VOLUMEDOWN>; 76 + }; 77 + }; 78 + }; 79 + }; 80 + ...
+1 -1
Documentation/devicetree/bindings/power/reset/reboot-mode.yaml
··· 36 36 "^mode-.*$": 37 37 $ref: /schemas/types.yaml#/definitions/uint32 38 38 39 - additionalProperties: false 39 + additionalProperties: true 40 40 41 41 examples: 42 42 - |
+13 -94
drivers/input/joystick/analog.c
··· 28 28 MODULE_DESCRIPTION(DRIVER_DESC); 29 29 MODULE_LICENSE("GPL"); 30 30 31 - static bool use_ktime = true; 32 - module_param(use_ktime, bool, 0400); 33 - MODULE_PARM_DESC(use_ktime, "Use ktime for measuring I/O speed"); 34 - 35 31 /* 36 32 * Option parsing. 37 33 */ ··· 106 110 char cooked; 107 111 int bads; 108 112 int reads; 109 - int speed; 110 113 int loop; 111 114 int fuzz; 112 115 int axes[4]; ··· 113 118 int initial[4]; 114 119 int axtime; 115 120 }; 116 - 117 - /* 118 - * Time macros. 119 - */ 120 - 121 - #ifdef __i386__ 122 - 123 - #include <linux/i8253.h> 124 - 125 - #define GET_TIME(x) do { if (boot_cpu_has(X86_FEATURE_TSC)) x = (unsigned int)rdtsc(); else x = get_time_pit(); } while (0) 126 - #define DELTA(x,y) (boot_cpu_has(X86_FEATURE_TSC) ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? PIT_TICK_RATE / HZ : 0))) 127 - #define TIME_NAME (boot_cpu_has(X86_FEATURE_TSC)?"TSC":"PIT") 128 - static unsigned int get_time_pit(void) 129 - { 130 - unsigned long flags; 131 - unsigned int count; 132 - 133 - raw_spin_lock_irqsave(&i8253_lock, flags); 134 - outb_p(0x00, 0x43); 135 - count = inb_p(0x40); 136 - count |= inb_p(0x40) << 8; 137 - raw_spin_unlock_irqrestore(&i8253_lock, flags); 138 - 139 - return count; 140 - } 141 - #elif defined(__x86_64__) 142 - #define GET_TIME(x) do { x = (unsigned int)rdtsc(); } while (0) 143 - #define DELTA(x,y) ((y)-(x)) 144 - #define TIME_NAME "TSC" 145 - #elif defined(__alpha__) || defined(CONFIG_ARM) || defined(CONFIG_ARM64) || defined(CONFIG_PPC) || defined(CONFIG_RISCV) 146 - #define GET_TIME(x) do { x = get_cycles(); } while (0) 147 - #define DELTA(x,y) ((y)-(x)) 148 - #define TIME_NAME "get_cycles" 149 - #else 150 - #define FAKE_TIME 151 - static unsigned long analog_faketime = 0; 152 - #define GET_TIME(x) do { x = analog_faketime++; } while(0) 153 - #define DELTA(x,y) ((y)-(x)) 154 - #define TIME_NAME "Unreliable" 155 - #warning Precise timer not defined for this architecture. 156 - #endif 157 - 158 - static inline u64 get_time(void) 159 - { 160 - if (use_ktime) { 161 - return ktime_get_ns(); 162 - } else { 163 - unsigned int x; 164 - GET_TIME(x); 165 - return x; 166 - } 167 - } 168 - 169 - static inline unsigned int delta(u64 x, u64 y) 170 - { 171 - if (use_ktime) 172 - return y - x; 173 - else 174 - return DELTA((unsigned int)x, (unsigned int)y); 175 - } 176 121 177 122 /* 178 123 * analog_decode() decodes analog joystick data and reports input events. ··· 169 234 static int analog_cooked_read(struct analog_port *port) 170 235 { 171 236 struct gameport *gameport = port->gameport; 172 - u64 time[4], start, loop, now; 237 + ktime_t time[4], start, loop, now; 173 238 unsigned int loopout, timeout; 174 239 unsigned char data[4], this, last; 175 240 unsigned long flags; 176 241 int i, j; 177 242 178 243 loopout = (ANALOG_LOOP_TIME * port->loop) / 1000; 179 - timeout = ANALOG_MAX_TIME * port->speed; 244 + timeout = ANALOG_MAX_TIME * NSEC_PER_MSEC; 180 245 181 246 local_irq_save(flags); 182 247 gameport_trigger(gameport); 183 - now = get_time(); 248 + now = ktime_get(); 184 249 local_irq_restore(flags); 185 250 186 251 start = now; ··· 193 258 194 259 local_irq_disable(); 195 260 this = gameport_read(gameport) & port->mask; 196 - now = get_time(); 261 + now = ktime_get(); 197 262 local_irq_restore(flags); 198 263 199 - if ((last ^ this) && (delta(loop, now) < loopout)) { 264 + if ((last ^ this) && (ktime_sub(now, loop) < loopout)) { 200 265 data[i] = last ^ this; 201 266 time[i] = now; 202 267 i++; 203 268 } 204 269 205 - } while (this && (i < 4) && (delta(start, now) < timeout)); 270 + } while (this && (i < 4) && (ktime_sub(now, start) < timeout)); 206 271 207 272 this <<= 4; 208 273 ··· 210 275 this |= data[i]; 211 276 for (j = 0; j < 4; j++) 212 277 if (data[i] & (1 << j)) 213 - port->axes[j] = (delta(start, time[i]) << ANALOG_FUZZ_BITS) / port->loop; 278 + port->axes[j] = ((u32)ktime_sub(time[i], start) << ANALOG_FUZZ_BITS) / port->loop; 214 279 } 215 280 216 281 return -(this != port->mask); ··· 310 375 { 311 376 struct gameport *gameport = port->gameport; 312 377 unsigned int i, t, tx; 313 - u64 t1, t2, t3; 378 + ktime_t t1, t2, t3; 314 379 unsigned long flags; 315 - 316 - if (use_ktime) { 317 - port->speed = 1000000; 318 - } else { 319 - local_irq_save(flags); 320 - t1 = get_time(); 321 - #ifdef FAKE_TIME 322 - analog_faketime += 830; 323 - #endif 324 - mdelay(1); 325 - t2 = get_time(); 326 - t3 = get_time(); 327 - local_irq_restore(flags); 328 - 329 - port->speed = delta(t1, t2) - delta(t2, t3); 330 - } 331 380 332 381 tx = ~0; 333 382 334 383 for (i = 0; i < 50; i++) { 335 384 local_irq_save(flags); 336 - t1 = get_time(); 385 + t1 = ktime_get(); 337 386 for (t = 0; t < 50; t++) { 338 387 gameport_read(gameport); 339 - t2 = get_time(); 388 + t2 = ktime_get(); 340 389 } 341 - t3 = get_time(); 390 + t3 = ktime_get(); 342 391 local_irq_restore(flags); 343 392 udelay(i); 344 - t = delta(t1, t2) - delta(t2, t3); 393 + t = ktime_sub(t2, t1) - ktime_sub(t3, t2); 345 394 if (t < tx) tx = t; 346 395 } 347 396 ··· 530 611 t = gameport_read(gameport); 531 612 msleep(ANALOG_MAX_TIME); 532 613 port->mask = (gameport_read(gameport) ^ t) & t & 0xf; 533 - port->fuzz = (port->speed * ANALOG_FUZZ_MAGIC) / port->loop / 1000 + ANALOG_FUZZ_BITS; 614 + port->fuzz = (NSEC_PER_MSEC * ANALOG_FUZZ_MAGIC) / port->loop / 1000 + ANALOG_FUZZ_BITS; 534 615 535 616 for (i = 0; i < ANALOG_INIT_RETRIES; i++) { 536 617 if (!analog_cooked_read(port))
+1 -1
drivers/input/keyboard/Kconfig
··· 210 210 select SERIO 211 211 help 212 212 Say Y here if you want to use a LK201 or LK401 style serial 213 - keyboard. This keyboard is also useable on PCs if you attach 213 + keyboard. This keyboard is also usable on PCs if you attach 214 214 it with the inputattach program. The connector pinout is 215 215 described within lkkbd.c. 216 216
+1 -1
drivers/input/keyboard/adc-keys.c
··· 193 193 MODULE_DEVICE_TABLE(of, adc_keys_of_match); 194 194 #endif 195 195 196 - static struct platform_driver __refdata adc_keys_driver = { 196 + static struct platform_driver adc_keys_driver = { 197 197 .driver = { 198 198 .name = "adc_keys", 199 199 .of_match_table = of_match_ptr(adc_keys_of_match),
+1 -1
drivers/input/keyboard/adp5588-keys.c
··· 17 17 #include <linux/platform_device.h> 18 18 #include <linux/input.h> 19 19 #include <linux/i2c.h> 20 - #include <linux/gpio.h> 20 + #include <linux/gpio/driver.h> 21 21 #include <linux/slab.h> 22 22 23 23 #include <linux/platform_data/adp5588.h>
+1 -1
drivers/input/keyboard/adp5589-keys.c
··· 18 18 #include <linux/platform_device.h> 19 19 #include <linux/input.h> 20 20 #include <linux/i2c.h> 21 - #include <linux/gpio.h> 21 + #include <linux/gpio/driver.h> 22 22 #include <linux/slab.h> 23 23 24 24 #include <linux/input/adp5589.h>
+2 -2
drivers/input/keyboard/ep93xx_keypad.c
··· 157 157 158 158 if (!keypad->enabled) { 159 159 ep93xx_keypad_config(keypad); 160 - clk_enable(keypad->clk); 160 + clk_prepare_enable(keypad->clk); 161 161 keypad->enabled = true; 162 162 } 163 163 ··· 169 169 struct ep93xx_keypad *keypad = input_get_drvdata(pdev); 170 170 171 171 if (keypad->enabled) { 172 - clk_disable(keypad->clk); 172 + clk_disable_unprepare(keypad->clk); 173 173 keypad->enabled = false; 174 174 } 175 175 }
-22
drivers/input/misc/Kconfig
··· 309 309 To compile this driver as a module, choose M here: the module will be 310 310 called gpio-vibra. 311 311 312 - config INPUT_IXP4XX_BEEPER 313 - tristate "IXP4XX Beeper support" 314 - depends on ARCH_IXP4XX 315 - help 316 - If you say yes here, you can connect a beeper to the 317 - ixp4xx gpio pins. This is used by the LinkSys NSLU2. 318 - 319 - If unsure, say Y. 320 - 321 - To compile this driver as a module, choose M here: the 322 - module will be called ixp4xx-beeper. 323 - 324 312 config INPUT_COBALT_BTNS 325 313 tristate "Cobalt button interface" 326 314 depends on MIPS_COBALT ··· 798 810 799 811 To compile this driver as a module, choose M here: the 800 812 module will be called xen-kbdfront. 801 - 802 - config INPUT_SIRFSOC_ONKEY 803 - tristate "CSR SiRFSoC power on/off/suspend key support" 804 - depends on ARCH_SIRF && OF 805 - default y 806 - help 807 - Say Y here if you want to support for the SiRFSoC power on/off/suspend key 808 - in Linux, after you press the onkey, system will suspend. 809 - 810 - If unsure, say N. 811 813 812 814 config INPUT_IDEAPAD_SLIDEBAR 813 815 tristate "IdeaPad Laptop Slidebar"
-2
drivers/input/misc/Makefile
··· 44 44 obj-$(CONFIG_INPUT_IMS_PCU) += ims-pcu.o 45 45 obj-$(CONFIG_INPUT_IQS269A) += iqs269a.o 46 46 obj-$(CONFIG_INPUT_IQS626A) += iqs626a.o 47 - obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o 48 47 obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o 49 48 obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o 50 49 obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o ··· 73 74 obj-$(CONFIG_INPUT_RK805_PWRKEY) += rk805-pwrkey.o 74 75 obj-$(CONFIG_INPUT_SC27XX_VIBRA) += sc27xx-vibra.o 75 76 obj-$(CONFIG_INPUT_SGI_BTNS) += sgi_btns.o 76 - obj-$(CONFIG_INPUT_SIRFSOC_ONKEY) += sirfsoc-onkey.o 77 77 obj-$(CONFIG_INPUT_SOC_BUTTON_ARRAY) += soc_button_array.o 78 78 obj-$(CONFIG_INPUT_SPARCSPKR) += sparcspkr.o 79 79 obj-$(CONFIG_INPUT_STPMIC1_ONKEY) += stpmic1_onkey.o
-183
drivers/input/misc/ixp4xx-beeper.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * Generic IXP4xx beeper driver 4 - * 5 - * Copyright (C) 2005 Tower Technologies 6 - * 7 - * based on nslu2-io.c 8 - * Copyright (C) 2004 Karen Spearel 9 - * 10 - * Author: Alessandro Zummo <a.zummo@towertech.it> 11 - * Maintainers: http://www.nslu2-linux.org/ 12 - */ 13 - 14 - #include <linux/module.h> 15 - #include <linux/input.h> 16 - #include <linux/delay.h> 17 - #include <linux/platform_device.h> 18 - #include <linux/interrupt.h> 19 - #include <linux/gpio.h> 20 - #include <mach/hardware.h> 21 - 22 - MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); 23 - MODULE_DESCRIPTION("ixp4xx beeper driver"); 24 - MODULE_LICENSE("GPL"); 25 - MODULE_ALIAS("platform:ixp4xx-beeper"); 26 - 27 - static DEFINE_SPINLOCK(beep_lock); 28 - 29 - static int ixp4xx_timer2_irq; 30 - 31 - static void ixp4xx_spkr_control(unsigned int pin, unsigned int count) 32 - { 33 - unsigned long flags; 34 - 35 - spin_lock_irqsave(&beep_lock, flags); 36 - 37 - if (count) { 38 - gpio_direction_output(pin, 0); 39 - *IXP4XX_OSRT2 = (count & ~IXP4XX_OST_RELOAD_MASK) | IXP4XX_OST_ENABLE; 40 - } else { 41 - gpio_direction_output(pin, 1); 42 - gpio_direction_input(pin); 43 - *IXP4XX_OSRT2 = 0; 44 - } 45 - 46 - spin_unlock_irqrestore(&beep_lock, flags); 47 - } 48 - 49 - static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) 50 - { 51 - unsigned int pin = (unsigned int) input_get_drvdata(dev); 52 - unsigned int count = 0; 53 - 54 - if (type != EV_SND) 55 - return -1; 56 - 57 - switch (code) { 58 - case SND_BELL: 59 - if (value) 60 - value = 1000; 61 - case SND_TONE: 62 - break; 63 - default: 64 - return -1; 65 - } 66 - 67 - if (value > 20 && value < 32767) 68 - count = (ixp4xx_timer_freq / (value * 4)) - 1; 69 - 70 - ixp4xx_spkr_control(pin, count); 71 - 72 - return 0; 73 - } 74 - 75 - static irqreturn_t ixp4xx_spkr_interrupt(int irq, void *dev_id) 76 - { 77 - unsigned int pin = (unsigned int) dev_id; 78 - 79 - /* clear interrupt */ 80 - *IXP4XX_OSST = IXP4XX_OSST_TIMER_2_PEND; 81 - 82 - /* flip the beeper output */ 83 - gpio_set_value(pin, !gpio_get_value(pin)); 84 - 85 - return IRQ_HANDLED; 86 - } 87 - 88 - static int ixp4xx_spkr_probe(struct platform_device *dev) 89 - { 90 - struct input_dev *input_dev; 91 - int irq; 92 - int err; 93 - 94 - input_dev = input_allocate_device(); 95 - if (!input_dev) 96 - return -ENOMEM; 97 - 98 - input_set_drvdata(input_dev, (void *) dev->id); 99 - 100 - input_dev->name = "ixp4xx beeper"; 101 - input_dev->phys = "ixp4xx/gpio"; 102 - input_dev->id.bustype = BUS_HOST; 103 - input_dev->id.vendor = 0x001f; 104 - input_dev->id.product = 0x0001; 105 - input_dev->id.version = 0x0100; 106 - input_dev->dev.parent = &dev->dev; 107 - 108 - input_dev->evbit[0] = BIT_MASK(EV_SND); 109 - input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE); 110 - input_dev->event = ixp4xx_spkr_event; 111 - 112 - irq = platform_get_irq(dev, 0); 113 - if (irq < 0) { 114 - err = irq; 115 - goto err_free_device; 116 - } 117 - 118 - err = gpio_request(dev->id, "ixp4-beeper"); 119 - if (err) 120 - goto err_free_device; 121 - 122 - err = request_irq(irq, &ixp4xx_spkr_interrupt, 123 - IRQF_NO_SUSPEND, "ixp4xx-beeper", 124 - (void *) dev->id); 125 - if (err) 126 - goto err_free_gpio; 127 - ixp4xx_timer2_irq = irq; 128 - 129 - err = input_register_device(input_dev); 130 - if (err) 131 - goto err_free_irq; 132 - 133 - platform_set_drvdata(dev, input_dev); 134 - 135 - return 0; 136 - 137 - err_free_irq: 138 - free_irq(irq, (void *)dev->id); 139 - err_free_gpio: 140 - gpio_free(dev->id); 141 - err_free_device: 142 - input_free_device(input_dev); 143 - 144 - return err; 145 - } 146 - 147 - static int ixp4xx_spkr_remove(struct platform_device *dev) 148 - { 149 - struct input_dev *input_dev = platform_get_drvdata(dev); 150 - unsigned int pin = (unsigned int) input_get_drvdata(input_dev); 151 - 152 - input_unregister_device(input_dev); 153 - 154 - /* turn the speaker off */ 155 - disable_irq(ixp4xx_timer2_irq); 156 - ixp4xx_spkr_control(pin, 0); 157 - 158 - free_irq(ixp4xx_timer2_irq, (void *)dev->id); 159 - gpio_free(dev->id); 160 - 161 - return 0; 162 - } 163 - 164 - static void ixp4xx_spkr_shutdown(struct platform_device *dev) 165 - { 166 - struct input_dev *input_dev = platform_get_drvdata(dev); 167 - unsigned int pin = (unsigned int) input_get_drvdata(input_dev); 168 - 169 - /* turn off the speaker */ 170 - disable_irq(ixp4xx_timer2_irq); 171 - ixp4xx_spkr_control(pin, 0); 172 - } 173 - 174 - static struct platform_driver ixp4xx_spkr_platform_driver = { 175 - .driver = { 176 - .name = "ixp4xx-beeper", 177 - }, 178 - .probe = ixp4xx_spkr_probe, 179 - .remove = ixp4xx_spkr_remove, 180 - .shutdown = ixp4xx_spkr_shutdown, 181 - }; 182 - module_platform_driver(ixp4xx_spkr_platform_driver); 183 -
+1 -1
drivers/input/misc/pm8941-pwrkey.c
··· 284 284 } 285 285 286 286 if (pwrkey->data->supports_ps_hold_poff_config) { 287 - pwrkey->reboot_notifier.notifier_call = pm8941_reboot_notify, 287 + pwrkey->reboot_notifier.notifier_call = pm8941_reboot_notify; 288 288 error = register_reboot_notifier(&pwrkey->reboot_notifier); 289 289 if (error) { 290 290 dev_err(&pdev->dev, "failed to register reboot notifier: %d\n",
-207
drivers/input/misc/sirfsoc-onkey.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-or-later 2 - /* 3 - * Power key driver for SiRF PrimaII 4 - * 5 - * Copyright (c) 2013 - 2014 Cambridge Silicon Radio Limited, a CSR plc group 6 - * company. 7 - */ 8 - 9 - #include <linux/module.h> 10 - #include <linux/interrupt.h> 11 - #include <linux/delay.h> 12 - #include <linux/platform_device.h> 13 - #include <linux/input.h> 14 - #include <linux/rtc/sirfsoc_rtciobrg.h> 15 - #include <linux/of.h> 16 - #include <linux/workqueue.h> 17 - 18 - struct sirfsoc_pwrc_drvdata { 19 - u32 pwrc_base; 20 - struct input_dev *input; 21 - struct delayed_work work; 22 - }; 23 - 24 - #define PWRC_ON_KEY_BIT (1 << 0) 25 - 26 - #define PWRC_INT_STATUS 0xc 27 - #define PWRC_INT_MASK 0x10 28 - #define PWRC_PIN_STATUS 0x14 29 - #define PWRC_KEY_DETECT_UP_TIME 20 /* ms*/ 30 - 31 - static int sirfsoc_pwrc_is_on_key_down(struct sirfsoc_pwrc_drvdata *pwrcdrv) 32 - { 33 - u32 state = sirfsoc_rtc_iobrg_readl(pwrcdrv->pwrc_base + 34 - PWRC_PIN_STATUS); 35 - return !(state & PWRC_ON_KEY_BIT); /* ON_KEY is active low */ 36 - } 37 - 38 - static void sirfsoc_pwrc_report_event(struct work_struct *work) 39 - { 40 - struct sirfsoc_pwrc_drvdata *pwrcdrv = 41 - container_of(work, struct sirfsoc_pwrc_drvdata, work.work); 42 - 43 - if (sirfsoc_pwrc_is_on_key_down(pwrcdrv)) { 44 - schedule_delayed_work(&pwrcdrv->work, 45 - msecs_to_jiffies(PWRC_KEY_DETECT_UP_TIME)); 46 - } else { 47 - input_event(pwrcdrv->input, EV_KEY, KEY_POWER, 0); 48 - input_sync(pwrcdrv->input); 49 - } 50 - } 51 - 52 - static irqreturn_t sirfsoc_pwrc_isr(int irq, void *dev_id) 53 - { 54 - struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_id; 55 - u32 int_status; 56 - 57 - int_status = sirfsoc_rtc_iobrg_readl(pwrcdrv->pwrc_base + 58 - PWRC_INT_STATUS); 59 - sirfsoc_rtc_iobrg_writel(int_status & ~PWRC_ON_KEY_BIT, 60 - pwrcdrv->pwrc_base + PWRC_INT_STATUS); 61 - 62 - input_event(pwrcdrv->input, EV_KEY, KEY_POWER, 1); 63 - input_sync(pwrcdrv->input); 64 - schedule_delayed_work(&pwrcdrv->work, 65 - msecs_to_jiffies(PWRC_KEY_DETECT_UP_TIME)); 66 - 67 - return IRQ_HANDLED; 68 - } 69 - 70 - static void sirfsoc_pwrc_toggle_interrupts(struct sirfsoc_pwrc_drvdata *pwrcdrv, 71 - bool enable) 72 - { 73 - u32 int_mask; 74 - 75 - int_mask = sirfsoc_rtc_iobrg_readl(pwrcdrv->pwrc_base + PWRC_INT_MASK); 76 - if (enable) 77 - int_mask |= PWRC_ON_KEY_BIT; 78 - else 79 - int_mask &= ~PWRC_ON_KEY_BIT; 80 - sirfsoc_rtc_iobrg_writel(int_mask, pwrcdrv->pwrc_base + PWRC_INT_MASK); 81 - } 82 - 83 - static int sirfsoc_pwrc_open(struct input_dev *input) 84 - { 85 - struct sirfsoc_pwrc_drvdata *pwrcdrv = input_get_drvdata(input); 86 - 87 - sirfsoc_pwrc_toggle_interrupts(pwrcdrv, true); 88 - 89 - return 0; 90 - } 91 - 92 - static void sirfsoc_pwrc_close(struct input_dev *input) 93 - { 94 - struct sirfsoc_pwrc_drvdata *pwrcdrv = input_get_drvdata(input); 95 - 96 - sirfsoc_pwrc_toggle_interrupts(pwrcdrv, false); 97 - cancel_delayed_work_sync(&pwrcdrv->work); 98 - } 99 - 100 - static const struct of_device_id sirfsoc_pwrc_of_match[] = { 101 - { .compatible = "sirf,prima2-pwrc" }, 102 - {}, 103 - }; 104 - MODULE_DEVICE_TABLE(of, sirfsoc_pwrc_of_match); 105 - 106 - static int sirfsoc_pwrc_probe(struct platform_device *pdev) 107 - { 108 - struct device_node *np = pdev->dev.of_node; 109 - struct sirfsoc_pwrc_drvdata *pwrcdrv; 110 - int irq; 111 - int error; 112 - 113 - pwrcdrv = devm_kzalloc(&pdev->dev, sizeof(struct sirfsoc_pwrc_drvdata), 114 - GFP_KERNEL); 115 - if (!pwrcdrv) { 116 - dev_info(&pdev->dev, "Not enough memory for the device data\n"); 117 - return -ENOMEM; 118 - } 119 - 120 - /* 121 - * We can't use of_iomap because pwrc is not mapped in memory, 122 - * the so-called base address is only offset in rtciobrg 123 - */ 124 - error = of_property_read_u32(np, "reg", &pwrcdrv->pwrc_base); 125 - if (error) { 126 - dev_err(&pdev->dev, 127 - "unable to find base address of pwrc node in dtb\n"); 128 - return error; 129 - } 130 - 131 - pwrcdrv->input = devm_input_allocate_device(&pdev->dev); 132 - if (!pwrcdrv->input) 133 - return -ENOMEM; 134 - 135 - pwrcdrv->input->name = "sirfsoc pwrckey"; 136 - pwrcdrv->input->phys = "pwrc/input0"; 137 - pwrcdrv->input->evbit[0] = BIT_MASK(EV_KEY); 138 - input_set_capability(pwrcdrv->input, EV_KEY, KEY_POWER); 139 - 140 - INIT_DELAYED_WORK(&pwrcdrv->work, sirfsoc_pwrc_report_event); 141 - 142 - pwrcdrv->input->open = sirfsoc_pwrc_open; 143 - pwrcdrv->input->close = sirfsoc_pwrc_close; 144 - 145 - input_set_drvdata(pwrcdrv->input, pwrcdrv); 146 - 147 - /* Make sure the device is quiesced */ 148 - sirfsoc_pwrc_toggle_interrupts(pwrcdrv, false); 149 - 150 - irq = platform_get_irq(pdev, 0); 151 - error = devm_request_irq(&pdev->dev, irq, 152 - sirfsoc_pwrc_isr, 0, 153 - "sirfsoc_pwrc_int", pwrcdrv); 154 - if (error) { 155 - dev_err(&pdev->dev, "unable to claim irq %d, error: %d\n", 156 - irq, error); 157 - return error; 158 - } 159 - 160 - error = input_register_device(pwrcdrv->input); 161 - if (error) { 162 - dev_err(&pdev->dev, 163 - "unable to register input device, error: %d\n", 164 - error); 165 - return error; 166 - } 167 - 168 - dev_set_drvdata(&pdev->dev, pwrcdrv); 169 - device_init_wakeup(&pdev->dev, 1); 170 - 171 - return 0; 172 - } 173 - 174 - static int __maybe_unused sirfsoc_pwrc_resume(struct device *dev) 175 - { 176 - struct sirfsoc_pwrc_drvdata *pwrcdrv = dev_get_drvdata(dev); 177 - struct input_dev *input = pwrcdrv->input; 178 - 179 - /* 180 - * Do not mask pwrc interrupt as we want pwrc work as a wakeup source 181 - * if users touch X_ONKEY_B, see arch/arm/mach-prima2/pm.c 182 - */ 183 - mutex_lock(&input->mutex); 184 - if (input_device_enabled(input)) 185 - sirfsoc_pwrc_toggle_interrupts(pwrcdrv, true); 186 - mutex_unlock(&input->mutex); 187 - 188 - return 0; 189 - } 190 - 191 - static SIMPLE_DEV_PM_OPS(sirfsoc_pwrc_pm_ops, NULL, sirfsoc_pwrc_resume); 192 - 193 - static struct platform_driver sirfsoc_pwrc_driver = { 194 - .probe = sirfsoc_pwrc_probe, 195 - .driver = { 196 - .name = "sirfsoc-pwrc", 197 - .pm = &sirfsoc_pwrc_pm_ops, 198 - .of_match_table = sirfsoc_pwrc_of_match, 199 - } 200 - }; 201 - 202 - module_platform_driver(sirfsoc_pwrc_driver); 203 - 204 - MODULE_LICENSE("GPL v2"); 205 - MODULE_AUTHOR("Binghua Duan <Binghua.Duan@csr.com>, Xianglong Du <Xianglong.Du@csr.com>"); 206 - MODULE_DESCRIPTION("CSR Prima2 PWRC Driver"); 207 - MODULE_ALIAS("platform:sirfsoc-pwrc");
+2 -1
drivers/input/mouse/elan_i2c.h
··· 55 55 #define ETP_FW_PAGE_SIZE_512 512 56 56 #define ETP_FW_SIGNATURE_SIZE 6 57 57 58 - #define ETP_PRODUCT_ID_DELBIN 0x00C2 58 + #define ETP_PRODUCT_ID_WHITEBOX 0x00B8 59 59 #define ETP_PRODUCT_ID_VOXEL 0x00BF 60 + #define ETP_PRODUCT_ID_DELBIN 0x00C2 60 61 #define ETP_PRODUCT_ID_MAGPIE 0x0120 61 62 #define ETP_PRODUCT_ID_BOBBA 0x0121 62 63
+1
drivers/input/mouse/elan_i2c_core.c
··· 105 105 u32 quirks; 106 106 } elan_i2c_quirks[] = { 107 107 { 0x0D, ETP_PRODUCT_ID_DELBIN, ETP_QUIRK_QUICK_WAKEUP }, 108 + { 0x0D, ETP_PRODUCT_ID_WHITEBOX, ETP_QUIRK_QUICK_WAKEUP }, 108 109 { 0x10, ETP_PRODUCT_ID_VOXEL, ETP_QUIRK_QUICK_WAKEUP }, 109 110 { 0x14, ETP_PRODUCT_ID_MAGPIE, ETP_QUIRK_QUICK_WAKEUP }, 110 111 { 0x14, ETP_PRODUCT_ID_BOBBA, ETP_QUIRK_QUICK_WAKEUP },
+1 -13
drivers/input/serio/parkbd.c
··· 220 220 .detach = parkbd_detach, 221 221 .devmodel = true, 222 222 }; 223 - 224 - static int __init parkbd_init(void) 225 - { 226 - return parport_register_driver(&parkbd_parport_driver); 227 - } 228 - 229 - static void __exit parkbd_exit(void) 230 - { 231 - parport_unregister_driver(&parkbd_parport_driver); 232 - } 233 - 234 - module_init(parkbd_init); 235 - module_exit(parkbd_exit); 223 + module_parport_driver(parkbd_parport_driver);
+1 -1
drivers/input/touchscreen/Kconfig
··· 932 932 - JASTEC USB Touch Controller/DigiTech DTR-02U 933 933 - Zytronic controllers 934 934 - Elo TouchSystems 2700 IntelliTouch 935 - - EasyTouch USB Touch Controller from Data Modul 935 + - EasyTouch USB Touch Controller from Data Module 936 936 - e2i (Mimo monitors) 937 937 938 938 Have a look at <http://linux.chapter7.ch/touchkit/> for
+1
drivers/input/touchscreen/edt-ft5x06.c
··· 899 899 * the identification registers. 900 900 */ 901 901 switch (rdbuf[0]) { 902 + case 0x11: /* EDT EP0110M09 */ 902 903 case 0x35: /* EDT EP0350M09 */ 903 904 case 0x43: /* EDT EP0430M09 */ 904 905 case 0x50: /* EDT EP0500M09 */
+11 -4
drivers/input/touchscreen/mms114.c
··· 54 54 55 55 enum mms_type { 56 56 TYPE_MMS114 = 114, 57 + TYPE_MMS134S = 134, 57 58 TYPE_MMS136 = 136, 58 59 TYPE_MMS152 = 152, 59 60 TYPE_MMS345L = 345, ··· 213 212 goto out; 214 213 215 214 /* MMS136 has slightly different event size */ 216 - if (data->type == TYPE_MMS136) 215 + if (data->type == TYPE_MMS134S || data->type == TYPE_MMS136) 217 216 touch_size = packet_size / MMS136_EVENT_SIZE; 218 217 else 219 218 touch_size = packet_size / MMS114_EVENT_SIZE; ··· 282 281 break; 283 282 284 283 case TYPE_MMS114: 284 + case TYPE_MMS134S: 285 285 case TYPE_MMS136: 286 286 error = __mms114_read_reg(data, MMS114_TSP_REV, 6, buf); 287 287 if (error) ··· 306 304 if (error < 0) 307 305 return error; 308 306 309 - /* Only MMS114 and MMS136 have configuration and power on registers */ 310 - if (data->type != TYPE_MMS114 && data->type != TYPE_MMS136) 307 + /* MMS114, MMS134S and MMS136 have configuration and power on registers */ 308 + if (data->type != TYPE_MMS114 && data->type != TYPE_MMS134S && 309 + data->type != TYPE_MMS136) 311 310 return 0; 312 311 313 312 error = mms114_set_active(data, true); ··· 490 487 0, data->props.max_y, 0, 0); 491 488 } 492 489 493 - if (data->type == TYPE_MMS114 || data->type == TYPE_MMS136) { 490 + if (data->type == TYPE_MMS114 || data->type == TYPE_MMS134S || 491 + data->type == TYPE_MMS136) { 494 492 /* 495 493 * The firmware handles movement and pressure fuzz, so 496 494 * don't duplicate that in software. ··· 615 611 { 616 612 .compatible = "melfas,mms114", 617 613 .data = (void *)TYPE_MMS114, 614 + }, { 615 + .compatible = "melfas,mms134s", 616 + .data = (void *)TYPE_MMS134S, 618 617 }, { 619 618 .compatible = "melfas,mms136", 620 619 .data = (void *)TYPE_MMS136,