Re: [PATCH 4/5] hwmon: (ina3221) Make sure data is ready after channel enabling

2018-10-17 Thread Nicolin Chen
On Wed, Oct 17, 2018 at 02:17:14PM -0700, Guenter Roeck wrote: > On Wed, Oct 17, 2018 at 01:53:48PM -0700, Nicolin Chen wrote: > > Hello Guenter, > > > > On Wed, Oct 17, 2018 at 09:55:43AM -0700, Guenter Roeck wrote: > > > > @@ -676,6 +701,13 @@ static int __maybe_unused ina3221_resume(struct >

[PATCH 1/2] hwmon: (pmbus): Add driver for Intersil ISL68137

2018-10-17 Thread Kun Yi
From: Maxim Sloyko Intersil ISL68137 is a digital output 7-phase configurable PWM controller with an AVSBus interface. Signed-off-by: Maxim Sloyko Signed-off-by: Kun Yi --- drivers/hwmon/pmbus/Kconfig| 10 drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/isl68137.c | 86

[PATCH v3 2/2] dt-bindings: hwmon: Add adm127x documentation

2018-10-17 Thread Kun Yi
adm127x are hot-swap controllers that allow a circuit board to be removed from or inserted into a live backplane. This patch adds the device tree bindings documentation. Signed-off-by: Kun Yi --- .../devicetree/bindings/hwmon/adm1275.txt | 25 +++ 1 file changed, 25

[PATCH v3 1/2] hwmon: (adm1275): Allow setting shunt reg value

2018-10-17 Thread Kun Yi
The ADM series of hotswap controllers support extending the current measurement range by using a sensing resistor value other than the typical 1 mOhm. For example, using a 0.5 mOhm sensing resistor doubles the maximal current can be measured. Current driver assumes a shunt resistor value of 1

Re: [PATCH 4/5] hwmon: (ina3221) Make sure data is ready after channel enabling

2018-10-17 Thread Guenter Roeck
On Wed, Oct 17, 2018 at 01:53:48PM -0700, Nicolin Chen wrote: > Hello Guenter, > > On Wed, Oct 17, 2018 at 09:55:43AM -0700, Guenter Roeck wrote: > > > @@ -676,6 +701,13 @@ static int __maybe_unused ina3221_resume(struct > > > device *dev) > > > if (ret) > > > return ret; > > > > >

Re: [PATCH 2/5] hwmon: (ina3221) Return -ENODATA for two alarms attributes

2018-10-17 Thread Guenter Roeck
On Wed, Oct 17, 2018 at 01:39:17PM -0700, Nicolin Chen wrote: > On Wed, Oct 17, 2018 at 12:46:05PM -0700, Guenter Roeck wrote: > > On Tue, Oct 16, 2018 at 06:24:23PM -0700, Nicolin Chen wrote: > > > There is nothing critically wrong to read these two attributes > > > without having a is_enabled()

Re: [PATCH 4/5] hwmon: (ina3221) Make sure data is ready after channel enabling

2018-10-17 Thread Nicolin Chen
Hello Guenter, On Wed, Oct 17, 2018 at 09:55:43AM -0700, Guenter Roeck wrote: > > @@ -676,6 +701,13 @@ static int __maybe_unused ina3221_resume(struct device > > *dev) > > if (ret) > > return ret; > > > > + /* Make sure data conversion is finished */ > > + ret =

Re: [PATCH 1/5] hwmon: (core) Inherit power properties to hdev

2018-10-17 Thread Nicolin Chen
On Wed, Oct 17, 2018 at 12:44:30PM -0700, Guenter Roeck wrote: > > + hdev->driver = dev->driver; > > + hdev->power = dev->power; > > + hdev->pm_domain = dev->pm_domain; > > dev can, unfortunately, be NULL > > > hdev->of_node = dev ? dev->of_node : NULL; > > ... as you can see here.

Re: [PATCH 2/5] hwmon: (ina3221) Return -ENODATA for two alarms attributes

2018-10-17 Thread Guenter Roeck
On Tue, Oct 16, 2018 at 06:24:23PM -0700, Nicolin Chen wrote: > There is nothing critically wrong to read these two attributes > without having a is_enabled() check at this point. But reading > the MASK_ENABLE register would clear the CVRF bit according to > the datasheet. So it'd be safer to

Re: [PATCH 1/5] hwmon: (core) Inherit power properties to hdev

2018-10-17 Thread Guenter Roeck
On Tue, Oct 16, 2018 at 06:24:22PM -0700, Nicolin Chen wrote: > The new hdev is a child device related to the original parent > hwmon driver and its device. However, it doesn't support the > power features, typically being defined in the parent driver. > > So this patch inherits three necessary

Re: [PATCH 4/5] hwmon: (ina3221) Make sure data is ready after channel enabling

2018-10-17 Thread Guenter Roeck
On Tue, Oct 16, 2018 at 06:24:25PM -0700, Nicolin Chen wrote: > The data might need some time to get ready after channel enabling, > although the data register is readable without CVRF being set. So > this patch adds a CVRF polling to make sure that data register is > updated with the new data. >