* [PATCH 1/2] input: touchscreem: ad7877: add match table @ 2024-08-29 9:19 Antoniu Miclaus 2024-08-29 9:19 ` [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings Antoniu Miclaus 0 siblings, 1 reply; 5+ messages in thread From: Antoniu Miclaus @ 2024-08-29 9:19 UTC (permalink / raw) To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michael Hennerich, Antoniu Miclaus, linux-input, devicetree, linux-kernel Add match table for the ad7877 driver and define the compatible string. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> --- drivers/input/touchscreen/ad7877.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index a0598e9c7aff..7886454a19c6 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -805,10 +805,17 @@ static int ad7877_resume(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(ad7877_pm, ad7877_suspend, ad7877_resume); +static const struct of_device_id ad7877_of_match[] = { + { .compatible = "adi,ad7877", }, + { } +}; +MODULE_DEVICE_TABLE(of, ad7877_of_match); + static struct spi_driver ad7877_driver = { .driver = { .name = "ad7877", .dev_groups = ad7877_groups, + .of_match_table = ad7877_of_match, .pm = pm_sleep_ptr(&ad7877_pm), }, .probe = ad7877_probe, -- 2.46.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings 2024-08-29 9:19 [PATCH 1/2] input: touchscreem: ad7877: add match table Antoniu Miclaus @ 2024-08-29 9:19 ` Antoniu Miclaus 2024-08-29 16:16 ` Conor Dooley 0 siblings, 1 reply; 5+ messages in thread From: Antoniu Miclaus @ 2024-08-29 9:19 UTC (permalink / raw) To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michael Hennerich, Antoniu Miclaus, linux-input, devicetree, linux-kernel Add device tree bindings for the ad7877 driver. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> --- .../input/touchscreen/adi,ad7877.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml diff --git a/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml new file mode 100644 index 000000000000..5fc5124c5999 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/adi,ad7877.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7877 Touch Screen Controller + +maintainers: + - Antoniu Miclaus <antoniu.miclaus@analog.com> + +description: | + Analog Devices Touch Screen Controller + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7877.pdf + +allOf: + - $ref: touchscreen.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + enum: + - adi,ad7877 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + spi-max-frequency: + description: AD7877 SPI bus clock frequency. + minimum: 10000 + maximum: 20000000 + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + spi { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@0 { + compatible = "adi,ad7877"; + reg = <0>; + spi-max-frequency = <20000000>; + interrupts = <21 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpio>; + }; + }; +... -- 2.46.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings 2024-08-29 9:19 ` [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings Antoniu Miclaus @ 2024-08-29 16:16 ` Conor Dooley 2024-08-29 18:07 ` Dmitry Torokhov 0 siblings, 1 reply; 5+ messages in thread From: Conor Dooley @ 2024-08-29 16:16 UTC (permalink / raw) To: Antoniu Miclaus Cc: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michael Hennerich, linux-input, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1468 bytes --] On Thu, Aug 29, 2024 at 12:19:36PM +0300, Antoniu Miclaus wrote: > Add device tree bindings for the ad7877 driver. > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> > --- > .../input/touchscreen/adi,ad7877.yaml | 58 +++++++++++++++++++ > 1 file changed, 58 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > new file mode 100644 > index 000000000000..5fc5124c5999 > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > @@ -0,0 +1,58 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/input/touchscreen/adi,ad7877.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices AD7877 Touch Screen Controller > + > +maintainers: > + - Antoniu Miclaus <antoniu.miclaus@analog.com> > + > +description: | > + Analog Devices Touch Screen Controller > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7877.pdf > + > +allOf: > + - $ref: touchscreen.yaml# > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > +unevaluatedProperties: false So, all of the properties in those two files are valid for this touchscreen controller? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings 2024-08-29 16:16 ` Conor Dooley @ 2024-08-29 18:07 ` Dmitry Torokhov 2024-08-30 14:26 ` Conor Dooley 0 siblings, 1 reply; 5+ messages in thread From: Dmitry Torokhov @ 2024-08-29 18:07 UTC (permalink / raw) To: Conor Dooley Cc: Antoniu Miclaus, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michael Hennerich, linux-input, devicetree, linux-kernel On Thu, Aug 29, 2024 at 05:16:30PM +0100, Conor Dooley wrote: > On Thu, Aug 29, 2024 at 12:19:36PM +0300, Antoniu Miclaus wrote: > > Add device tree bindings for the ad7877 driver. > > > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> > > --- > > .../input/touchscreen/adi,ad7877.yaml | 58 +++++++++++++++++++ > > 1 file changed, 58 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > new file mode 100644 > > index 000000000000..5fc5124c5999 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > @@ -0,0 +1,58 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/input/touchscreen/adi,ad7877.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Analog Devices AD7877 Touch Screen Controller > > + > > +maintainers: > > + - Antoniu Miclaus <antoniu.miclaus@analog.com> > > + > > +description: | > > + Analog Devices Touch Screen Controller > > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7877.pdf > > + > > +allOf: > > + - $ref: touchscreen.yaml# > > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > > > + > > +unevaluatedProperties: false > > So, all of the properties in those two files are valid for this > touchscreen controller? No, the driver does not support transformations (swapping axes, inverting, etc) but that is driver limitation, not property of the hardware, which DT supposed to be, right? Still I think we need to extend the driver to do that before adding DT match tables and adding DT bindings (or maybe together with it). The driver also need to have proper GPIO controller support instead of having ad-hoc sysfs attributes, and converting in now before there are mainline users would be a good time. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings 2024-08-29 18:07 ` Dmitry Torokhov @ 2024-08-30 14:26 ` Conor Dooley 0 siblings, 0 replies; 5+ messages in thread From: Conor Dooley @ 2024-08-30 14:26 UTC (permalink / raw) To: Dmitry Torokhov Cc: Antoniu Miclaus, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michael Hennerich, linux-input, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2705 bytes --] On Thu, Aug 29, 2024 at 11:07:45AM -0700, Dmitry Torokhov wrote: > On Thu, Aug 29, 2024 at 05:16:30PM +0100, Conor Dooley wrote: > > On Thu, Aug 29, 2024 at 12:19:36PM +0300, Antoniu Miclaus wrote: > > > Add device tree bindings for the ad7877 driver. > > > > > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> > > > --- > > > .../input/touchscreen/adi,ad7877.yaml | 58 +++++++++++++++++++ > > > 1 file changed, 58 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > > new file mode 100644 > > > index 000000000000..5fc5124c5999 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/adi,ad7877.yaml > > > @@ -0,0 +1,58 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/input/touchscreen/adi,ad7877.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Analog Devices AD7877 Touch Screen Controller > > > + > > > +maintainers: > > > + - Antoniu Miclaus <antoniu.miclaus@analog.com> > > > + > > > +description: | > > > + Analog Devices Touch Screen Controller > > > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7877.pdf > > > + > > > +allOf: > > > + - $ref: touchscreen.yaml# > > > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > > > > > + > > > +unevaluatedProperties: false > > > > So, all of the properties in those two files are valid for this > > touchscreen controller? > > No, the driver does not support transformations (swapping axes, > inverting, etc) but that is driver limitation, not property of the > hardware, which DT supposed to be, right? Yeah, I'm only interested in whether or not the properties are actually applicable to the hardware. In particular, if there are properties in spi-peripheral-props required for functionality (eg active high cs) I would like to see them required. > > Still I think we need to extend the driver to do that before adding DT > match tables and adding DT bindings (or maybe together with it). > > The driver also need to have proper GPIO controller support instead of > having ad-hoc sysfs attributes, and converting in now before there are > mainline users would be a good time. Do you mean that this device is a provider of GPIOs? If so, then absolutely I would want to see gpio controller properties in the binding here before adding support. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-30 14:26 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-29 9:19 [PATCH 1/2] input: touchscreem: ad7877: add match table Antoniu Miclaus 2024-08-29 9:19 ` [PATCH 2/2] dt-bindings: touchscreen: ad7877: add bindings Antoniu Miclaus 2024-08-29 16:16 ` Conor Dooley 2024-08-29 18:07 ` Dmitry Torokhov 2024-08-30 14:26 ` Conor Dooley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).