Message ID | 20180921000753.21846-2-nicoleotsuka@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add an initial DT binding doc for ina3221 | expand |
On 09/20/2018 05:07 PM, Nicolin Chen wrote: > Texas Instruments INA3221 is a triple-channel shunt and bus > voltage monitor. This patch adds a DT binding doc for it. > > Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> > --- > .../devicetree/bindings/hwmon/ina3221.txt | 23 +++++++++++++++++++ > 1 file changed, 23 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/ina3221.txt > > diff --git a/Documentation/devicetree/bindings/hwmon/ina3221.txt b/Documentation/devicetree/bindings/hwmon/ina3221.txt > new file mode 100644 > index 000000000000..266c9586c9b1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/ina3221.txt > @@ -0,0 +1,23 @@ > +ina3221 properties > + > +Required properties: > +- compatible: Must be "ti,ina3221" > +- reg: I2C address > + > +Optional properties: > + > +- ti,channel1-name: > +- ti,channel2-name: > +- ti,channel3-name: > + The names of the input sources (described in the schematics) > + Set the names with "NC" to indicate not-connected channels > + I don't really think this is a good idea - first to specify sensor names this way, and much less specifying that "NC" means that a sensor shall be disconnected/disabled. Also, if we define devicetree support for this chip, it should include all configuration options required to configure it. This should at the very least include shunt resistor values. Thanks, Guenter > +Example: > + > +ina3221@40 { > + compatible = "ti,ina3221"; > + reg = <0x40>; > + ti,channel1-name = "NC"; > + ti,channel2-name = "VDD_5V0_EXT"; > + ti,channel3-name = "VDD_19V"; > +}; >
On Thu, Sep 20, 2018 at 05:45:07PM -0700, Guenter Roeck wrote: > On 09/20/2018 05:07 PM, Nicolin Chen wrote: > > +- ti,channel1-name: > > +- ti,channel2-name: > > +- ti,channel3-name: > > + The names of the input sources (described in the schematics) > > + Set the names with "NC" to indicate not-connected channels > > + > > I don't really think this is a good idea - first to specify sensor > names this way, and much less specifying that "NC" means that a sensor > shall be disconnected/disabled. I will replace the NC with a bool property for disconnection. > Also, if we define devicetree support for this chip, it should include > all configuration options required to configure it. This should at > the very least include shunt resistor values. I plan to add them too but am doing it incrementally. I can try to include them in the next version. Thanks Nicolin
diff --git a/Documentation/devicetree/bindings/hwmon/ina3221.txt b/Documentation/devicetree/bindings/hwmon/ina3221.txt new file mode 100644 index 000000000000..266c9586c9b1 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/ina3221.txt @@ -0,0 +1,23 @@ +ina3221 properties + +Required properties: +- compatible: Must be "ti,ina3221" +- reg: I2C address + +Optional properties: + +- ti,channel1-name: +- ti,channel2-name: +- ti,channel3-name: + The names of the input sources (described in the schematics) + Set the names with "NC" to indicate not-connected channels + +Example: + +ina3221@40 { + compatible = "ti,ina3221"; + reg = <0x40>; + ti,channel1-name = "NC"; + ti,channel2-name = "VDD_5V0_EXT"; + ti,channel3-name = "VDD_19V"; +};
Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> --- .../devicetree/bindings/hwmon/ina3221.txt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/ina3221.txt