* Re: [BUG] Kmemleak, possibly hiddev_connect(), in 6.3.0+ torvalds tree commit gfc4354c6e5c2
From: Greg Kroah-Hartman @ 2023-05-08 14:01 UTC (permalink / raw)
To: Mirsad Goran Todorovac
Cc: linux-usb, linux-kernel, linux-input, Benjamin Tissoires,
Jiri Kosina
In-Reply-To: <2023050824-juiciness-catching-9290@gregkh>
On Mon, May 08, 2023 at 08:51:55AM +0200, Greg Kroah-Hartman wrote:
> On Mon, May 08, 2023 at 08:30:07AM +0200, Mirsad Goran Todorovac wrote:
> > Hi,
> >
> > There seems to be a kernel memory leak in the USB keyboard driver.
> >
> > The leaked memory allocs are 96 and 512 bytes.
> >
> > The platform is Ubuntu 22.04 LTS on a assembled AMD Ryzen 9 with X670E PG
> > Lightning mobo,
> > and Genius SlimStar i220 GK-080012 keyboard.
> >
> > (Logitech M100 HID mouse is not affected by the bug.)
> >
> > BIOS is:
> >
> > *-firmware
> > description: BIOS
> > vendor: American Megatrends International, LLC.
> > physical id: 0
> > version: 1.21
> > date: 04/26/2023
> > size: 64KiB
> >
> > The kernel is 6.3.0-torvalds-<id>-13466-gfc4354c6e5c2.
> >
> > The keyboard is recognised as Chicony:
> >
> > *-usb
> > description: Keyboard
> > product: CHICONY USB Keyboard
> > vendor: CHICONY
> > physical id: 2
> > bus info: usb@5:2
> > logical name: input35
> > logical name: /dev/input/event4
> > logical name: input35::capslock
> > logical name: input35::numlock
> > logical name: input35::scrolllock
> > logical name: input36
> > logical name: /dev/input/event5
> > logical name: input37
> > logical name: /dev/input/event6
> > logical name: input38
> > logical name: /dev/input/event8
> > version: 2.30
> > capabilities: usb-2.00 usb
> > configuration: driver=usbhid maxpower=100mA
> > speed=1Mbit/s
> >
> > The bug is easily reproduced by unplugging the USB keyboard, waiting about a
> > couple of seconds,
> > and then reconnect and scan for memory leaks twice.
> >
> > The kmemleak log is as follows [edited privacy info]:
> >
> > root@hostname:/home/username# cat /sys/kernel/debug/kmemleak
> > unreferenced object 0xffff8dd020037c00 (size 96):
> > comm "systemd-udevd", pid 435, jiffies 4294892550 (age 8909.356s)
> > hex dump (first 32 bytes):
> > 5d 8e 4e b9 ff ff ff ff 00 00 00 00 00 00 00 00 ].N.............
> > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > backtrace:
> > [<ffffffffb81a74be>] __kmem_cache_alloc_node+0x22e/0x2b0
> > [<ffffffffb8127b6e>] kmalloc_trace+0x2e/0xa0
> > [<ffffffffb87543d9>] class_create+0x29/0x80
> > [<ffffffffb8880d24>] usb_register_dev+0x1d4/0x2e0
>
> As the call to class_create() in this path is now gone in 6.4-rc1, can
> you retry that release to see if this is still there or not?
No, wait, it's still there, I was looking at a development branch of
mine that isn't sent upstream yet. And syzbot just reported the same
thing:
https://lore.kernel.org/r/00000000000058d15f05fb264013@google.com
So something's wrong here, let me dig into it tomorrow when I get a
chance...
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v4 2/2] dt-bindings: MFD: Convert STMPE to YAML schema
From: Krzysztof Kozlowski @ 2023-05-08 13:34 UTC (permalink / raw)
To: Linus Walleij
Cc: Rob Herring, linux-gpio, linux-input, Rob Herring,
Krzysztof Kozlowski, Alexandre Torgue, Marek Vasut,
Philippe Schenker, Dmitry Torokhov, Steffen Trumtrar, devicetree,
Lee Jones, linux-kernel, Stefan Agner, Maxime Coquelin,
linux-stm32, Bartosz Golaszewski, linux-arm-kernel
In-Reply-To: <20230426-stmpe-dt-bindings-v4-2-36fdd53d9919@linaro.org>
On Mon, 08 May 2023 14:35:10 +0200, Linus Walleij wrote:
> This converts the STMPE MFD device tree bindings to the YAML
> schema.
>
> Reference the existing schema for the ADC, just define the
> other subnode schemas directly in the MFD schema.
>
> Add two examples so we have examples covering both the simple
> GPIO expander and the more complex with ADC and touchscreen.
>
> Some in-tree users do not follow the naming conventions for nodes
> so these DTS files need to be augmented to use proper node names
> like "adc", "pwm", "gpio", "keyboard-controller" etc before the
> bindings take effect on them.
>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Drop the required pwm properties already required by the
> template pwm schema.
> - Add the number of PWM cells as const.
> ChangeLog v1->v2:
> - Split off the GPIO bindings to their own schema, as the old
> bindings didn't even have any GPIO bindings. Put the GPIO
> schema before this schema so we can use GPIO in the examples.
> - Drop nodename and pattern as STMPE is not a generic name.
> - Add maxItems to the resets.
> - Make wakeup-source just :true, as it is a generic property.
> - Move unevaluatedProperties for subnodes right before properties
> as requested.
> - Name devices "port-expander" in the examples.
> - Use lowercase hex in line init.
> ---
> .../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
> .../bindings/input/touchscreen/stmpe.txt | 108 --------
> .../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
> Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
> 4 files changed, 297 insertions(+), 191 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mfd/st,stmpe.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: port-expander@43: gpio: False schema does not allow {'compatible': ['st,stmpe-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]], 'st,norequest-mask': [[15790082]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: /example-0/i2c/port-expander@43/gpio: failed to match any schema with compatible: ['st,stmpe-gpio']
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: port-expander@41: gpio: False schema does not allow {'compatible': ['st,stmpe-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: /example-0/i2c/port-expander@41/gpio: failed to match any schema with compatible: ['st,stmpe-gpio']
doc reference errors (make refcheckdocs):
Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst
MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml
See https://patchwork.ozlabs.org/patch/1778351
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply
* [PATCH v4 2/2] dt-bindings: MFD: Convert STMPE to YAML schema
From: Linus Walleij @ 2023-05-08 12:35 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Linus Walleij, Rob Herring
In-Reply-To: <20230426-stmpe-dt-bindings-v4-0-36fdd53d9919@linaro.org>
This converts the STMPE MFD device tree bindings to the YAML
schema.
Reference the existing schema for the ADC, just define the
other subnode schemas directly in the MFD schema.
Add two examples so we have examples covering both the simple
GPIO expander and the more complex with ADC and touchscreen.
Some in-tree users do not follow the naming conventions for nodes
so these DTS files need to be augmented to use proper node names
like "adc", "pwm", "gpio", "keyboard-controller" etc before the
bindings take effect on them.
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- Drop the required pwm properties already required by the
template pwm schema.
- Add the number of PWM cells as const.
ChangeLog v1->v2:
- Split off the GPIO bindings to their own schema, as the old
bindings didn't even have any GPIO bindings. Put the GPIO
schema before this schema so we can use GPIO in the examples.
- Drop nodename and pattern as STMPE is not a generic name.
- Add maxItems to the resets.
- Make wakeup-source just :true, as it is a generic property.
- Move unevaluatedProperties for subnodes right before properties
as requested.
- Name devices "port-expander" in the examples.
- Use lowercase hex in line init.
---
.../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
.../bindings/input/touchscreen/stmpe.txt | 108 --------
.../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
4 files changed, 297 insertions(+), 191 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/stmpe-keypad.txt b/Documentation/devicetree/bindings/input/stmpe-keypad.txt
deleted file mode 100644
index 12bb771d66d4..000000000000
--- a/Documentation/devicetree/bindings/input/stmpe-keypad.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-* STMPE Keypad
-
-Required properties:
- - compatible : "st,stmpe-keypad"
- - linux,keymap : See ./matrix-keymap.txt
-
-Optional properties:
- - debounce-interval : Debouncing interval time in milliseconds
- - st,scan-count : Scanning cycles elapsed before key data is updated
- - st,no-autorepeat : If specified device will not autorepeat
- - keypad,num-rows : See ./matrix-keymap.txt
- - keypad,num-columns : See ./matrix-keymap.txt
-
-Example:
-
- stmpe_keypad {
- compatible = "st,stmpe-keypad";
-
- debounce-interval = <64>;
- st,scan-count = <8>;
- st,no-autorepeat;
-
- linux,keymap = <0x205006b
- 0x4010074
- 0x3050072
- 0x1030004
- 0x502006a
- 0x500000a
- 0x5008b
- 0x706001c
- 0x405000b
- 0x6070003
- 0x3040067
- 0x303006c
- 0x60400e7
- 0x602009e
- 0x4020073
- 0x5050002
- 0x4030069
- 0x3020008>;
- };
diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
deleted file mode 100644
index 238b51555c04..000000000000
--- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-STMPE Touchscreen
-----------------
-
-Required properties:
- - compatible: "st,stmpe-ts"
-
-Optional properties:
-- st,ave-ctrl : Sample average control
- 0 -> 1 sample
- 1 -> 2 samples
- 2 -> 4 samples
- 3 -> 8 samples
-- st,touch-det-delay : Touch detect interrupt delay (recommended is 3)
- 0 -> 10 us
- 1 -> 50 us
- 2 -> 100 us
- 3 -> 500 us
- 4 -> 1 ms
- 5 -> 5 ms
- 6 -> 10 ms
- 7 -> 50 ms
-- st,settling : Panel driver settling time (recommended is 2)
- 0 -> 10 us
- 1 -> 100 us
- 2 -> 500 us
- 3 -> 1 ms
- 4 -> 5 ms
- 5 -> 10 ms
- 6 -> 50 ms
- 7 -> 100 ms
-- st,fraction-z : Length of the fractional part in z (recommended is 7)
- (fraction-z ([0..7]) = Count of the fractional part)
-- st,i-drive : current limit value of the touchscreen drivers
- 0 -> 20 mA (typical 35mA max)
- 1 -> 50 mA (typical 80 mA max)
-
-Optional properties common with MFD (deprecated):
- - st,sample-time : ADC conversion time in number of clock.
- 0 -> 36 clocks
- 1 -> 44 clocks
- 2 -> 56 clocks
- 3 -> 64 clocks
- 4 -> 80 clocks (recommended)
- 5 -> 96 clocks
- 6 -> 124 clocks
- - st,mod-12b : ADC Bit mode
- 0 -> 10bit ADC
- 1 -> 12bit ADC
- - st,ref-sel : ADC reference source
- 0 -> internal
- 1 -> external
- - st,adc-freq : ADC Clock speed
- 0 -> 1.625 MHz
- 1 -> 3.25 MHz
- 2 || 3 -> 6.5 MHz
-
-Node should be child node of stmpe node to which it belongs.
-
-Note that common ADC settings of stmpe_touchscreen (child) will take precedence
-over the settings done in MFD.
-
-Example:
-
-stmpe811@41 {
- compatible = "st,stmpe811";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_touch_int>;
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x41>;
- interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
- interrupt-parent = <&gpio4>;
- interrupt-controller;
- id = <0>;
- blocks = <0x5>;
- irq-trigger = <0x1>;
- /* Common ADC settings */
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
-
- stmpe_touchscreen {
- compatible = "st,stmpe-ts";
- reg = <0>;
- /* 8 sample average control */
- st,ave-ctrl = <3>;
- /* 5 ms touch detect interrupt delay */
- st,touch-det-delay = <5>;
- /* 1 ms panel driver settling time */
- st,settling = <3>;
- /* 7 length fractional part in z */
- st,fraction-z = <7>;
- /*
- * 50 mA typical 80 mA max touchscreen drivers
- * current limit value
- */
- st,i-drive = <1>;
- };
- stmpe_adc {
- compatible = "st,stmpe-adc";
- st,norequest-mask = <0x0F>;
- };
-};
diff --git a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
new file mode 100644
index 000000000000..b77cc3f3075d
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
@@ -0,0 +1,297 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/st,stmpe.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectonics Port Expander (STMPE)
+
+description: STMicroelectronics Port Expander (STMPE) is a series of slow
+ bus controllers for various expanded peripherals such as GPIO, keypad,
+ touchscreen, ADC, PWM or rotator. It can contain one or several different
+ peripherals connected to SPI or I2C.
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - st,stmpe601
+ - st,stmpe801
+ - st,stmpe811
+ - st,stmpe1600
+ - st,stmpe1601
+ - st,stmpe2401
+ - st,stmpe2403
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ vcc-supply: true
+
+ vio-supply: true
+
+ reset-gpios:
+ maxItems: 1
+
+ wakeup-source: true
+
+ st,autosleep-timeout:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 4, 16, 32, 64, 128, 256, 512, 1024 ]
+ description: Time idle before going to automatic sleep to save power
+
+ st,sample-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6 ]
+ description: |
+ Sample time per iteration
+ 0 = 36 clock ticks
+ 1 = 44 clock ticks
+ 2 = 56 clock ticks
+ 3 = 64 clock ticks
+ 4 = 80 clock ticks - recommended
+ 5 = 96 clock ticks
+ 6 = 124 clock ticks
+
+ st,mod-12b:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: ADC bit mode 0 = 10bit ADC, 1 = 12bit ADC
+
+ st,ref-sel:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: ADC reference source 0 = internal, 1 = external
+
+ st,adc-freq:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ ADC clock speed
+ 0 = 1.625 MHz
+ 1 = 3.25 MHz
+ 2, 3 = 6.5 MHz
+
+ adc:
+ type: object
+ $ref: /schemas/iio/adc/st,stmpe-adc.yaml#
+
+ gpio:
+ type: object
+ $ref: /schemas/gpio/st,stmpe-gpio.yaml#
+
+ keyboard-controller:
+ type: object
+ $ref: /schemas/input/matrix-keymap.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-keypad
+
+ debounce-interval:
+ description: Debouncing interval in milliseconds
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ st,no-autorepeat:
+ description: If present, the keys will not autorepeat when pressed
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ st,scan-count:
+ description: Scanning cycles elapsed before key data is updated
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ required:
+ - compatible
+ - linux,keymap
+
+ pwm:
+ type: object
+ $ref: /schemas/pwm/pwm.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-pwm
+
+ "#pwm-cells":
+ const: 2
+
+ touchscreen:
+ type: object
+ $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-ts
+
+ st,ave-ctrl:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ Sample average control
+ 0 = 1 sample
+ 1 = 2 samples
+ 2 = 4 samples
+ 3 = 8 samples
+
+ st,touch-det-delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: |
+ Touch detection delay
+ 0 = 10 us
+ 1 = 50 us
+ 2 = 100 us
+ 3 = 500 us - recommended
+ 4 = 1 ms
+ 5 = 5 ms
+ 6 = 10 ms
+ 7 = 50 ms
+
+ st,settling:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: |
+ Panel driver settling time
+ 0 = 10 us
+ 1 = 100 us
+ 2 = 500 us - recommended
+ 3 = 1 ms
+ 4 = 5 ms
+ 5 = 10 ms
+ 6 = 50 ms
+ 7 = 100 ms
+
+ st,fraction-z:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: Length of the fractional part in z, recommended is 7
+ (fraction-z ([0..7]) = Count of the fractional part)
+
+ st,i-drive:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: |
+ current limit value of the touchscreen drivers
+ 0 = 20 mA (typical 35 mA max)
+ 1 = 50 mA (typical 80 mA max)
+
+ required:
+ - compatible
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/input/input.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port-expander@43 {
+ compatible = "st,stmpe2401";
+ reg = <0x43>;
+ reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio>;
+ vcc-supply = <&db8500_vsmps2_reg>;
+ vio-supply = <&db8500_vsmps2_reg>;
+ wakeup-source;
+ st,autosleep-timeout = <1024>;
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ st,norequest-mask = <0xf0f002>;
+ };
+
+ keyboard-controller {
+ compatible = "st,stmpe-keypad";
+ debounce-interval = <64>;
+ st,scan-count = <8>;
+ st,no-autorepeat;
+ keypad,num-rows = <8>;
+ keypad,num-columns = <8>;
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x00, KEY_1)
+ MATRIX_KEY(0x00, 0x01, KEY_2)
+ MATRIX_KEY(0x00, 0x02, KEY_3)
+ MATRIX_KEY(0x00, 0x03, KEY_4)
+ MATRIX_KEY(0x00, 0x04, KEY_5)
+ MATRIX_KEY(0x00, 0x05, KEY_6)
+ MATRIX_KEY(0x00, 0x06, KEY_7)
+ MATRIX_KEY(0x00, 0x07, KEY_8)
+ MATRIX_KEY(0x00, 0x08, KEY_9)
+ MATRIX_KEY(0x00, 0x09, KEY_0)
+ >;
+ };
+
+ pwm {
+ compatible = "st,stmpe-pwm";
+ #pwm-cells = <2>;
+ };
+ };
+
+ port-expander@41 {
+ compatible = "st,stmpe811";
+ reg = <0x41>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio>;
+ st,adc-freq = <1>;
+ st,mod-12b = <1>;
+ st,ref-sel = <0>;
+ st,sample-time = <4>;
+
+ adc {
+ compatible = "st,stmpe-adc";
+ st,norequest-mask = <0x0f>;
+ #io-channel-cells = <1>;
+ };
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pwm {
+ compatible = "st,stmpe-pwm";
+ #pwm-cells = <2>;
+ };
+
+ touchscreen {
+ compatible = "st,stmpe-ts";
+ st,ave-ctrl = <3>;
+ st,touch-det-delay = <5>;
+ st,settling = <3>;
+ st,fraction-z = <7>;
+ st,i-drive = <1>;
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt b/Documentation/devicetree/bindings/mfd/stmpe.txt
deleted file mode 100644
index d4408a417193..000000000000
--- a/Documentation/devicetree/bindings/mfd/stmpe.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-* ST Microelectronics STMPE Multi-Functional Device
-
-STMPE is an MFD device which may expose the following inbuilt devices: gpio,
-keypad, touchscreen, adc, pwm, rotator.
-
-Required properties:
- - compatible : "st,stmpe[610|801|811|1600|1601|2401|2403]"
- - reg : I2C/SPI address of the device
-
-Optional properties:
- - interrupts : The interrupt outputs from the controller
- - interrupt-controller : Marks the device node as an interrupt controller
- - wakeup-source : Marks the input device as wakable
- - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024
- - irq-gpio : If present, which GPIO to use for event IRQ
-
-Optional properties for devices with touch and ADC (STMPE811|STMPE610):
- - st,sample-time : ADC conversion time in number of clock.
- 0 -> 36 clocks 4 -> 80 clocks (recommended)
- 1 -> 44 clocks 5 -> 96 clocks
- 2 -> 56 clocks 6 -> 124 clocks
- 3 -> 64 clocks
- - st,mod-12b : ADC Bit mode
- 0 -> 10bit ADC 1 -> 12bit ADC
- - st,ref-sel : ADC reference source
- 0 -> internal 1 -> external
- - st,adc-freq : ADC Clock speed
- 0 -> 1.625 MHz 2 || 3 -> 6.5 MHz
- 1 -> 3.25 MHz
-
-Example:
-
- stmpe1601: stmpe1601@40 {
- compatible = "st,stmpe1601";
- reg = <0x40>;
- interrupts = <26 0x4>;
- interrupt-parent = <&gpio6>;
- interrupt-controller;
-
- wakeup-source;
- st,autosleep-timeout = <1024>;
- };
--
2.34.1
^ permalink raw reply related
* [PATCH v4 1/2] dt-bindings: gpio: Convert STMPE GPIO to YAML schema
From: Linus Walleij @ 2023-05-08 12:35 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Linus Walleij
In-Reply-To: <20230426-stmpe-dt-bindings-v4-0-36fdd53d9919@linaro.org>
This rewrites the STMPE GPIO bindings to a YAML schema.
We add the properties that are used in the widely used
STMPE GPIO device nodes found in the wild, most notably
interrupt support, so interrupt-cells and
interrupt-controller is now part of the bindings.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v3->v4:
- Realize that there were actually some old bindings so we
need to get rid of them as part of this patch.
- Fix blank lines after description: keyword.
ChangeLog v2->v3:
- Use a compact hog node schema backed by the standard hog
schema.
ChangeLog v1->v2:
- New patch split off from the MFD patch.
---
.../devicetree/bindings/gpio/gpio-stmpe.txt | 17 -------
.../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 53 ++++++++++++++++++++++
2 files changed, 53 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt
deleted file mode 100644
index b33f8f02c0d7..000000000000
--- a/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-STMPE gpio
-----------
-
-Required properties:
- - compatible: "st,stmpe-gpio"
-
-Optional properties:
- - st,norequest-mask: bitmask specifying which GPIOs should _not_ be requestable
- due to different usage (e.g. touch, keypad)
-
-Node should be child node of stmpe node to which it belongs.
-
-Example:
- stmpe_gpio {
- compatible = "st,stmpe-gpio";
- st,norequest-mask = <0x20>; //gpio 5 can't be used
- };
diff --git a/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
new file mode 100644
index 000000000000..22c0cae73425
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectonics Port Expander (STMPE) GPIO Block
+
+description:
+ STMicroelectronics Port Expander (STMPE) is a series of slow
+ bus controllers for various expanded peripherals such as GPIO, keypad,
+ touchscreen, ADC, PWM or rotator. It can contain one or several different
+ peripherals connected to SPI or I2C. These bindings pertain to the
+ GPIO portions of these expanders.
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+ compatible:
+ const: st,stmpe-gpio
+
+ "#gpio-cells":
+ const: 2
+
+ "#interrupt-cells":
+ const: 2
+
+ gpio-controller: true
+
+ interrupt-controller: true
+
+ st,norequest-mask:
+ description:
+ A bitmask of GPIO lines that cannot be requested because for
+ for example not being connected to anything on the system
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+
+ required:
+ - gpio-hog
+
+additionalProperties: false
+
+required:
+ - compatible
+ - "#gpio-cells"
+ - "#interrupt-cells"
+ - gpio-controller
+ - interrupt-controller
--
2.34.1
^ permalink raw reply related
* [PATCH v4 0/2] STMPE device tree bindings
From: Linus Walleij @ 2023-05-08 12:35 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Linus Walleij, Rob Herring
This adds the missing GPIO bindings for the STMPE port expander
and converts the existing MFD binding to YAML.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes in v4:
- Make the GPIO bindings a conversion: there were some old
text bindings for the STMPE GPIO, we now delete them as
part of the patch.
- I expect Lee or the DT binding tree to pick both patches.
- Link to v3: https://lore.kernel.org/r/20230426-stmpe-dt-bindings-v3-0-eac1d736e488@linaro.org
Changes in v3:
- Update to review feedback
- Collected some ack/review tags
- Link to v2: https://lore.kernel.org/r/20230426-stmpe-dt-bindings-v2-0-2f85a1fffcda@linaro.org
Changes in v2:
- Split off a separate GPIO binding
- Updated the MFD binding according to feedback
---
Linus Walleij (2):
dt-bindings: gpio: Convert STMPE GPIO to YAML schema
dt-bindings: MFD: Convert STMPE to YAML schema
.../devicetree/bindings/gpio/gpio-stmpe.txt | 17 --
.../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 53 ++++
.../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
.../bindings/input/touchscreen/stmpe.txt | 108 --------
.../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
6 files changed, 350 insertions(+), 208 deletions(-)
---
base-commit: b777e950b1e0b9112418e7669c8b6d96915df778
change-id: 20230426-stmpe-dt-bindings-c3479dd71a28
Best regards,
--
Linus Walleij <linus.walleij@linaro.org>
^ permalink raw reply
* Re: [PATCH v3 0/2] STMPE device tree bindings
From: Linus Walleij @ 2023-05-08 12:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar,
linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Rob Herring
In-Reply-To: <a34b7181-e635-7fcc-2684-e1ee2efe7096@linaro.org>
On Mon, May 8, 2023 at 11:39 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> On 07/05/2023 23:19, Linus Walleij wrote:
> > This adds the missing GPIO bindings for the STMPE port expander
> > and converts the existing MFD binding to YAML.
> >
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > Changes in v3:
> > - Update to review feedback
> > - Collected some ack/review tags
> > - I guess Bartosz should apply 1/2 and Lee should apply 2/2.
> > - Link to v2: https://lore.kernel.org/r/20230426-stmpe-dt-bindings-v2-0-2f85a1fffcda@linaro.org
>
> 2/2 depends on 1/2, so it must go via one tree.
Ah you're right. I hope Lee can take it all then. Or the DT tree.
Yours,
Linus Walleij
^ permalink raw reply
* [regression] Since kernel 6.3.1 logitech unify receiver not working properly
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-05-08 9:55 UTC (permalink / raw)
To: Filipe Laíns, Bastien Nocera, Jiri Kosina,
Benjamin Tissoires
Cc: open list:HID CORE LAYER, LKML, Linux kernel regressions list,
guy.b
Hi, Thorsten here, the Linux kernel's regression tracker.
I noticed a regression report in bugzilla.kernel.org. As many (most?)
kernel developers don't keep an eye on it, I decided to forward it by mail.
Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217412 :
> guy.b 2023-05-07 07:37:34 UTC
>
> Hello,
>
> Since kernel 6.3.1 the boot process hangs (~ 5 seconds) by uevent triggering with the following errors :
>
> logitech-hidpp-device 0003:046D:405E.0004: hidpp_devicenametype_get_count: received protocol error 0x07
>
>
> The logs about logitech input:
>
> usb 1-8: new full-speed USB device number 2 using xhci_hcd
> mai 06 11:54:24 Cockpit kernel: usb 1-8: New USB device found, idVendor=046d, idProduct=c52b, bcdDevice=24.10
> mai 06 11:54:24 Cockpit kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> mai 06 11:54:24 Cockpit kernel: usb 1-8: Product: USB Receiver
> mai 06 11:54:24 Cockpit kernel: usb 1-8: Manufacturer: Logitech
> mai 06 11:54:24 Cockpit kernel: input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/0003:046D:C52B.0001/input/input4
> mai 06 11:54:24 Cockpit kernel: hid-generic 0003:046D:C52B.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-8/input0
> mai 06 11:54:24 Cockpit kernel: input: Logitech USB Receiver Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:046D:C52B.0002/input/input5
> mai 06 11:54:24 Cockpit kernel: input: Logitech USB Receiver Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:046D:C52B.0002/input/input6
> mai 06 11:54:24 Cockpit kernel: input: Logitech USB Receiver System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1/0003:046D:C52B.0002/input/input7
> mai 06 11:54:24 Cockpit kernel: hid-generic 0003:046D:C52B.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-8/input1
> mai 06 11:54:24 Cockpit kernel: hid-generic 0003:046D:C52B.0003: hiddev97,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-8/input2
> mai 06 11:54:24 Cockpit kernel: usbcore: registered new interface driver usbhid
> mai 06 11:54:24 Cockpit kernel: usbhid: USB HID core driver
> mai 06 11:54:24 Cockpit kernel: logitech-djreceiver 0003:046D:C52B.0003: hiddev96,hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-8/input2
> mai 06 11:54:24 Cockpit kernel: input: Logitech Wireless Device PID:405e Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:405E.0004/input/input9
> mai 06 11:54:24 Cockpit kernel: input: Logitech Wireless Device PID:405e Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:405E.0004/input/input10
> mai 06 11:54:24 Cockpit kernel: hid-generic 0003:046D:405E.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech Wireless Device PID:405e] on usb-0000:00:14.0-8/input2:1
> mai 06 11:54:24 Cockpit kernel: input: Logitech Wireless Device PID:2010 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:2010.0005/input/input14
> mai 06 11:54:24 Cockpit kernel: hid-generic 0003:046D:2010.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech Wireless Device PID:2010] on usb-0000:00:14.0-8/input2:2
> mai 06 11:54:24 Cockpit kernel: logitech-hidpp-device 0003:046D:405E.0004: HID++ 4.5 device connected.
> mai 06 11:54:24 Cockpit kernel: logitech-hidpp-device 0003:046D:405E.0004: hidpp_devicenametype_get_count: received protocol error 0x07
> mai 06 11:54:24 Cockpit kernel: input: Logitech Wireless Device PID:405e as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:405E.0004/input/input18
> mai 06 11:54:24 Cockpit kernel: logitech-hidpp-device 0003:046D:405E.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech Wireless Device PID:405e] on usb-0000:00:14.0-8/input2:1
> mai 06 11:54:24 Cockpit kernel: input: Logitech Wireless Device PID:2010 as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.2/0003:046D:C52B.0003/0003:046D:2010.0005/input/input19
> mai 06 11:54:24 Cockpit kernel: logitech-hidpp-device 0003:046D:2010.0005: input,hidraw2: USB HID v1.11 Keyboard [Logitech Wireless Device PID:2010] on usb-0000:00:14.0-8/input2:2
>
> Next, once booted and remove the unify receiver and plug it again there is a massive lag (~ 15 seconds) before that the receiver get ready for the mouse and keyboard to be functional with following errors :
>
> kernel: logitech-hidpp-device 0003:046D:405E.0022: hidpp_devicenametype_get_count: received protocol error 0x07
> kernel: logitech-hidpp-device 0003:046D:405E.0023: Couldn't get wheel multiplier (error -110)
>
> Unify receiver with K800 keyboard and M720 Triathlon mouse paired.
>
> This happens on my desktop computer but not on my laptop with a unify receiver and a marathon M705 mouse.
>
> Both computer are on Archlinux and up to date.
>
> On the desktop the boot is fine without the unify receiver.
>
> Let me know if you need more info.
>
> Thank you.
See the ticket for more details.
Note, there are two users affected by this (see Comment 5 for the
second), but you have to use bugzilla to reach the second reporter, as I
sadly[1] can not simply CCed them in mails like this (the initial
reporter gave permission).
[TLDR for the rest of this mail: I'm adding this report to the list of
tracked Linux kernel regressions; the text you find below is based on a
few templates paragraphs you might have encountered already in similar
form.]
BTW, let me use this mail to also add the report to the list of tracked
regressions to ensure it's doesn't fall through the cracks:
#regzbot introduced: v6.2..v6.3
https://bugzilla.kernel.org/show_bug.cgi?id=217412
#regzbot title: input: hid: logitech unify receiver not working properly
#regzbot ignore-activity
This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.
Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (e.g. the buzgzilla ticket and maybe this mail as well, if
this thread sees some discussion). See page linked in footer for details.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
[1] because bugzilla.kernel.org tells users upon registration their
"email address will never be displayed to logged out users"
^ permalink raw reply
* Re: [PATCH v3 0/2] STMPE device tree bindings
From: Krzysztof Kozlowski @ 2023-05-08 9:39 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Maxime Coquelin, Alexandre Torgue,
Dmitry Torokhov, Lee Jones, Philippe Schenker, Stefan Agner,
Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Rob Herring
In-Reply-To: <20230426-stmpe-dt-bindings-v3-0-eac1d736e488@linaro.org>
On 07/05/2023 23:19, Linus Walleij wrote:
> This adds the missing GPIO bindings for the STMPE port expander
> and converts the existing MFD binding to YAML.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Changes in v3:
> - Update to review feedback
> - Collected some ack/review tags
> - I guess Bartosz should apply 1/2 and Lee should apply 2/2.
> - Link to v2: https://lore.kernel.org/r/20230426-stmpe-dt-bindings-v2-0-2f85a1fffcda@linaro.org
2/2 depends on 1/2, so it must go via one tree.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v3 2/2] dt-bindings: MFD: Convert STMPE to YAML schema
From: Krzysztof Kozlowski @ 2023-05-08 9:31 UTC (permalink / raw)
To: Rob Herring, Linus Walleij
Cc: Dmitry Torokhov, Krzysztof Kozlowski, Alexandre Torgue,
Stefan Agner, linux-arm-kernel, Steffen Trumtrar,
Bartosz Golaszewski, Maxime Coquelin, Lee Jones,
Philippe Schenker, linux-gpio, devicetree, linux-stm32,
linux-kernel, Rob Herring, linux-input, Marek Vasut
In-Reply-To: <168349835671.3623272.12285551237666172256.robh@kernel.org>
On 08/05/2023 00:25, Rob Herring wrote:
>
> On Sun, 07 May 2023 23:19:20 +0200, Linus Walleij wrote:
>> This converts the STMPE MFD device tree bindings to the YAML
>> schema.
>>
>> Reference the existing schema for the ADC, just define the
>> other subnode schemas directly in the MFD schema.
>>
>> Add two examples so we have examples covering both the simple
>> GPIO expander and the more complex with ADC and touchscreen.
>>
>> Some in-tree users do not follow the naming conventions for nodes
>> so these DTS files need to be augmented to use proper node names
>> like "adc", "pwm", "gpio", "keyboard-controller" etc before the
>> bindings take effect on them.
>>
>> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Reviewed-by: Rob Herring <robh@kernel.org>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> ChangeLog v2->v3:
>> - Drop the required pwm properties already required by the
>> template pwm schema.
>> - Add the number of PWM cells as const.
>> ChangeLog v1->v2:
>> - Split off the GPIO bindings to their own schema, as the old
>> bindings didn't even have any GPIO bindings. Put the GPIO
>> schema before this schema so we can use GPIO in the examples.
>> - Drop nodename and pattern as STMPE is not a generic name.
>> - Add maxItems to the resets.
>> - Make wakeup-source just :true, as it is a generic property.
>> - Move unevaluatedProperties for subnodes right before properties
>> as requested.
>> - Name devices "port-expander" in the examples.
>> - Use lowercase hex in line init.
>> ---
>> .../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
>> .../bindings/input/touchscreen/stmpe.txt | 108 --------
>> .../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
>> Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
>> 4 files changed, 297 insertions(+), 191 deletions(-)
>>
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> ./Documentation/devicetree/bindings/mfd/st,stmpe.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: port-expander@43: gpio: False schema does not allow {'compatible': ['st,stmpe-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]], 'st,norequest-mask': [[15790082]]}
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: /example-0/i2c/port-expander@43/gpio: failed to match any schema with compatible: ['st,stmpe-gpio']
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: port-expander@41: gpio: False schema does not allow {'compatible': ['st,stmpe-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]]}
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
> Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: /example-0/i2c/port-expander@41/gpio: failed to match any schema with compatible: ['st,stmpe-gpio']
>
Failures can be ignored, result of previous patch failure.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v3 1/2] dt-bindings: gpio: Add STMPE YAML DT schema
From: Krzysztof Kozlowski @ 2023-05-08 9:30 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Maxime Coquelin, Alexandre Torgue,
Dmitry Torokhov, Lee Jones, Philippe Schenker, Stefan Agner,
Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input
In-Reply-To: <20230426-stmpe-dt-bindings-v3-1-eac1d736e488@linaro.org>
On 07/05/2023 23:19, Linus Walleij wrote:
> This adds a schema for the STMPE GPIO that while it is used a
> lot in the kernel tree is anyway missing its bindings.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Use a compact hog node schema backed by the standard hog
> schema.
> ChangeLog v1->v2:
> - New patch split off from the MFD patch.
> ---
> .../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 51 ++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
This should be a conversion of
Documentation/devicetree/bindings/gpio/gpio-stmpe.txt:
1. Expressed in subject, commit msg,
2. With changes against original binding mentioned in commit msg,
3. With removal of old file.
>
> diff --git a/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
> new file mode 100644
> index 000000000000..41aa82b8b3eb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectonics Port Expander (STMPE) GPIO Block
> +
> +description: STMicroelectronics Port Expander (STMPE) is a series of slow
If there is resend/new version, put blank line after description:
> + bus controllers for various expanded peripherals such as GPIO, keypad,
> + touchscreen, ADC, PWM or rotator. It can contain one or several different
> + peripherals connected to SPI or I2C. These bindings pertain to the
> + GPIO portions of these expanders.
> +
> +maintainers:
> + - Linus Walleij <linus.walleij@linaro.org>
> +
> +properties:
> + compatible:
> + const: st,stmpe-gpio
> +
> + "#gpio-cells":
> + const: 2
> +
> + "#interrupt-cells":
> + const: 2
> +
> + gpio-controller: true
> +
> + interrupt-controller: true
> +
> + st,norequest-mask:
> + description: A bitmask of GPIO lines that cannot be requested because for
> + for example not being connected to anything on the system
Here as well.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> +patternProperties:
> + "^.+-hog(-[0-9]+)?$":
> + type: object
> +
> + required:
> + - gpio-hog
> +
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v3 1/2] dt-bindings: gpio: Add STMPE YAML DT schema
From: Krzysztof Kozlowski @ 2023-05-08 9:26 UTC (permalink / raw)
To: Linus Walleij, Rob Herring
Cc: linux-arm-kernel, Krzysztof Kozlowski, Bartosz Golaszewski,
Maxime Coquelin, linux-gpio, Dmitry Torokhov, Alexandre Torgue,
Rob Herring, devicetree, Steffen Trumtrar, linux-stm32,
Philippe Schenker, Stefan Agner, linux-kernel, linux-input,
Marek Vasut, Lee Jones
In-Reply-To: <CACRpkdZsC6s3MjX5Mkr5u763CYSAotJKcK5wZMwCQxgEzvw+vQ@mail.gmail.com>
On 08/05/2023 08:30, Linus Walleij wrote:
> On Mon, May 8, 2023 at 12:26 AM Rob Herring <robh@kernel.org> wrote:
>> On Sun, 07 May 2023 23:19:19 +0200, Linus Walleij wrote:
>
>>> This adds a schema for the STMPE GPIO that while it is used a
>>> lot in the kernel tree is anyway missing its bindings.
>>>
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>> ---
>>> ChangeLog v2->v3:
>>> - Use a compact hog node schema backed by the standard hog
>>> schema.
>>> ChangeLog v1->v2:
>>> - New patch split off from the MFD patch.
>>> ---
>>> .../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 51 ++++++++++++++++++++++
>>> 1 file changed, 51 insertions(+)
>>>
>>
>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
>> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>>
>> yamllint warnings/errors:
>>
>> dtschema/dtc warnings/errors:
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
>> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
>> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
>> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
>
> Looks like these are not mine...
Yep, these are coming from other issues, now happening in Linus' master.
I fixed the PCI and I will send it together with the fix for media to Linus.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [BUG] Kmemleak, possibly hiddev_connect(), in 6.3.0+ torvalds tree commit gfc4354c6e5c2
From: Mirsad Todorovac @ 2023-05-08 7:40 UTC (permalink / raw)
To: Greg Kroah-Hartman, Mirsad Goran Todorovac
Cc: linux-usb, linux-kernel, linux-input, Benjamin Tissoires,
Jiri Kosina
In-Reply-To: <2023050824-juiciness-catching-9290@gregkh>
On 5/8/23 08:51, Greg Kroah-Hartman wrote:
> On Mon, May 08, 2023 at 08:30:07AM +0200, Mirsad Goran Todorovac wrote:
>> Hi,
>>
>> There seems to be a kernel memory leak in the USB keyboard driver.
>>
>> The leaked memory allocs are 96 and 512 bytes.
>>
>> The platform is Ubuntu 22.04 LTS on a assembled AMD Ryzen 9 with X670E PG
>> Lightning mobo,
>> and Genius SlimStar i220 GK-080012 keyboard.
>>
>> (Logitech M100 HID mouse is not affected by the bug.)
>>
>> BIOS is:
>>
>> *-firmware
>> description: BIOS
>> vendor: American Megatrends International, LLC.
>> physical id: 0
>> version: 1.21
>> date: 04/26/2023
>> size: 64KiB
>>
>> The kernel is 6.3.0-torvalds-<id>-13466-gfc4354c6e5c2.
>>
>> The keyboard is recognised as Chicony:
>>
>> *-usb
>> description: Keyboard
>> product: CHICONY USB Keyboard
>> vendor: CHICONY
>> physical id: 2
>> bus info: usb@5:2
>> logical name: input35
>> logical name: /dev/input/event4
>> logical name: input35::capslock
>> logical name: input35::numlock
>> logical name: input35::scrolllock
>> logical name: input36
>> logical name: /dev/input/event5
>> logical name: input37
>> logical name: /dev/input/event6
>> logical name: input38
>> logical name: /dev/input/event8
>> version: 2.30
>> capabilities: usb-2.00 usb
>> configuration: driver=usbhid maxpower=100mA
>> speed=1Mbit/s
>>
>> The bug is easily reproduced by unplugging the USB keyboard, waiting about a
>> couple of seconds,
>> and then reconnect and scan for memory leaks twice.
>>
>> The kmemleak log is as follows [edited privacy info]:
>>
>> root@hostname:/home/username# cat /sys/kernel/debug/kmemleak
>> unreferenced object 0xffff8dd020037c00 (size 96):
>> comm "systemd-udevd", pid 435, jiffies 4294892550 (age 8909.356s)
>> hex dump (first 32 bytes):
>> 5d 8e 4e b9 ff ff ff ff 00 00 00 00 00 00 00 00 ].N.............
>> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>> backtrace:
>> [<ffffffffb81a74be>] __kmem_cache_alloc_node+0x22e/0x2b0
>> [<ffffffffb8127b6e>] kmalloc_trace+0x2e/0xa0
>> [<ffffffffb87543d9>] class_create+0x29/0x80
>> [<ffffffffb8880d24>] usb_register_dev+0x1d4/0x2e0
>
> As the call to class_create() in this path is now gone in 6.4-rc1, can
> you retry that release to see if this is still there or not?
Certainly, but probably not before 6 PM UTC+02.
Best regards,
Mirsad
--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
"What’s this thing suddenly coming towards me very fast? Very very fast.
... I wonder if it will be friends with me?"
^ permalink raw reply
* Re: [BUG] Kmemleak, possibly hiddev_connect(), in 6.3.0+ torvalds tree commit gfc4354c6e5c2
From: Greg Kroah-Hartman @ 2023-05-08 6:51 UTC (permalink / raw)
To: Mirsad Goran Todorovac
Cc: linux-usb, linux-kernel, linux-input, Benjamin Tissoires,
Jiri Kosina
In-Reply-To: <f64b17fa-d509-ad30-6e8d-e4c979818047@alu.unizg.hr>
On Mon, May 08, 2023 at 08:30:07AM +0200, Mirsad Goran Todorovac wrote:
> Hi,
>
> There seems to be a kernel memory leak in the USB keyboard driver.
>
> The leaked memory allocs are 96 and 512 bytes.
>
> The platform is Ubuntu 22.04 LTS on a assembled AMD Ryzen 9 with X670E PG
> Lightning mobo,
> and Genius SlimStar i220 GK-080012 keyboard.
>
> (Logitech M100 HID mouse is not affected by the bug.)
>
> BIOS is:
>
> *-firmware
> description: BIOS
> vendor: American Megatrends International, LLC.
> physical id: 0
> version: 1.21
> date: 04/26/2023
> size: 64KiB
>
> The kernel is 6.3.0-torvalds-<id>-13466-gfc4354c6e5c2.
>
> The keyboard is recognised as Chicony:
>
> *-usb
> description: Keyboard
> product: CHICONY USB Keyboard
> vendor: CHICONY
> physical id: 2
> bus info: usb@5:2
> logical name: input35
> logical name: /dev/input/event4
> logical name: input35::capslock
> logical name: input35::numlock
> logical name: input35::scrolllock
> logical name: input36
> logical name: /dev/input/event5
> logical name: input37
> logical name: /dev/input/event6
> logical name: input38
> logical name: /dev/input/event8
> version: 2.30
> capabilities: usb-2.00 usb
> configuration: driver=usbhid maxpower=100mA
> speed=1Mbit/s
>
> The bug is easily reproduced by unplugging the USB keyboard, waiting about a
> couple of seconds,
> and then reconnect and scan for memory leaks twice.
>
> The kmemleak log is as follows [edited privacy info]:
>
> root@hostname:/home/username# cat /sys/kernel/debug/kmemleak
> unreferenced object 0xffff8dd020037c00 (size 96):
> comm "systemd-udevd", pid 435, jiffies 4294892550 (age 8909.356s)
> hex dump (first 32 bytes):
> 5d 8e 4e b9 ff ff ff ff 00 00 00 00 00 00 00 00 ].N.............
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> backtrace:
> [<ffffffffb81a74be>] __kmem_cache_alloc_node+0x22e/0x2b0
> [<ffffffffb8127b6e>] kmalloc_trace+0x2e/0xa0
> [<ffffffffb87543d9>] class_create+0x29/0x80
> [<ffffffffb8880d24>] usb_register_dev+0x1d4/0x2e0
As the call to class_create() in this path is now gone in 6.4-rc1, can
you retry that release to see if this is still there or not?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v3 1/2] dt-bindings: gpio: Add STMPE YAML DT schema
From: Linus Walleij @ 2023-05-08 6:30 UTC (permalink / raw)
To: Rob Herring
Cc: linux-arm-kernel, Krzysztof Kozlowski, Bartosz Golaszewski,
Maxime Coquelin, linux-gpio, Dmitry Torokhov, Alexandre Torgue,
Rob Herring, devicetree, Steffen Trumtrar, linux-stm32,
Philippe Schenker, Stefan Agner, linux-kernel, linux-input,
Marek Vasut, Lee Jones
In-Reply-To: <168349835606.3623231.4270033272905089508.robh@kernel.org>
On Mon, May 8, 2023 at 12:26 AM Rob Herring <robh@kernel.org> wrote:
> On Sun, 07 May 2023 23:19:19 +0200, Linus Walleij wrote:
> > This adds a schema for the STMPE GPIO that while it is used a
> > lot in the kernel tree is anyway missing its bindings.
> >
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > ChangeLog v2->v3:
> > - Use a compact hog node schema backed by the standard hog
> > schema.
> > ChangeLog v1->v2:
> > - New patch split off from the MFD patch.
> > ---
> > .../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 51 ++++++++++++++++++++++
> > 1 file changed, 51 insertions(+)
> >
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
Looks like these are not mine...
Yours,
Linus Walleij
^ permalink raw reply
* Re: [PATCH] dt-bindings: google,cros-ec-keyb: Fix spelling error
From: patchwork-bot+chrome-platform @ 2023-05-08 3:56 UTC (permalink / raw)
To: Linus Walleij
Cc: dmitry.torokhov, linux-input, bleung, groeck, devicetree,
chrome-platform, robh+dt, krzysztof.kozlowski+dt
In-Reply-To: <20230220135531.1987351-1-linus.walleij@linaro.org>
Hello:
This patch was applied to chrome-platform/linux.git (for-next)
by Dmitry Torokhov <dmitry.torokhov@gmail.com>:
On Mon, 20 Feb 2023 14:55:31 +0100 you wrote:
> The dependency had an obvious spelling error. Fix it.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../devicetree/bindings/input/google,cros-ec-keyb.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- dt-bindings: google,cros-ec-keyb: Fix spelling error
https://git.kernel.org/chrome-platform/c/c6f3b684c2c4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply
* Re: [PATCH] dt-bindings: google,cros-ec-keyb: Fix spelling error
From: patchwork-bot+chrome-platform @ 2023-05-08 3:45 UTC (permalink / raw)
To: Linus Walleij
Cc: dmitry.torokhov, linux-input, bleung, groeck, devicetree,
chrome-platform, robh+dt, krzysztof.kozlowski+dt
In-Reply-To: <20230220135531.1987351-1-linus.walleij@linaro.org>
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci)
by Dmitry Torokhov <dmitry.torokhov@gmail.com>:
On Mon, 20 Feb 2023 14:55:31 +0100 you wrote:
> The dependency had an obvious spelling error. Fix it.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../devicetree/bindings/input/google,cros-ec-keyb.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- dt-bindings: google,cros-ec-keyb: Fix spelling error
https://git.kernel.org/chrome-platform/c/c6f3b684c2c4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply
* Re: [PATCH v3 2/2] dt-bindings: MFD: Convert STMPE to YAML schema
From: Rob Herring @ 2023-05-07 22:25 UTC (permalink / raw)
To: Linus Walleij
Cc: Dmitry Torokhov, Krzysztof Kozlowski, Alexandre Torgue,
Stefan Agner, linux-arm-kernel, Steffen Trumtrar,
Bartosz Golaszewski, Maxime Coquelin, Lee Jones,
Philippe Schenker, linux-gpio, devicetree, linux-stm32,
linux-kernel, Rob Herring, linux-input, Marek Vasut
In-Reply-To: <20230426-stmpe-dt-bindings-v3-2-eac1d736e488@linaro.org>
On Sun, 07 May 2023 23:19:20 +0200, Linus Walleij wrote:
> This converts the STMPE MFD device tree bindings to the YAML
> schema.
>
> Reference the existing schema for the ADC, just define the
> other subnode schemas directly in the MFD schema.
>
> Add two examples so we have examples covering both the simple
> GPIO expander and the more complex with ADC and touchscreen.
>
> Some in-tree users do not follow the naming conventions for nodes
> so these DTS files need to be augmented to use proper node names
> like "adc", "pwm", "gpio", "keyboard-controller" etc before the
> bindings take effect on them.
>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Drop the required pwm properties already required by the
> template pwm schema.
> - Add the number of PWM cells as const.
> ChangeLog v1->v2:
> - Split off the GPIO bindings to their own schema, as the old
> bindings didn't even have any GPIO bindings. Put the GPIO
> schema before this schema so we can use GPIO in the examples.
> - Drop nodename and pattern as STMPE is not a generic name.
> - Add maxItems to the resets.
> - Make wakeup-source just :true, as it is a generic property.
> - Move unevaluatedProperties for subnodes right before properties
> as requested.
> - Name devices "port-expander" in the examples.
> - Use lowercase hex in line init.
> ---
> .../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
> .../bindings/input/touchscreen/stmpe.txt | 108 --------
> .../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
> Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
> 4 files changed, 297 insertions(+), 191 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mfd/st,stmpe.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: port-expander@43: gpio: False schema does not allow {'compatible': ['st,stmpe-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]], 'st,norequest-mask': [[15790082]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: /example-0/i2c/port-expander@43/gpio: failed to match any schema with compatible: ['st,stmpe-gpio']
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: port-expander@41: gpio: False schema does not allow {'compatible': ['st,stmpe-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
Documentation/devicetree/bindings/mfd/st,stmpe.example.dtb: /example-0/i2c/port-expander@41/gpio: failed to match any schema with compatible: ['st,stmpe-gpio']
doc reference errors (make refcheckdocs):
Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst
MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230426-stmpe-dt-bindings-v3-2-eac1d736e488@linaro.org
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* Re: [PATCH v3 1/2] dt-bindings: gpio: Add STMPE YAML DT schema
From: Rob Herring @ 2023-05-07 22:25 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-kernel, Krzysztof Kozlowski, Bartosz Golaszewski,
Maxime Coquelin, linux-gpio, Dmitry Torokhov, Alexandre Torgue,
Rob Herring, devicetree, Steffen Trumtrar, linux-stm32,
Philippe Schenker, Stefan Agner, linux-kernel, linux-input,
Marek Vasut, Lee Jones
In-Reply-To: <20230426-stmpe-dt-bindings-v3-1-eac1d736e488@linaro.org>
On Sun, 07 May 2023 23:19:19 +0200, Linus Walleij wrote:
> This adds a schema for the STMPE GPIO that while it is used a
> lot in the kernel tree is anyway missing its bindings.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Use a compact hog node schema backed by the standard hog
> schema.
> ChangeLog v1->v2:
> - New patch split off from the MFD patch.
> ---
> .../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 51 ++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
doc reference errors (make refcheckdocs):
Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst
MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230426-stmpe-dt-bindings-v3-1-eac1d736e488@linaro.org
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* [PATCH v3 2/2] dt-bindings: MFD: Convert STMPE to YAML schema
From: Linus Walleij @ 2023-05-07 21:19 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Linus Walleij, Rob Herring
In-Reply-To: <20230426-stmpe-dt-bindings-v3-0-eac1d736e488@linaro.org>
This converts the STMPE MFD device tree bindings to the YAML
schema.
Reference the existing schema for the ADC, just define the
other subnode schemas directly in the MFD schema.
Add two examples so we have examples covering both the simple
GPIO expander and the more complex with ADC and touchscreen.
Some in-tree users do not follow the naming conventions for nodes
so these DTS files need to be augmented to use proper node names
like "adc", "pwm", "gpio", "keyboard-controller" etc before the
bindings take effect on them.
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- Drop the required pwm properties already required by the
template pwm schema.
- Add the number of PWM cells as const.
ChangeLog v1->v2:
- Split off the GPIO bindings to their own schema, as the old
bindings didn't even have any GPIO bindings. Put the GPIO
schema before this schema so we can use GPIO in the examples.
- Drop nodename and pattern as STMPE is not a generic name.
- Add maxItems to the resets.
- Make wakeup-source just :true, as it is a generic property.
- Move unevaluatedProperties for subnodes right before properties
as requested.
- Name devices "port-expander" in the examples.
- Use lowercase hex in line init.
---
.../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
.../bindings/input/touchscreen/stmpe.txt | 108 --------
.../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
4 files changed, 297 insertions(+), 191 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/stmpe-keypad.txt b/Documentation/devicetree/bindings/input/stmpe-keypad.txt
deleted file mode 100644
index 12bb771d66d4..000000000000
--- a/Documentation/devicetree/bindings/input/stmpe-keypad.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-* STMPE Keypad
-
-Required properties:
- - compatible : "st,stmpe-keypad"
- - linux,keymap : See ./matrix-keymap.txt
-
-Optional properties:
- - debounce-interval : Debouncing interval time in milliseconds
- - st,scan-count : Scanning cycles elapsed before key data is updated
- - st,no-autorepeat : If specified device will not autorepeat
- - keypad,num-rows : See ./matrix-keymap.txt
- - keypad,num-columns : See ./matrix-keymap.txt
-
-Example:
-
- stmpe_keypad {
- compatible = "st,stmpe-keypad";
-
- debounce-interval = <64>;
- st,scan-count = <8>;
- st,no-autorepeat;
-
- linux,keymap = <0x205006b
- 0x4010074
- 0x3050072
- 0x1030004
- 0x502006a
- 0x500000a
- 0x5008b
- 0x706001c
- 0x405000b
- 0x6070003
- 0x3040067
- 0x303006c
- 0x60400e7
- 0x602009e
- 0x4020073
- 0x5050002
- 0x4030069
- 0x3020008>;
- };
diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
deleted file mode 100644
index 238b51555c04..000000000000
--- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-STMPE Touchscreen
-----------------
-
-Required properties:
- - compatible: "st,stmpe-ts"
-
-Optional properties:
-- st,ave-ctrl : Sample average control
- 0 -> 1 sample
- 1 -> 2 samples
- 2 -> 4 samples
- 3 -> 8 samples
-- st,touch-det-delay : Touch detect interrupt delay (recommended is 3)
- 0 -> 10 us
- 1 -> 50 us
- 2 -> 100 us
- 3 -> 500 us
- 4 -> 1 ms
- 5 -> 5 ms
- 6 -> 10 ms
- 7 -> 50 ms
-- st,settling : Panel driver settling time (recommended is 2)
- 0 -> 10 us
- 1 -> 100 us
- 2 -> 500 us
- 3 -> 1 ms
- 4 -> 5 ms
- 5 -> 10 ms
- 6 -> 50 ms
- 7 -> 100 ms
-- st,fraction-z : Length of the fractional part in z (recommended is 7)
- (fraction-z ([0..7]) = Count of the fractional part)
-- st,i-drive : current limit value of the touchscreen drivers
- 0 -> 20 mA (typical 35mA max)
- 1 -> 50 mA (typical 80 mA max)
-
-Optional properties common with MFD (deprecated):
- - st,sample-time : ADC conversion time in number of clock.
- 0 -> 36 clocks
- 1 -> 44 clocks
- 2 -> 56 clocks
- 3 -> 64 clocks
- 4 -> 80 clocks (recommended)
- 5 -> 96 clocks
- 6 -> 124 clocks
- - st,mod-12b : ADC Bit mode
- 0 -> 10bit ADC
- 1 -> 12bit ADC
- - st,ref-sel : ADC reference source
- 0 -> internal
- 1 -> external
- - st,adc-freq : ADC Clock speed
- 0 -> 1.625 MHz
- 1 -> 3.25 MHz
- 2 || 3 -> 6.5 MHz
-
-Node should be child node of stmpe node to which it belongs.
-
-Note that common ADC settings of stmpe_touchscreen (child) will take precedence
-over the settings done in MFD.
-
-Example:
-
-stmpe811@41 {
- compatible = "st,stmpe811";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_touch_int>;
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x41>;
- interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
- interrupt-parent = <&gpio4>;
- interrupt-controller;
- id = <0>;
- blocks = <0x5>;
- irq-trigger = <0x1>;
- /* Common ADC settings */
- /* 3.25 MHz ADC clock speed */
- st,adc-freq = <1>;
- /* 12-bit ADC */
- st,mod-12b = <1>;
- /* internal ADC reference */
- st,ref-sel = <0>;
- /* ADC converstion time: 80 clocks */
- st,sample-time = <4>;
-
- stmpe_touchscreen {
- compatible = "st,stmpe-ts";
- reg = <0>;
- /* 8 sample average control */
- st,ave-ctrl = <3>;
- /* 5 ms touch detect interrupt delay */
- st,touch-det-delay = <5>;
- /* 1 ms panel driver settling time */
- st,settling = <3>;
- /* 7 length fractional part in z */
- st,fraction-z = <7>;
- /*
- * 50 mA typical 80 mA max touchscreen drivers
- * current limit value
- */
- st,i-drive = <1>;
- };
- stmpe_adc {
- compatible = "st,stmpe-adc";
- st,norequest-mask = <0x0F>;
- };
-};
diff --git a/Documentation/devicetree/bindings/mfd/st,stmpe.yaml b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
new file mode 100644
index 000000000000..b77cc3f3075d
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/st,stmpe.yaml
@@ -0,0 +1,297 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/st,stmpe.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectonics Port Expander (STMPE)
+
+description: STMicroelectronics Port Expander (STMPE) is a series of slow
+ bus controllers for various expanded peripherals such as GPIO, keypad,
+ touchscreen, ADC, PWM or rotator. It can contain one or several different
+ peripherals connected to SPI or I2C.
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - st,stmpe601
+ - st,stmpe801
+ - st,stmpe811
+ - st,stmpe1600
+ - st,stmpe1601
+ - st,stmpe2401
+ - st,stmpe2403
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ vcc-supply: true
+
+ vio-supply: true
+
+ reset-gpios:
+ maxItems: 1
+
+ wakeup-source: true
+
+ st,autosleep-timeout:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 4, 16, 32, 64, 128, 256, 512, 1024 ]
+ description: Time idle before going to automatic sleep to save power
+
+ st,sample-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6 ]
+ description: |
+ Sample time per iteration
+ 0 = 36 clock ticks
+ 1 = 44 clock ticks
+ 2 = 56 clock ticks
+ 3 = 64 clock ticks
+ 4 = 80 clock ticks - recommended
+ 5 = 96 clock ticks
+ 6 = 124 clock ticks
+
+ st,mod-12b:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: ADC bit mode 0 = 10bit ADC, 1 = 12bit ADC
+
+ st,ref-sel:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: ADC reference source 0 = internal, 1 = external
+
+ st,adc-freq:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ ADC clock speed
+ 0 = 1.625 MHz
+ 1 = 3.25 MHz
+ 2, 3 = 6.5 MHz
+
+ adc:
+ type: object
+ $ref: /schemas/iio/adc/st,stmpe-adc.yaml#
+
+ gpio:
+ type: object
+ $ref: /schemas/gpio/st,stmpe-gpio.yaml#
+
+ keyboard-controller:
+ type: object
+ $ref: /schemas/input/matrix-keymap.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-keypad
+
+ debounce-interval:
+ description: Debouncing interval in milliseconds
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ st,no-autorepeat:
+ description: If present, the keys will not autorepeat when pressed
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ st,scan-count:
+ description: Scanning cycles elapsed before key data is updated
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ required:
+ - compatible
+ - linux,keymap
+
+ pwm:
+ type: object
+ $ref: /schemas/pwm/pwm.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-pwm
+
+ "#pwm-cells":
+ const: 2
+
+ touchscreen:
+ type: object
+ $ref: /schemas/input/touchscreen/touchscreen.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ compatible:
+ const: st,stmpe-ts
+
+ st,ave-ctrl:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3 ]
+ description: |
+ Sample average control
+ 0 = 1 sample
+ 1 = 2 samples
+ 2 = 4 samples
+ 3 = 8 samples
+
+ st,touch-det-delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: |
+ Touch detection delay
+ 0 = 10 us
+ 1 = 50 us
+ 2 = 100 us
+ 3 = 500 us - recommended
+ 4 = 1 ms
+ 5 = 5 ms
+ 6 = 10 ms
+ 7 = 50 ms
+
+ st,settling:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: |
+ Panel driver settling time
+ 0 = 10 us
+ 1 = 100 us
+ 2 = 500 us - recommended
+ 3 = 1 ms
+ 4 = 5 ms
+ 5 = 10 ms
+ 6 = 50 ms
+ 7 = 100 ms
+
+ st,fraction-z:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ description: Length of the fractional part in z, recommended is 7
+ (fraction-z ([0..7]) = Count of the fractional part)
+
+ st,i-drive:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: |
+ current limit value of the touchscreen drivers
+ 0 = 20 mA (typical 35 mA max)
+ 1 = 50 mA (typical 80 mA max)
+
+ required:
+ - compatible
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/input/input.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port-expander@43 {
+ compatible = "st,stmpe2401";
+ reg = <0x43>;
+ reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio>;
+ vcc-supply = <&db8500_vsmps2_reg>;
+ vio-supply = <&db8500_vsmps2_reg>;
+ wakeup-source;
+ st,autosleep-timeout = <1024>;
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ st,norequest-mask = <0xf0f002>;
+ };
+
+ keyboard-controller {
+ compatible = "st,stmpe-keypad";
+ debounce-interval = <64>;
+ st,scan-count = <8>;
+ st,no-autorepeat;
+ keypad,num-rows = <8>;
+ keypad,num-columns = <8>;
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x00, KEY_1)
+ MATRIX_KEY(0x00, 0x01, KEY_2)
+ MATRIX_KEY(0x00, 0x02, KEY_3)
+ MATRIX_KEY(0x00, 0x03, KEY_4)
+ MATRIX_KEY(0x00, 0x04, KEY_5)
+ MATRIX_KEY(0x00, 0x05, KEY_6)
+ MATRIX_KEY(0x00, 0x06, KEY_7)
+ MATRIX_KEY(0x00, 0x07, KEY_8)
+ MATRIX_KEY(0x00, 0x08, KEY_9)
+ MATRIX_KEY(0x00, 0x09, KEY_0)
+ >;
+ };
+
+ pwm {
+ compatible = "st,stmpe-pwm";
+ #pwm-cells = <2>;
+ };
+ };
+
+ port-expander@41 {
+ compatible = "st,stmpe811";
+ reg = <0x41>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio>;
+ st,adc-freq = <1>;
+ st,mod-12b = <1>;
+ st,ref-sel = <0>;
+ st,sample-time = <4>;
+
+ adc {
+ compatible = "st,stmpe-adc";
+ st,norequest-mask = <0x0f>;
+ #io-channel-cells = <1>;
+ };
+
+ gpio {
+ compatible = "st,stmpe-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ pwm {
+ compatible = "st,stmpe-pwm";
+ #pwm-cells = <2>;
+ };
+
+ touchscreen {
+ compatible = "st,stmpe-ts";
+ st,ave-ctrl = <3>;
+ st,touch-det-delay = <5>;
+ st,settling = <3>;
+ st,fraction-z = <7>;
+ st,i-drive = <1>;
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt b/Documentation/devicetree/bindings/mfd/stmpe.txt
deleted file mode 100644
index d4408a417193..000000000000
--- a/Documentation/devicetree/bindings/mfd/stmpe.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-* ST Microelectronics STMPE Multi-Functional Device
-
-STMPE is an MFD device which may expose the following inbuilt devices: gpio,
-keypad, touchscreen, adc, pwm, rotator.
-
-Required properties:
- - compatible : "st,stmpe[610|801|811|1600|1601|2401|2403]"
- - reg : I2C/SPI address of the device
-
-Optional properties:
- - interrupts : The interrupt outputs from the controller
- - interrupt-controller : Marks the device node as an interrupt controller
- - wakeup-source : Marks the input device as wakable
- - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024
- - irq-gpio : If present, which GPIO to use for event IRQ
-
-Optional properties for devices with touch and ADC (STMPE811|STMPE610):
- - st,sample-time : ADC conversion time in number of clock.
- 0 -> 36 clocks 4 -> 80 clocks (recommended)
- 1 -> 44 clocks 5 -> 96 clocks
- 2 -> 56 clocks 6 -> 124 clocks
- 3 -> 64 clocks
- - st,mod-12b : ADC Bit mode
- 0 -> 10bit ADC 1 -> 12bit ADC
- - st,ref-sel : ADC reference source
- 0 -> internal 1 -> external
- - st,adc-freq : ADC Clock speed
- 0 -> 1.625 MHz 2 || 3 -> 6.5 MHz
- 1 -> 3.25 MHz
-
-Example:
-
- stmpe1601: stmpe1601@40 {
- compatible = "st,stmpe1601";
- reg = <0x40>;
- interrupts = <26 0x4>;
- interrupt-parent = <&gpio6>;
- interrupt-controller;
-
- wakeup-source;
- st,autosleep-timeout = <1024>;
- };
--
2.34.1
^ permalink raw reply related
* [PATCH v3 1/2] dt-bindings: gpio: Add STMPE YAML DT schema
From: Linus Walleij @ 2023-05-07 21:19 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Linus Walleij
In-Reply-To: <20230426-stmpe-dt-bindings-v3-0-eac1d736e488@linaro.org>
This adds a schema for the STMPE GPIO that while it is used a
lot in the kernel tree is anyway missing its bindings.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- Use a compact hog node schema backed by the standard hog
schema.
ChangeLog v1->v2:
- New patch split off from the MFD patch.
---
.../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
new file mode 100644
index 000000000000..41aa82b8b3eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectonics Port Expander (STMPE) GPIO Block
+
+description: STMicroelectronics Port Expander (STMPE) is a series of slow
+ bus controllers for various expanded peripherals such as GPIO, keypad,
+ touchscreen, ADC, PWM or rotator. It can contain one or several different
+ peripherals connected to SPI or I2C. These bindings pertain to the
+ GPIO portions of these expanders.
+
+maintainers:
+ - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+ compatible:
+ const: st,stmpe-gpio
+
+ "#gpio-cells":
+ const: 2
+
+ "#interrupt-cells":
+ const: 2
+
+ gpio-controller: true
+
+ interrupt-controller: true
+
+ st,norequest-mask:
+ description: A bitmask of GPIO lines that cannot be requested because for
+ for example not being connected to anything on the system
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+
+ required:
+ - gpio-hog
+
+additionalProperties: false
+
+required:
+ - compatible
+ - "#gpio-cells"
+ - "#interrupt-cells"
+ - gpio-controller
+ - interrupt-controller
--
2.34.1
^ permalink raw reply related
* [PATCH v3 0/2] STMPE device tree bindings
From: Linus Walleij @ 2023-05-07 21:19 UTC (permalink / raw)
To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
Maxime Coquelin, Alexandre Torgue, Dmitry Torokhov, Lee Jones,
Philippe Schenker, Stefan Agner, Marek Vasut, Steffen Trumtrar
Cc: linux-gpio, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, linux-input, Linus Walleij, Rob Herring
This adds the missing GPIO bindings for the STMPE port expander
and converts the existing MFD binding to YAML.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes in v3:
- Update to review feedback
- Collected some ack/review tags
- I guess Bartosz should apply 1/2 and Lee should apply 2/2.
- Link to v2: https://lore.kernel.org/r/20230426-stmpe-dt-bindings-v2-0-2f85a1fffcda@linaro.org
Changes in v2:
- Split off a separate GPIO binding
- Updated the MFD binding according to feedback
---
Linus Walleij (2):
dt-bindings: gpio: Add STMPE YAML DT schema
dt-bindings: MFD: Convert STMPE to YAML schema
.../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 51 ++++
.../devicetree/bindings/input/stmpe-keypad.txt | 41 ---
.../bindings/input/touchscreen/stmpe.txt | 108 --------
.../devicetree/bindings/mfd/st,stmpe.yaml | 297 +++++++++++++++++++++
Documentation/devicetree/bindings/mfd/stmpe.txt | 42 ---
5 files changed, 348 insertions(+), 191 deletions(-)
---
base-commit: c712a112ed4e91afab1cc7c978af228c77a4fb13
change-id: 20230426-stmpe-dt-bindings-c3479dd71a28
Best regards,
--
Linus Walleij <linus.walleij@linaro.org>
^ permalink raw reply
* Re: [regression] Bug 217394 - IRQ override skipping breaks the Aya Neo Air Plus 6800U keyboard buttons
From: Matthew Anderson @ 2023-05-07 14:55 UTC (permalink / raw)
To: Mario Limonciello, Chuanhong Guo, Limonciello, Mario
Cc: Linux regressions mailing list, linux-input, Rafael J. Wysocki,
ACPI Devel Maling List, LKML
In-Reply-To: <1b3e5df0-6190-e560-72c8-f600f715f89e@amd.com>
On the Ayaneo Air Plus I modified the DSDT based on another handheld
with a 6800U that does not have the problem and it resolved the issue. I
hope this information helps in some way.
< Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard
(101/102-key, PS/2 Mouse) */) // _HID: Hardware ID
< Name (_UID, Zero) // _UID: Unique ID
---
> Name (_HID, "MSFT0001") // _HID: Hardware ID
> Name (_CID, EisaId ("PNP0303") /* IBM Enhanced Keyboard
(101/102-key, PS/2 Mouse) */) // _CID: Compatible ID
6135c6135
< IRQNoFlags ()
---
> IRQ (Edge, ActiveLow, Shared, )
On 5/7/23 7:41 AM, Mario Limonciello wrote:
>
> On 5/6/23 03:25, Chuanhong Guo wrote:
>> Hi Mario!
>>
>> On Thu, May 4, 2023 at 12:11 AM Limonciello, Mario <mlimonci@amd.com>
>> wrote:
>>> +linux-input
>>>
>>> On 5/3/2023 7:58 AM, Linux regression tracking (Thorsten Leemhuis)
>>> wrote:
>>>> Hi, Thorsten here, the Linux kernel's regression tracker.
>>>>
>>>> I noticed a regression report in bugzilla.kernel.org. As many (most?)
>>>> kernel developers don't keep an eye on it, I decided to forward it
>>>> by mail.
>>>>
>>>> Chuanhong Guo, apparently it's cause by a change of yours.
>>>>
>>>> Note, you have to use bugzilla to reach the reporter, as I sadly[1]
>>>> can
>>>> not CCed them in mails like this.
>>>>
>>>> Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217394 :
>>>>
>>>>> Matthew 2023-05-03 02:28:33 UTC
>>>>>
>>>>> Reverting the changes found in this patch fixes the issue:
>>>>>> https://lore.kernel.org/all/20220712020058.90374-1-gch981213@gmail.com/
>>>>>>
>>>>> With that patch the AT Translated Set 2 Keyboard doesn't show up
>>>>> with the evtest and is not usable.
>>>>>
>>>>> Hardware:
>>>>>
>>>>> Aya Neo Air Plus
>>>>> AMD Ryzen 7 6800U
>>>> See the ticket for more details.
>>>>
>>>> BTW: there apparently is another IRQ override needed for a different
>>>> machine. See https://bugzilla.kernel.org/show_bug.cgi?id=216804#c8 for
>>>> details (ignore the comments before that, the quirk entry for that
>>>> machine was merged; comment 8 and all related to it really should
>>>> have a
>>>> separate bug; that's also why this partly fall through the cracks here
>>>> :-/ ). The user is currently trying to create a patch.
>>>>
>>> Something I'm wondering about is if it's possible for i8042 to detect
>>> the polarity is incorrect when it probes and
>>> to try to correct it.
>>>
>>> If we could do that we can probably drop 9946e39fe8d0 ("ACPI: resource:
>>> skip IRQ override on AMD Zen platforms")
>>> to fix this issue along with all the other quirks that have collected
>>> over time on i8042 polarity issues.
>>>
>> I don't really understand why there are more and more new laptops
>> appearing with broken IRQ settings in ACPI, especially considering
>> the fact that some of these laptops were released after the original
>> problem was already identified almost a year ago.
>> What exactly was the solution when AMD internally discovered this IRQ
>> mismatch problem? Did you guys changed the emulated IRQ polarity
>> without updating the ACPI table with the corresponding polarity
>> description in your reference design?
>>
> In the reference design the tables are updated to be accurate and
> reflect the appropriate polarity. It seems that the vendors must be
> changing this and it not breaking Windows for some reason.
>
>
^ permalink raw reply
* Re: [regression] Bug 217394 - IRQ override skipping breaks the Aya Neo Air Plus 6800U keyboard buttons
From: Mario Limonciello @ 2023-05-07 12:45 UTC (permalink / raw)
To: Thorsten Leemhuis, Dmitry Torokhov, Limonciello, Mario
Cc: Linux regressions mailing list, Chuanhong Guo, linux-input,
Rafael J. Wysocki, ACPI Devel Maling List, LKML
In-Reply-To: <5df240d4-03f1-31cd-03e1-a6cfddd5cc1d@leemhuis.info>
On 5/6/23 01:47, Thorsten Leemhuis wrote:
> On 03.05.23 21:00, Dmitry Torokhov wrote:
>> On Wed, May 03, 2023 at 11:11:33AM -0500, Limonciello, Mario wrote:
>>> On 5/3/2023 7:58 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
>>>> I noticed a regression report in bugzilla.kernel.org. As many (most?)
>>>> kernel developers don't keep an eye on it, I decided to forward it by mail.
>>>>
>>>> Chuanhong Guo, apparently it's cause by a change of yours.
> BTW, there is another report caused by the change:
> https://bugzilla.kernel.org/show_bug.cgi?id=217406
>
> ```
> I have an HP Pavilion Aero 13 laptop that comes with an AMD Ryzen 7735U
> CPU and an up-to-date BIOS. Using any kernel version that is strictly
> greater than 5.19.9 on it is causing the typing with the integrated
> keyboard to be extremely slow. "Slow" is subjective but let's say [...]"
> ```
>
> /me wonders how many machines out there show problems we never hear about
>
> Anyway:
>
>>>> Note, you have to use bugzilla to reach the reporter, as I sadly[1] can
>>>> not CCed them in mails like this.
>>>>
>>>> Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217394 :
>>>>
>>>>> Matthew 2023-05-03 02:28:33 UTC
>>>>>
>>>>> Reverting the changes found in this patch fixes the issue:
>>>>>> https://lore.kernel.org/all/20220712020058.90374-1-gch981213@gmail.com/
>>>>> With that patch the AT Translated Set 2 Keyboard doesn't show up with the evtest and is not usable.
>>>>>
>>>>> Hardware:
>>>>>
>>>>> Aya Neo Air Plus
>>>>> AMD Ryzen 7 6800U
>>>> See the ticket for more details.
>>>>
>>>> BTW: there apparently is another IRQ override needed for a different
>>>> machine. See https://bugzilla.kernel.org/show_bug.cgi?id=216804#c8 for
>>>> details (ignore the comments before that, the quirk entry for that
>>>> machine was merged; comment 8 and all related to it really should have a
>>>> separate bug; that's also why this partly fall through the cracks here
>>>> :-/ ). The user is currently trying to create a patch.
>>>>
>>> Something I'm wondering about is if it's possible for i8042 to detect the
>>> polarity is incorrect when it probes and
>>> to try to correct it.
>>>
>>> If we could do that we can probably drop 9946e39fe8d0 ("ACPI: resource: skip
>>> IRQ override on AMD Zen platforms")
>>> to fix this issue along with all the other quirks that have collected over
>>> time on i8042 polarity issues.
>> 8042 is shared between multiple platforms and is quite fragile as it is.
>> If there are issues in AMD firmware and you know the polarity that is
>> needed for 8042 on these platforms you should add a proper fixup for
>> override. Maybe you should only skip override for IRQ 1?
> Stupid question from the peanut gallery: does anyone know what Windows
> is doing on those machines? I wonder if this is one of those situation
> where we just must follow suite to make things work reliably long term
> for users, even if that might mean 8042 needs to be modified.
>
> Or is the problem likely to go away with new hardware?
>
> Ciao, Thorsten
>
> P.S.: BTW:
>
> #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=217406
I've got the same question. This issue doesn't happen in AMD's
reference platform; it's not in AMD's firmware.
It seems to be happening in some OEM platforms only.
Dmitry,
Can you think about what a polarity detection scheme would look
like for i8042? If it's put in the error path (device not responding to
probe)
I would think it should be relatively low risk to otherwise working
hardware.
^ permalink raw reply
* Re: [regression] Bug 217394 - IRQ override skipping breaks the Aya Neo Air Plus 6800U keyboard buttons
From: Mario Limonciello @ 2023-05-07 12:41 UTC (permalink / raw)
To: Chuanhong Guo, Limonciello, Mario
Cc: Linux regressions mailing list, linux-input, Rafael J. Wysocki,
ACPI Devel Maling List, LKML
In-Reply-To: <CAJsYDVKY0V4V5fCseGJ7SPW6+-4r7d04RTgkF82VgYcNLk5DtQ@mail.gmail.com>
On 5/6/23 03:25, Chuanhong Guo wrote:
> Hi Mario!
>
> On Thu, May 4, 2023 at 12:11 AM Limonciello, Mario <mlimonci@amd.com> wrote:
>> +linux-input
>>
>> On 5/3/2023 7:58 AM, Linux regression tracking (Thorsten Leemhuis) wrote:
>>> Hi, Thorsten here, the Linux kernel's regression tracker.
>>>
>>> I noticed a regression report in bugzilla.kernel.org. As many (most?)
>>> kernel developers don't keep an eye on it, I decided to forward it by mail.
>>>
>>> Chuanhong Guo, apparently it's cause by a change of yours.
>>>
>>> Note, you have to use bugzilla to reach the reporter, as I sadly[1] can
>>> not CCed them in mails like this.
>>>
>>> Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217394 :
>>>
>>>> Matthew 2023-05-03 02:28:33 UTC
>>>>
>>>> Reverting the changes found in this patch fixes the issue:
>>>>> https://lore.kernel.org/all/20220712020058.90374-1-gch981213@gmail.com/
>>>> With that patch the AT Translated Set 2 Keyboard doesn't show up with the evtest and is not usable.
>>>>
>>>> Hardware:
>>>>
>>>> Aya Neo Air Plus
>>>> AMD Ryzen 7 6800U
>>> See the ticket for more details.
>>>
>>> BTW: there apparently is another IRQ override needed for a different
>>> machine. See https://bugzilla.kernel.org/show_bug.cgi?id=216804#c8 for
>>> details (ignore the comments before that, the quirk entry for that
>>> machine was merged; comment 8 and all related to it really should have a
>>> separate bug; that's also why this partly fall through the cracks here
>>> :-/ ). The user is currently trying to create a patch.
>>>
>> Something I'm wondering about is if it's possible for i8042 to detect
>> the polarity is incorrect when it probes and
>> to try to correct it.
>>
>> If we could do that we can probably drop 9946e39fe8d0 ("ACPI: resource:
>> skip IRQ override on AMD Zen platforms")
>> to fix this issue along with all the other quirks that have collected
>> over time on i8042 polarity issues.
>>
> I don't really understand why there are more and more new laptops
> appearing with broken IRQ settings in ACPI, especially considering
> the fact that some of these laptops were released after the original
> problem was already identified almost a year ago.
> What exactly was the solution when AMD internally discovered this IRQ
> mismatch problem? Did you guys changed the emulated IRQ polarity
> without updating the ACPI table with the corresponding polarity
> description in your reference design?
>
In the reference design the tables are updated to be accurate and
reflect the appropriate polarity. It seems that the vendors must be
changing this and it not breaking Windows for some reason.
^ permalink raw reply
* [dtor-input:next] BUILD SUCCESS e1141b0c625e495006c814edc3ffc58ef9ee86b5
From: kernel test robot @ 2023-05-07 6:56 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
branch HEAD: e1141b0c625e495006c814edc3ffc58ef9ee86b5 Input: ili210x - probe even if no resolution information
elapsed time: 725m
configs tested: 159
configs skipped: 10
The following configs have been built successfully.
More configs may be tested in the coming days.
tested configs:
alpha allyesconfig gcc
alpha defconfig gcc
alpha randconfig-r034-20230507 gcc
arc allyesconfig gcc
arc axs101_defconfig gcc
arc defconfig gcc
arc randconfig-r013-20230507 gcc
arc randconfig-r025-20230507 gcc
arc randconfig-r043-20230507 gcc
arm allmodconfig gcc
arm allyesconfig gcc
arm axm55xx_defconfig gcc
arm defconfig gcc
arm dove_defconfig clang
arm ep93xx_defconfig clang
arm exynos_defconfig gcc
arm imx_v4_v5_defconfig clang
arm milbeaut_m10v_defconfig clang
arm mvebu_v7_defconfig gcc
arm pxa910_defconfig gcc
arm randconfig-r036-20230507 clang
arm randconfig-r046-20230507 gcc
arm tegra_defconfig gcc
arm64 allyesconfig gcc
arm64 defconfig gcc
arm64 randconfig-r013-20230507 clang
arm64 randconfig-r016-20230507 clang
csky buildonly-randconfig-r006-20230507 gcc
csky defconfig gcc
csky randconfig-r026-20230507 gcc
hexagon randconfig-r003-20230507 clang
hexagon randconfig-r041-20230507 clang
hexagon randconfig-r045-20230507 clang
i386 allyesconfig gcc
i386 debian-10.3 gcc
i386 defconfig gcc
i386 randconfig-a001 gcc
i386 randconfig-a002 clang
i386 randconfig-a003 gcc
i386 randconfig-a004 clang
i386 randconfig-a005 gcc
i386 randconfig-a006 clang
i386 randconfig-a011 clang
i386 randconfig-a012 gcc
i386 randconfig-a013 clang
i386 randconfig-a014 gcc
i386 randconfig-a015 clang
i386 randconfig-a016 gcc
ia64 allmodconfig gcc
ia64 defconfig gcc
ia64 randconfig-r002-20230507 gcc
ia64 randconfig-r016-20230507 gcc
ia64 randconfig-r034-20230507 gcc
loongarch allmodconfig gcc
loongarch allnoconfig gcc
loongarch buildonly-randconfig-r006-20230507 gcc
loongarch defconfig gcc
loongarch loongson3_defconfig gcc
loongarch randconfig-r001-20230507 gcc
loongarch randconfig-r005-20230507 gcc
loongarch randconfig-r022-20230507 gcc
loongarch randconfig-r035-20230507 gcc
m68k allmodconfig gcc
m68k buildonly-randconfig-r003-20230507 gcc
m68k defconfig gcc
m68k m5249evb_defconfig gcc
m68k m5272c3_defconfig gcc
m68k m5475evb_defconfig gcc
m68k mvme147_defconfig gcc
m68k randconfig-r004-20230507 gcc
m68k sun3_defconfig gcc
m68k sun3x_defconfig gcc
microblaze buildonly-randconfig-r001-20230507 gcc
microblaze mmu_defconfig gcc
microblaze randconfig-r001-20230507 gcc
microblaze randconfig-r005-20230507 gcc
mips allmodconfig gcc
mips allyesconfig gcc
mips buildonly-randconfig-r004-20230507 clang
mips loongson1b_defconfig gcc
mips randconfig-r022-20230507 gcc
mips randconfig-r035-20230507 clang
mips sb1250_swarm_defconfig clang
nios2 buildonly-randconfig-r002-20230507 gcc
nios2 defconfig gcc
nios2 randconfig-r015-20230507 gcc
nios2 randconfig-r021-20230507 gcc
openrisc randconfig-r032-20230507 gcc
parisc defconfig gcc
parisc randconfig-r011-20230507 gcc
parisc randconfig-r014-20230507 gcc
parisc randconfig-r023-20230507 gcc
parisc64 defconfig gcc
powerpc adder875_defconfig gcc
powerpc akebono_defconfig clang
powerpc allmodconfig gcc
powerpc allnoconfig gcc
powerpc asp8347_defconfig gcc
powerpc buildonly-randconfig-r005-20230507 clang
powerpc g5_defconfig clang
powerpc makalu_defconfig gcc
powerpc randconfig-r003-20230507 gcc
powerpc storcenter_defconfig gcc
powerpc xes_mpc85xx_defconfig clang
riscv allmodconfig gcc
riscv allnoconfig gcc
riscv buildonly-randconfig-r001-20230507 clang
riscv defconfig gcc
riscv randconfig-r002-20230507 gcc
riscv randconfig-r014-20230507 clang
riscv randconfig-r042-20230507 clang
riscv rv32_defconfig clang
riscv rv32_defconfig gcc
s390 allmodconfig gcc
s390 allyesconfig gcc
s390 buildonly-randconfig-r004-20230507 clang
s390 defconfig gcc
s390 randconfig-r004-20230507 gcc
s390 randconfig-r011-20230507 clang
s390 randconfig-r044-20230507 clang
sh allmodconfig gcc
sh randconfig-r006-20230507 gcc
sh randconfig-r012-20230507 gcc
sh randconfig-r033-20230507 gcc
sh sh7763rdp_defconfig gcc
sh sh7785lcr_32bit_defconfig gcc
sparc allnoconfig gcc
sparc defconfig gcc
sparc randconfig-r024-20230507 gcc
sparc sparc32_defconfig gcc
sparc64 buildonly-randconfig-r005-20230507 gcc
sparc64 defconfig gcc
sparc64 randconfig-r006-20230507 gcc
sparc64 randconfig-r021-20230507 gcc
sparc64 randconfig-r024-20230507 gcc
sparc64 randconfig-r026-20230507 gcc
sparc64 randconfig-r033-20230507 gcc
sparc64 randconfig-r036-20230507 gcc
um i386_defconfig gcc
um x86_64_defconfig gcc
x86_64 allnoconfig gcc
x86_64 allyesconfig gcc
x86_64 defconfig gcc
x86_64 kexec gcc
x86_64 randconfig-a001 clang
x86_64 randconfig-a002 gcc
x86_64 randconfig-a003 clang
x86_64 randconfig-a004 gcc
x86_64 randconfig-a005 clang
x86_64 randconfig-a006 gcc
x86_64 randconfig-a011 gcc
x86_64 randconfig-a012 clang
x86_64 randconfig-a013 gcc
x86_64 randconfig-a014 clang
x86_64 randconfig-a015 gcc
x86_64 randconfig-a016 clang
x86_64 rhel-8.3 gcc
xtensa allyesconfig gcc
xtensa randconfig-r031-20230507 gcc
xtensa virt_defconfig gcc
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox