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

dt-bindings: mfd: Convert Allwinner GPADC bindings to a schema

The Allwinner SoCs have an embedded GPADC that is doing thermal reading as
well, supported in Linux, with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

+119 -59
+43
Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/adc/allwinner,sun8i-a33-ths.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A33 Thermal Sensor Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + properties: 14 + "#io-channel-cells": 15 + const: 0 16 + 17 + "#thermal-sensor-cells": 18 + const: 0 19 + 20 + compatible: 21 + const: allwinner,sun8i-a33-ths 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + required: 27 + - "#io-channel-cells" 28 + - "#thermal-sensor-cells" 29 + - compatible 30 + - reg 31 + 32 + additionalProperties: false 33 + 34 + examples: 35 + - | 36 + ths: ths@1c25000 { 37 + compatible = "allwinner,sun8i-a33-ths"; 38 + reg = <0x01c25000 0x100>; 39 + #thermal-sensor-cells = <0>; 40 + #io-channel-cells = <0>; 41 + }; 42 + 43 + ...
+76
Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/allwinner,sun4i-a10-ts.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A10 Resistive Touchscreen Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + properties: 14 + "#thermal-sensor-cells": 15 + const: 0 16 + 17 + compatible: 18 + enum: 19 + - allwinner,sun4i-a10-ts 20 + - allwinner,sun5i-a13-ts 21 + - allwinner,sun6i-a31-ts 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + interrupts: 27 + maxItems: 1 28 + 29 + allwinner,ts-attached: 30 + $ref: /schemas/types.yaml#/definitions/flag 31 + description: A touchscreen is attached to the controller 32 + 33 + allwinner,tp-sensitive-adjust: 34 + allOf: 35 + - $ref: /schemas/types.yaml#/definitions/uint32 36 + - minimum: 0 37 + maximum: 15 38 + default: 15 39 + description: Sensitivity of pen down detection 40 + 41 + allwinner,filter-type: 42 + allOf: 43 + - $ref: /schemas/types.yaml#/definitions/uint32 44 + - minimum: 0 45 + maximum: 3 46 + default: 1 47 + description: | 48 + Select median and averaging filter. Sample used for median / 49 + averaging filter: 50 + 0: 4/2 51 + 1: 5/3 52 + 2: 8/4 53 + 3: 16/8 54 + 55 + required: 56 + - "#thermal-sensor-cells" 57 + - compatible 58 + - reg 59 + - interrupts 60 + 61 + additionalProperties: false 62 + 63 + examples: 64 + - | 65 + rtp: rtp@1c25000 { 66 + compatible = "allwinner,sun4i-a10-ts"; 67 + reg = <0x01c25000 0x100>; 68 + interrupts = <29>; 69 + allwinner,ts-attached; 70 + #thermal-sensor-cells = <0>; 71 + /* sensitive/noisy touch panel */ 72 + allwinner,tp-sensitive-adjust = <0>; 73 + allwinner,filter-type = <3>; 74 + }; 75 + 76 + ...
-59
Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt
··· 1 - Allwinner SoCs' GPADC Device Tree bindings 2 - ------------------------------------------ 3 - The Allwinner SoCs all have an ADC that can also act as a thermal sensor 4 - and sometimes as a touchscreen controller. 5 - 6 - Required properties: 7 - - compatible: "allwinner,sun8i-a33-ths", 8 - - reg: mmio address range of the chip, 9 - - #thermal-sensor-cells: shall be 0, 10 - - #io-channel-cells: shall be 0, 11 - 12 - Example: 13 - ths: ths@1c25000 { 14 - compatible = "allwinner,sun8i-a33-ths"; 15 - reg = <0x01c25000 0x100>; 16 - #thermal-sensor-cells = <0>; 17 - #io-channel-cells = <0>; 18 - }; 19 - 20 - sun4i, sun5i and sun6i SoCs are also supported via the older binding: 21 - 22 - sun4i resistive touchscreen controller 23 - -------------------------------------- 24 - 25 - Required properties: 26 - - compatible: "allwinner,sun4i-a10-ts", "allwinner,sun5i-a13-ts" or 27 - "allwinner,sun6i-a31-ts" 28 - - reg: mmio address range of the chip 29 - - interrupts: interrupt to which the chip is connected 30 - - #thermal-sensor-cells: shall be 0 31 - 32 - Optional properties: 33 - - allwinner,ts-attached : boolean indicating that an actual touchscreen 34 - is attached to the controller 35 - - allwinner,tp-sensitive-adjust : integer (4 bits) 36 - adjust sensitivity of pen down detection 37 - between 0 (least sensitive) and 15 38 - (defaults to 15) 39 - - allwinner,filter-type : integer (2 bits) 40 - select median and averaging filter 41 - samples used for median / averaging filter 42 - 0: 4/2 43 - 1: 5/3 44 - 2: 8/4 45 - 3: 16/8 46 - (defaults to 1) 47 - 48 - Example: 49 - 50 - rtp: rtp@1c25000 { 51 - compatible = "allwinner,sun4i-a10-ts"; 52 - reg = <0x01c25000 0x100>; 53 - interrupts = <29>; 54 - allwinner,ts-attached; 55 - #thermal-sensor-cells = <0>; 56 - /* sensitive/noisy touch panel */ 57 - allwinner,tp-sensitive-adjust = <0>; 58 - allwinner,filter-type = <3>; 59 - };