diff mbox series

[v2,1/2] dt-bindings: iio: potentiometer: Add Microchip MCP41xxx/42xxx

Message ID 20181114095241.27037-2-cmc@babblebit.net (mailing list archive)
State New, archived
Headers show
Series Add support for Microchip MCP41xxx/42xxx potentiometers | expand

Commit Message

Chris Coffey Nov. 14, 2018, 9:52 a.m. UTC
This patch adds device tree documentation for the Microchip
MCP41xxx/42xxx family of digital potentiometers.

Signed-off-by: Chris Coffey <cmc@babblebit.net>
---
 .../bindings/iio/potentiometer/mcp41010.txt        | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt

Comments

Slawomir Stepien Nov. 14, 2018, 10:01 a.m. UTC | #1
On lis 14, 2018 09:52, Chris Coffey wrote:
> This patch adds device tree documentation for the Microchip
> MCP41xxx/42xxx family of digital potentiometers.

Hi

One note inline.

> Signed-off-by: Chris Coffey <cmc@babblebit.net>
> ---
>  .../bindings/iio/potentiometer/mcp41010.txt        | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> new file mode 100644
> index 0000000000..17565acace
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> @@ -0,0 +1,29 @@
> +* Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer
> +  driver
> +
> +Datasheet publicly available at:
> +http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
> +
> +The node for this driver must be a child node of a SPI controller, hence
> +all mandatory properties described in
> +
> +        Documentation/devicetree/bindings/spi/spi-bus.txt
> +
> +must be specified.
> +
> +Required properties:
> +	- compatible:  	Must be one of the following, depending on the
> +			model:
> +			"microchip,mcp41010"
> +			"microchip,mcp41050"
> +			"microchip,mcp41100"
> +			"microchip,mcp42010"
> +			"microchip,mcp42050"
> +			"microchip,mcp42100"
> +
> +Example:
> +mcp41010: potentiometer@0 {
> +	compatible = "mcp41010";

Missing company name in compatible.

> +	reg = <0>;
> +	spi-max-frequency = <500000>;
> +};
Jonathan Cameron Nov. 16, 2018, 6:02 p.m. UTC | #2
On Wed, 14 Nov 2018 11:01:41 +0100
Slawomir Stepien <sst@poczta.fm> wrote:

> On lis 14, 2018 09:52, Chris Coffey wrote:
> > This patch adds device tree documentation for the Microchip
> > MCP41xxx/42xxx family of digital potentiometers.  
> 
> Hi
> 
> One note inline.
> 
> > Signed-off-by: Chris Coffey <cmc@babblebit.net>
> > ---
> >  .../bindings/iio/potentiometer/mcp41010.txt        | 29 ++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> > new file mode 100644
> > index 0000000000..17565acace
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> > @@ -0,0 +1,29 @@
> > +* Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer
> > +  driver
> > +
> > +Datasheet publicly available at:
> > +http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
> > +
> > +The node for this driver must be a child node of a SPI controller, hence
> > +all mandatory properties described in
> > +
> > +        Documentation/devicetree/bindings/spi/spi-bus.txt
> > +
> > +must be specified.
> > +
> > +Required properties:
> > +	- compatible:  	Must be one of the following, depending on the
> > +			model:
> > +			"microchip,mcp41010"
> > +			"microchip,mcp41050"
> > +			"microchip,mcp41100"
> > +			"microchip,mcp42010"
> > +			"microchip,mcp42050"
> > +			"microchip,mcp42100"
> > +
> > +Example:
> > +mcp41010: potentiometer@0 {
> > +	compatible = "mcp41010";  
> 
> Missing company name in compatible.
Also don't need (or want) the precursor
mcp41010: for an example.

potentiometer@0 {
	compatible = "microchip,mcp41010";
	reg = <0>;
	spi-max-frequency = <500000>;
};

> 
> > +	reg = <0>;
> > +	spi-max-frequency = <500000>;
> > +};  
>
Chris Coffey Nov. 17, 2018, 8:25 p.m. UTC | #3
On Wed, Nov 14, 2018 at 11:01:41AM +0100, Slawomir Stepien wrote:
> On lis 14, 2018 09:52, Chris Coffey wrote:
> > This patch adds device tree documentation for the Microchip
> > MCP41xxx/42xxx family of digital potentiometers.
> 
> Hi
> 
> One note inline.
> 

Hi Stepien,

Thank you for the reviews. One comment below.

> > Signed-off-by: Chris Coffey <cmc@babblebit.net>
> > ---
> >  .../bindings/iio/potentiometer/mcp41010.txt        | 29 ++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> > new file mode 100644
> > index 0000000000..17565acace
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
> > @@ -0,0 +1,29 @@
> > +* Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer
> > +  driver
> > +
> > +Datasheet publicly available at:
> > +http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
> > +
> > +The node for this driver must be a child node of a SPI controller, hence
> > +all mandatory properties described in
> > +
> > +        Documentation/devicetree/bindings/spi/spi-bus.txt
> > +
> > +must be specified.
> > +
> > +Required properties:
> > +	- compatible:  	Must be one of the following, depending on the
> > +			model:
> > +			"microchip,mcp41010"
> > +			"microchip,mcp41050"
> > +			"microchip,mcp41100"
> > +			"microchip,mcp42010"
> > +			"microchip,mcp42050"
> > +			"microchip,mcp42100"
> > +
> > +Example:
> > +mcp41010: potentiometer@0 {
> > +	compatible = "mcp41010";
> 
> Missing company name in compatible.
> 

Gah! A classic case of my mind seeing what it wanted to see, instead of
what was actually there.

> > +	reg = <0>;
> > +	spi-max-frequency = <500000>;
> > +};
> 
> -- 
> Slawomir Stepien
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
new file mode 100644
index 0000000000..17565acace
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt
@@ -0,0 +1,29 @@ 
+* Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer
+  driver
+
+Datasheet publicly available at:
+http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
+
+The node for this driver must be a child node of a SPI controller, hence
+all mandatory properties described in
+
+        Documentation/devicetree/bindings/spi/spi-bus.txt
+
+must be specified.
+
+Required properties:
+	- compatible:  	Must be one of the following, depending on the
+			model:
+			"microchip,mcp41010"
+			"microchip,mcp41050"
+			"microchip,mcp41100"
+			"microchip,mcp42010"
+			"microchip,mcp42050"
+			"microchip,mcp42100"
+
+Example:
+mcp41010: potentiometer@0 {
+	compatible = "mcp41010";
+	reg = <0>;
+	spi-max-frequency = <500000>;
+};