Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Linus Walleij
On Mon, Aug 13, 2018 at 6:26 PM Guenter Roeck wrote: > The goal is to be able to access all environmental values with a single > command or set of commands, such as the "sensors" command. This command > depends on libsensors, which currently gets its data exclusively from > hwmon drivers. > > A

Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 11:09:12PM +0200, Linus Walleij wrote: > On Mon, Aug 13, 2018 at 4:14 PM Tejun Heo wrote: > > > So, one thought I have is that this doesn't really add any new > > capabilities. The information is fully discoverable from userspace > > and interpreting the data requires

Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 11:03:03PM +0200, Linus Walleij wrote: > On Mon, Aug 13, 2018 at 12:31 AM Guenter Roeck wrote: > > On 08/09/2018 09:15 PM, Guenter Roeck wrote: > > > On 08/09/2018 03:24 PM, Linus Walleij wrote: > > > >> +if (id == SMART_TEMP_PROP_194) > > >> +break; >

Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Linus Walleij
On Mon, Aug 13, 2018 at 4:14 PM Tejun Heo wrote: > So, one thought I have is that this doesn't really add any new > capabilities. The information is fully discoverable from userspace > and interpreting the data requires quite a bit of heuristics. So, do > we really need this in the kernel? I

Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Linus Walleij
On Mon, Aug 13, 2018 at 12:31 AM Guenter Roeck wrote: > On 08/09/2018 09:15 PM, Guenter Roeck wrote: > > On 08/09/2018 03:24 PM, Linus Walleij wrote: > >> +if (id == SMART_TEMP_PROP_194) > >> +break; > > 231 also seems to report the temperature if available, as does 190.

Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 04:29:33PM +0200, Linus Walleij wrote: > On Sat, Aug 11, 2018 at 9:15 PM Guenter Roeck wrote: > > On Fri, Aug 10, 2018 at 12:24:25AM +0200, Linus Walleij wrote: > > > > + /* Names the hwmon device something like "sd_0:0:0:0" */ > > > + sname = devm_kasprintf(dev,

Re: [PATCH] RFC: libata: Add hwmon support for SMART temperature sensors

2018-08-14 Thread Linus Walleij
On Sat, Aug 11, 2018 at 9:15 PM Guenter Roeck wrote: > On Fri, Aug 10, 2018 at 12:24:25AM +0200, Linus Walleij wrote: > > + /* Names the hwmon device something like "sd_0:0:0:0" */ > > + sname = devm_kasprintf(dev, GFP_KERNEL, "sd_%s", dev_name(dev)); > > + if (!sname) > > +

Re: [PATCH] drivers: hwmon: pmbus: ltc2978: Add support for LTM4686 uModule

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 02:18:28PM +0200, michael.henner...@analog.com wrote: > From: Michael Hennerich > > This patch adds support for LTM4686 Ultrathin Dual 10A or > Single 20A uModule Regulator with Digital Power System Management. > > Datasheet: http://www.analog.com/ltm4686 > > >

Re: [PATCH 2/2 v2] hwmon: (adt7475) Make adt7475_read_word() return errors

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 01:07:47PM +0300, Dan Carpenter wrote: > The adt7475_read_word() function was meant to return negative error > codes on failure. > > Signed-off-by: Dan Carpenter > Reviewed-by: Tokunori Ikegami Applied. Thanks, Guenter

Re: [PATCH 1/2] hwmon: (adt7475) Potential error pointer dereferences

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 12:12:36PM +0300, Dan Carpenter wrote: > The adt7475_update_device() function returns error pointers. The > problem is that in show_pwmfreq() we dereference it before the check. > And then in pwm_use_point2_pwm_at_crit_show() there isn't a check at > all. I don't know if

Re: [PATCH 1/1] hwmon: (ina2xx) fix sysfs shunt resistor read access

2018-08-14 Thread Guenter Roeck
On Tue, Aug 14, 2018 at 09:09:37AM +0200, Lothar Felten wrote: > fix the sysfs shunt resistor read access: return the shunt resistor > value, not the calibration register contents. > > update email address > > Signed-off-by: Lothar Felten Applied. Thanks, Guenter

[PATCH] drivers: hwmon: pmbus: ltc2978: Add support for LTM4686 uModule

2018-08-14 Thread michael.hennerich
From: Michael Hennerich This patch adds support for LTM4686 Ultrathin Dual 10A or Single 20A uModule Regulator with Digital Power System Management. Datasheet: http://www.analog.com/ltm4686 Signed-off-by: Michael Hennerich --- Documentation/devicetree/bindings/hwmon/ltc2978.txt | 2 ++

[PATCH 2/2 v2] hwmon: (adt7475) Make adt7475_read_word() return errors

2018-08-14 Thread Dan Carpenter
The adt7475_read_word() function was meant to return negative error codes on failure. Signed-off-by: Dan Carpenter --- v2: In my first patch I just removed the error handling in the callers diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 90837f7c7d0f..ec03359536aa 100644

Re: [PATCH 2/2] hwmon: (adt7475) Remove some unnecessary checks

2018-08-14 Thread Dan Carpenter
On Tue, Aug 14, 2018 at 09:34:30AM +, IKEGAMI Tokunori wrote: > Hi Dan-san, > > Thank you so much for this fix also. > > Reviewed-by: Tokunori Ikegami > > By the way I will do try to change the adt7475_read_word() to return the > error correctly in near future. > I can do that. Drop

RE: [PATCH 2/2] hwmon: (adt7475) Remove some unnecessary checks

2018-08-14 Thread IKEGAMI Tokunori
Hi Dan-san, Thank you so much for this fix also. Reviewed-by: Tokunori Ikegami By the way I will do try to change the adt7475_read_word() to return the error correctly in near future. Regards, Ikegami > -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] >

RE: [PATCH 1/2] hwmon: (adt7475) Potential error pointer dereferences

2018-08-14 Thread IKEGAMI Tokunori
Hi Dan-san, Thank you so much for the fixes. But very sorry for the problem caused by my changes. I have reviewed them and those look good. Reviewed-by: Tokunori Ikegami Regards, Ikegami > -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Tuesday,

[PATCH 2/2] hwmon: (adt7475) Remove some unnecessary checks

2018-08-14 Thread Dan Carpenter
The adt7475_read_word() returns u16 values, so it's impossible for "ret" to be negative. The check is harmless, but static checkers complain about it. Signed-off-by: Dan Carpenter diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 16045149f3db..9d3da8ea38ba 100644 ---

[PATCH 1/2] hwmon: (adt7475) Potential error pointer dereferences

2018-08-14 Thread Dan Carpenter
The adt7475_update_device() function returns error pointers. The problem is that in show_pwmfreq() we dereference it before the check. And then in pwm_use_point2_pwm_at_crit_show() there isn't a check at all. I don't know if it's required, but it silences a static checker warning and it's

[PATCH 1/1] hwmon: (ina2xx) fix sysfs shunt resistor read access

2018-08-14 Thread Lothar Felten
fix the sysfs shunt resistor read access: return the shunt resistor value, not the calibration register contents. update email address Signed-off-by: Lothar Felten --- Documentation/hwmon/ina2xx | 2 +- drivers/hwmon/ina2xx.c | 13 +++--