Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1428194

Re: [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding documentation

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding documentation
Date 2016-06-21 23:40 +0200
Message-ID <rMByN-2NM-3@gated-at.bofh.it> (permalink)
References <rMnPb-2gH-5@gated-at.bofh.it> <rMnPb-2gH-15@gated-at.bofh.it> <rMp4B-3gc-3@gated-at.bofh.it> <rMp4B-3gc-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 21, 2016 at 09:49:20AM +0200, Florian Vaussard wrote:
> Hello,
> 
> On 06/21/2016 09:38 AM, Peter Rosin wrote:
> > On 2016-06-21 08:55, Florian Vaussard wrote:
> >> Add the device tree documentation for all the supported parts. Apart the
> >> compatible string and standard I2C binding, no other binding is currently
> >> needed.
> >>
> >> Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
> >> ---
> >>  .../bindings/iio/potentiometer/mcp4531.txt         | 84 ++++++++++++++++++++++
> >>  1 file changed, 84 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/mcp4531.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp4531.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp4531.txt
> >> new file mode 100644
> >> index 0000000..b052299
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/iio/potentiometer/mcp4531.txt
> >> @@ -0,0 +1,84 @@
> >> +* Microchip MCP453X/454X/455X/456X/463X/464X/465X/466X Digital Potentiometer
> >> +  driver
> >> +
> >> +The node for this driver must be a child node of a I2C controller, hence
> >> +all mandatory properties for your controller must be specified. See directory:
> >> +
> >> +        Documentation/devicetree/bindings/i2c
> >> +
> >> +for more details.
> >> +
> >> +Required properties:
> >> +	- compatible:  	Must be one of the following, depending on the
> >> +			model:
> >> +			"microchip,mcp4531-502"
> >> +			"microchip,mcp4531-103"
> >> +			"microchip,mcp4531-503"
> > 
> > *snip*
> > 
> > I'm not directly opposed, but I have used the following and DT booting
> > works like a charm here.
> > 
> > 		mcp4651-104@28 {
> > 			compatible = "mcp4651-104";
> > 			reg = <0x28>;
> > 		};
> > 
> 
> I was not aware that the i2c subsystem had a facility to match the compatible
> string against i2c_device_id. Good to know.
> 
> > But, I suppose some DT documentation is not bad, and my understanding of
> > the device instantiation process and the i2c/dt interactions are not
> > complete, so my DT snippet might be an abomination? I'll leave the
> > decision if this is needed to someone with more experience on how other
> > drivers handle this.
> > 
> 
> Your compatible string is missing the vendor ID (microchip). This is the only
> objection that I can see to your proposition. Let's wait to hear from a DT
> maintainer.

I2C subsystem happens to ignore the vendor prefix in matching. You 
should not rely on that and provide proper compatible strings.

Rob

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] iio: potentiometer: mcp4531: New parts and device tree Florian Vaussard <florian.vaussard@gmail.com> - 2016-06-21 09:00 +0200
  [PATCH 3/3] iio: potentiometer: mcp4531: Add device tree binding Florian Vaussard <florian.vaussard@gmail.com> - 2016-06-21 09:00 +0200
    Re: [PATCH 3/3] iio: potentiometer: mcp4531: Add device tree binding Florian Vaussard <florian.vaussard@heig-vd.ch> - 2016-06-22 08:30 +0200
      Re: [PATCH 3/3] iio: potentiometer: mcp4531: Add device tree binding Florian Vaussard <florian.vaussard@heig-vd.ch> - 2016-06-23 11:00 +0200
  [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding documentation Florian Vaussard <florian.vaussard@gmail.com> - 2016-06-21 09:00 +0200
    Re: [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding  documentation Florian Vaussard <florian.vaussard@heig-vd.ch> - 2016-06-21 10:20 +0200
      Re: [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding  documentation Rob Herring <robh@kernel.org> - 2016-06-21 23:40 +0200
    Re: [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding  documentation Rob Herring <robh@kernel.org> - 2016-06-21 23:50 +0200
      Re: [PATCH 2/3] iio: potentiometer: mcp4531: Add device tree binding  documentation Florian Vaussard <florian.vaussard@heig-vd.ch> - 2016-06-22 08:20 +0200
  [PATCH 1/3] iio: potentiometer: mcp4531: Add support for MCP454x, MCP456x, MCP464x and MCP466x Florian Vaussard <florian.vaussard@gmail.com> - 2016-06-21 09:00 +0200

csiph-web