Add the Renesas X9250 potentiometers IIO support
Herve Codina
maintainerv2 cover Add the Renesas X9250 potentiometers IIO support
Hi,
The Renesas X9250 integrated four digitally controlled potentiometers. On each potentiometer, the X9250T has a 100 kOhms total resistance and the X9250U has a 50 kOhms total resistance.
Compare to the previous iteration
https://lore.kernel.org/linux-kernel/[email protected]/
This v2 series uses a define for the X9250 ID value.
Best regards,
Herve Codina
Changes v1 -> v2
- Patch 1
No changes
- Patch 2
Use a define for the 0x50 value used multiple times.
- Patch 3
No changes
Herve Codina (3):
dt-bindings: iio: potentiometer: Add the Renesas X9250 potentiometers
iio: potentiometer: Add support for the Renesas X9250 potentiometers
MAINTAINERS: add the Renesas X9250 driver entry
.../iio/potentiometer/renesas,x9250.yaml | 56 +++++ MAINTAINERS | 7 + drivers/iio/potentiometer/Kconfig | 10 + drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/x9250.c | 234 ++++++++++++++++++ 5 files changed, 308 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml create mode 100644 drivers/iio/potentiometer/x9250.c
Signature · 1 line
2.39.2
Herve Codina
maintainerPATCH v2 1/3 dt-bindings: iio: potentiometer: Add the Renesas X9250 potentiometers
The Renesas X9250 is a quad digitally controlled potentiometers.
--- .../iio/potentiometer/renesas,x9250.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml
Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml new file +56 -0
@@ -0,0 +1,56 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/potentiometer/renesas,x9250.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas X9250 quad potentiometers + +maintainers: + - Herve Codina <[email protected]> + +description: + The Renesas X9250 integrates four digitally controlled potentiometers. + On each potentiometer, the X9250T has a 100 kOhms total resistance and the + X9250U has a 50 kOhms total resistance. + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml + - $ref: /schemas/iio/iio.yaml + +properties: + compatible: + enum: + - renesas,x9250t + - renesas,x9250u + + reg: + description: + SPI device address. + maxItems: 1 + + '#io-channel-cells': + const: 1 + + spi-max-frequency: + maximum: 2000000 + +required: + - compatible + - reg + - '#io-channel-cells' + +unevaluatedProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + x9250@0 { + compatible = "renesas,x9250t"; + reg = <0>; + spi-max-frequency = <2000000>; + #io-channel-cells = <1>; + }; + };
Signature · 1 line
2.39.2
Re: [PATCH v2 1/3] dt-bindings: iio: potentiometer: Add the Renesas X9250 potentiometers
Quoted 6 lines · Herve Codina
The Renesas X9250 is a quad digitally controlled potentiometers.
Signed-off-by Herve Codina <[email protected]>--- .../iio/potentiometer/renesas,x9250.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+)
My comments for v1 apply, I guess.
Best regards,
Krzysztof
Herve Codina
maintainerRe: [PATCH v2 1/3] dt-bindings: iio: potentiometer: Add the Renesas X9250 potentiometers
Quoted 8 lines · On Fri, 21 Apr 2023 09:54:25 +0200 Krzysztof Kozlowski…
Quoted 6 lines · Herve Codina
The Renesas X9250 is a quad digitally controlled potentiometers.
Signed-off-by Herve Codina <[email protected]>--- .../iio/potentiometer/renesas,x9250.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+)
Quoted 5 lines
My comments for v1 apply, I guess.
Best regards,
Krzysztof
Yes and I will take care on v3.
Best regards,
Hervé
Herve Codina
maintainerPATCH v2 2/3 iio: potentiometer: Add support for the Renesas X9250 potentiometers
In reply to Herve CodinaThe Renesas X9250 integrates four digitally controlled potentiometers. On each potentiometer, the X9250T has a 100 kOhms total resistance and the X9250U has a 50 kOhms total resistance.
--- drivers/iio/potentiometer/Kconfig | 10 ++ drivers/iio/potentiometer/Makefile | 1 + drivers/iio/potentiometer/x9250.c | 234 +++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 drivers/iio/potentiometer/x9250.c
drivers/iio/potentiometer/Kconfig +10 -0
@@ -136,4 +136,14 @@ config TPL0102 To compile this driver as a module, choose M here: the module will be called tpl0102. +config X9250 + tristate "Renesas X9250 quad controlled potentiometers" + depends on SPI + help + Enable support for the Renesas X9250 quad controlled + potentiometers. + + To compile this driver as a module, choose M here: the module + will be called x9250. + endmenu
drivers/iio/potentiometer/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_MCP4131) += mcp4131.o obj-$(CONFIG_MCP4531) += mcp4531.o obj-$(CONFIG_MCP41010) += mcp41010.o obj-$(CONFIG_TPL0102) += tpl0102.o +obj-$(CONFIG_X9250) += x9250.o
drivers/iio/potentiometer/x9250.c new file +234 -0
234 lines not on this page · raw message
Signature · 1 line
2.39.2
Herve Codina
maintainerPATCH v2 3/3 MAINTAINERS: add the Renesas X9250 driver entry
In reply to Herve CodinaAfter contributing the driver, add myself as the maintainer for the Renesas X9250 IIO driver.
--- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
@@ -17926,6 +17926,13 @@ S: Maintained F: Documentation/devicetree/bindings/clock/renesas,versaclock7.yaml F: drivers/clk/clk-versaclock7.c +RENESAS X9250 DIGITAL POTENTIOMETERS DRIVER +M: Herve Codina <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml +F: drivers/iio/potentiometer/x9250.c + RESET CONTROLLER FRAMEWORK M: Philipp Zabel <[email protected]> S: Maintained
Signature · 1 line
2.39.2