Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 10:31 PM, Nicolin Chen wrote: On Sat, Sep 22, 2018 at 10:19:42PM -0700, Guenter Roeck wrote: +2) child nodes + Required properties: + - input-id: Must be 1, 2 or 3 + + Optional properties: + - input-label: Name of the input source + - shunt-resistor: Shunt resistor value in

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 10:19:42PM -0700, Guenter Roeck wrote: > >+2) child nodes > >+ Required properties: > >+ - input-id: Must be 1, 2 or 3 > >+ > >+ Optional properties: > >+ - input-label: Name of the input source > >+ - shunt-resistor: Shunt resistor value in micro-Ohm > >+ - status:

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 08:33 PM, Nicolin Chen wrote: No. If the chip was configured by the BIOS/ROMMON, it is supposed to be that way. We can not just override that. For this driver, it does soft reset in the probe() so we're sure that all channels are enabled at the moment of calling this

Re: [PATCH v4 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
Thank you for the quick response! On Sat, Sep 22, 2018 at 10:11:26PM -0700, Guenter Roeck wrote: > >+static umode_t ina3221_attr_is_visible(struct kobject *kobj, > >+ struct attribute *attr, int n) > >+{ > >+const int max_attrs = ARRAY_SIZE(ina3221_attrs) -

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 09:11 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 --- Changelog v3->v4: * Removed the attempt of putting labels in the node names * Added a new

Re: [PATCH v4 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 09:11 PM, Nicolin Chen wrote: An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This

[PATCH v4 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This patch adds a new structure of input source

[PATCH v4 0/2] Add an initial DT binding doc for ina3221

2018-09-22 Thread Nicolin Chen
This series adds a initial DT binding doc for ina3221. It defines a child node to describe the input source of each ina3221 channel. Then it changes the driver to handle the information properly. Changelog v3->v4: * Fixed one place in child DT node bindings (PATCH-1) * Changed the driver

[PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
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 --- Changelog v3->v4: * Removed the attempt of putting labels in the node names * Added a new optional label property in the child node * Updated

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 08:33:00PM -0700, Nicolin Chen wrote: > On Sat, Sep 22, 2018 at 07:07:02PM -0700, Guenter Roeck wrote: > > On 09/22/2018 05:38 PM, Nicolin Chen wrote: > > >On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: > > > > > >+ /* Disable channels if their

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: > > > > + /* Disable channels if their inputs are disconnected */ > > > > + for (i = 0, mask = 0; i < INA3221_NUM_CHANNELS; i++) { > > > > + if (ina->inputs[i].disconnected) > > > > +

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 11:46 AM, Nicolin Chen wrote: This patch adds a new structure of input source specific information including input source label, shunt resistor value and its connection status. It exposes these labels via sysfs and also disables those channels where there's no input source being

Re: [PATCH v3 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 11:03 AM, Nicolin Chen wrote: +2) child nodes + The names of child nodes should indicate input source names + + Required properties: + - input-id: Must be 1, 2 or 3 + + Optional properties: + - shunt-resistor: Shunt resistor value in micro-Ohm + - status: Should be "disabled"

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
> >This patch adds a new structure of input source specific > >information including input source label, shunt resistor > >value and its connection status. It exposes these labels > >via sysfs and also disables those channels where there's > >no input source being connected. > > > > I see you

Re: [PATCH v3 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
> >+2) child nodes > >+ The names of child nodes should indicate input source names > >+ > >+ Required properties: > >+ - input-id: Must be 1, 2 or 3 > >+ > >+ Optional properties: > >+ - shunt-resistor: Shunt resistor value in micro-Ohm > >+ - status: Should be "disabled" if no input source

Re: NCT7802Y on Asus Fan Extension Card

2018-09-22 Thread Guenter Roeck
On 09/22/2018 07:38 AM, Aleksandr Mezin wrote: Hello. I'm trying to get monitoring working for Asus Fan Extension Card. The card has NCT7802Y on it. "modprobe nct7802" doesn't fail, the module loads, no errors in dmesg, but hwmon device doesn't show up too. What am I missing? The motherboard

NCT7802Y on Asus Fan Extension Card

2018-09-22 Thread Aleksandr Mezin
Hello. I'm trying to get monitoring working for Asus Fan Extension Card. The card has NCT7802Y on it. "modprobe nct7802" doesn't fail, the module loads, no errors in dmesg, but hwmon device doesn't show up too. What am I missing? The motherboard is Asus Prime X299-A, with NCT6796D on it (mostly

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
Hi, On 09/21/2018 03:32 PM, Nicolin Chen wrote: From: Nicolin Chen An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and

Re: [PATCH v3 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
Hi, On 09/21/2018 03:32 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 --- Changelog v2->v3: * Added a simple subject in the line 1 * Fixed the shunt resistor value