Re: [PATCH 1/4] drivers/hwmon/pmbus: Add IBM power supply hwmon driver

2017-08-10 Thread Guenter Roeck
On Wed, Aug 02, 2017 at 04:17:10PM -0500, Eddie James wrote: > From: "Edward A. James" > > Add the driver to monitor power supplies with hwmon over pmbus. > > Signed-off-by: Edward A. James > --- > drivers/hwmon/pmbus/Kconfig | 10 +++ > drivers/hwmon/pmbus/Makefile | 1 + > drivers/hwmon/

Re: [PATCH 2/4] drivers/hwmon/pmbus: ibmps: Add non-hwmon attributes

2017-08-10 Thread Guenter Roeck
On Wed, Aug 02, 2017 at 04:17:11PM -0500, Eddie James wrote: > From: "Edward A. James" > > Add sysfs entries to dump out PS registers and clear faults. > > Signed-off-by: Edward A. James > --- > drivers/hwmon/pmbus/ibmps.c | 78 > + > 1 file changed

Re: [PATCH 4/4] Documentation: ABI: Add IBM power supply sysfs documentation

2017-08-10 Thread Guenter Roeck
On Wed, Aug 02, 2017 at 04:17:13PM -0500, Eddie James wrote: > From: "Edward A. James" > > Signed-off-by: Edward A. James > --- > Documentation/ABI/testing/sysfs-driver-ibmps | 49 > > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/ABI/testing

Re: [PATCH 3/4] Documentation: hwmon: Add IBM power supply documentation

2017-08-10 Thread Guenter Roeck
On Wed, Aug 02, 2017 at 04:17:12PM -0500, Eddie James wrote: > From: "Edward A. James" > > Signed-off-by: Edward A. James > --- > Documentation/hwmon/ibmps | 53 > +++ > 1 file changed, 53 insertions(+) > create mode 100644 Documentation/hwmon/ibmps

Re: [PATCH 1/4] drivers/hwmon/pmbus: Add IBM power supply hwmon driver

2017-08-10 Thread Guenter Roeck
On Wed, Aug 02, 2017 at 04:17:10PM -0500, Eddie James wrote: > From: "Edward A. James" > > Add the driver to monitor power supplies with hwmon over pmbus. > > Signed-off-by: Edward A. James > --- > drivers/hwmon/pmbus/Kconfig | 10 +++ > drivers/hwmon/pmbus/Makefile | 1 + > drivers/hwmon/

[PATCH] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Anton Vasilyev
If stts751 hw by some reason reports conversion rate bigger then 9: ret = i2c_smbus_read_byte_data(priv->client, STTS751_REG_RATE); then dereference stts751_intervals[priv->interval] leads to buffer overread. The path adds sanity check for value read from chip. Found by Linux Driver Verif

Re: [PATCH 1/4] drivers/hwmon/pmbus: Add IBM power supply hwmon driver

2017-08-10 Thread Eddie James
On 08/10/2017 10:00 AM, Guenter Roeck wrote: On Wed, Aug 02, 2017 at 04:17:10PM -0500, Eddie James wrote: From: "Edward A. James" Add the driver to monitor power supplies with hwmon over pmbus. Signed-off-by: Edward A. James --- drivers/hwmon/pmbus/Kconfig | 10 +++ drivers/hwmon/pmbu

Re: [PATCH v2 1/4] dt-bindings: hwmon: pmbus: Add Maxim MAX31785 documentation

2017-08-10 Thread Rob Herring
On Wed, Aug 02, 2017 at 04:45:38PM +0930, Andrew Jeffery wrote: > Signed-off-by: Andrew Jeffery > --- > .../devicetree/bindings/hwmon/pmbus/max31785.txt | 126 > + > 1 file changed, 126 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/max317

Re: [PATCH] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Guenter Roeck
On Thu, Aug 10, 2017 at 06:23:34PM +0300, Anton Vasilyev wrote: > If stts751 hw by some reason reports conversion rate bigger then 9: > ret = i2c_smbus_read_byte_data(priv->client, STTS751_REG_RATE); > then dereference stts751_intervals[priv->interval] leads to buffer > overread. > > The pat

[PATCH v2] hwmon:(stts751) buffer overread on wrong chip configuration

2017-08-10 Thread Anton Vasilyev
If stts751 hw by some reason reports conversion rate bigger then 9: ret = i2c_smbus_read_byte_data(priv->client, STTS751_REG_RATE); then dereference stts751_intervals[priv->interval] leads to buffer overread. The path adds sanity check for value stored on chip. Found by Linux Driver Verif

Re: [PATCH 4/4] drivers/hwmon/pmbus: Add debugfs for status registers

2017-08-10 Thread Eddie James
On 08/09/2017 08:15 PM, Guenter Roeck wrote: On Wed, Aug 09, 2017 at 05:19:17PM -0500, Eddie James wrote: From: "Edward A. James" Export all the available status registers through debugfs, if the client driver wants them. Signed-off-by: Edward A. James --- drivers/hwmon/pmbus/pmbus.c

Re: [PATCH 4/4] drivers/hwmon/pmbus: Add debugfs for status registers

2017-08-10 Thread Eddie James
On 08/10/2017 03:15 PM, Eddie James wrote: On 08/09/2017 08:15 PM, Guenter Roeck wrote: On Wed, Aug 09, 2017 at 05:19:17PM -0500, Eddie James wrote: From: "Edward A. James" Export all the available status registers through debugfs, if the client driver wants them. Signed-off-by: Edward

Re: [PATCH 4/4] drivers/hwmon/pmbus: Add debugfs for status registers

2017-08-10 Thread Guenter Roeck
On Thu, Aug 10, 2017 at 03:15:57PM -0500, Eddie James wrote: > > > On 08/09/2017 08:15 PM, Guenter Roeck wrote: > >On Wed, Aug 09, 2017 at 05:19:17PM -0500, Eddie James wrote: > >>From: "Edward A. James" > >> > >>Export all the available status registers through debugfs, if the client > >>driver

Re: [PATCH 4/4] drivers/hwmon/pmbus: Add debugfs for status registers

2017-08-10 Thread Guenter Roeck
On Thu, Aug 10, 2017 at 03:23:11PM -0500, Eddie James wrote: > > > On 08/10/2017 03:15 PM, Eddie James wrote: > > > > > >On 08/09/2017 08:15 PM, Guenter Roeck wrote: > >>On Wed, Aug 09, 2017 at 05:19:17PM -0500, Eddie James wrote: > >>>From: "Edward A. James" > >>> > >>>Export all the available

[PATCH v2 0/4] hwmon: (pmbus): Core extension for STATUS_WORD and debugfs

2017-08-10 Thread Eddie James
From: "Edward A. James" This series adds some functionality to the pmbus core. The first two patches provide support for the STATUS_WORD register. This allows more default alarm attributes to be used, as the upper byte of the status register is available. The third patch then uses the STATUS_INP

[PATCH v2 4/4] hwmon: (pmbus): Add debugfs for status registers

2017-08-10 Thread Eddie James
From: "Edward A. James" Export all the available status registers through debugfs, if the client driver wants them. Signed-off-by: Edward A. James --- drivers/hwmon/pmbus/pmbus.h | 6 ++ drivers/hwmon/pmbus/pmbus_core.c | 201 +++ 2 files changed, 207

[PATCH v2 3/4] hwmon: (pmbus): Add generic alarm bit for iin and pin

2017-08-10 Thread Eddie James
From: "Edward A. James" Add PB_STATUS_INPUT as the generic alarm bit for iin and pin. We also need to redo the status register checking before setting up the boolean attribute, since it won't necessarily check STATUS_WORD if the device doesn't support it, which we need for this bit. Signed-off-b

[PATCH v2 2/4] hwmon: (pmbus): Access word data for STATUS_WORD

2017-08-10 Thread Eddie James
From: "Edward A. James" Pmbus always reads byte data from the status register, even if configured to use STATUS_WORD. Use a function pointer to read the correct amount of data from the registers. Also switch to try STATUS_WORD first before STATUS_BYTE on init. Signed-off-by: Edward A. James ---

[PATCH v2 1/4] hwmon: (pmbus): Switch status registers to 16 bit

2017-08-10 Thread Eddie James
From: "Edward A. James" Switch the storage of status registers to 16 bit values. This allows us to store all the bits of STATUS_WORD. Signed-off-by: Edward A. James --- drivers/hwmon/pmbus/pmbus_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/h

[PATCH v2 0/3] hwmon: (pmbus): Add POWER System power supply driver

2017-08-10 Thread Eddie James
From: "Edward A. James" This series adds a hwmon pmbus driver for a POWER System power supply. The core monitoring functionality is provided by pmbus. This series depends on the pmbus core extensions for debugfs recently submitted to the mailing list (latest: https://lkml.org/lkml/2017/8/10/881)

[PATCH v2 3/3] Documentation: hwmon: Add POWER system power supply documentation

2017-08-10 Thread Eddie James
From: "Edward A. James" Signed-off-by: Edward A. James --- Documentation/hwmon/powerps | 54 + 1 file changed, 54 insertions(+) create mode 100644 Documentation/hwmon/powerps diff --git a/Documentation/hwmon/powerps b/Documentation/hwmon/powerps new

[PATCH v2 1/3] dt-bindings: i2c: Document the POWER system power supply device

2017-08-10 Thread Eddie James
From: "Edward A. James" Signed-off-by: Edward A. James --- .../devicetree/bindings/i2c/ibm,power-ps.txt| 21 + 1 file changed, 21 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/ibm,power-ps.txt diff --git a/Documentation/devicetree/bindings/

[PATCH v2 2/3] hwmon: (pmbus): Add POWER system power supply driver

2017-08-10 Thread Eddie James
From: "Edward A. James" Add the driver to monitor POWER system power supplies with hwmon over pmbus. Signed-off-by: Edward A. James --- drivers/hwmon/pmbus/Kconfig | 10 +++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/powerps.c | 144 ++

Re: [PATCH v2 2/3] hwmon: (pmbus): Add POWER system power supply driver

2017-08-10 Thread Guenter Roeck
On Thu, Aug 10, 2017 at 05:19:45PM -0500, Eddie James wrote: > From: "Edward A. James" > > Add the driver to monitor POWER system power supplies with hwmon over > pmbus. > > Signed-off-by: Edward A. James > --- > drivers/hwmon/pmbus/Kconfig | 10 +++ > drivers/hwmon/pmbus/Makefile | 1 +

Re: [PATCH v2 3/3] Documentation: hwmon: Add POWER system power supply documentation

2017-08-10 Thread Guenter Roeck
On Thu, Aug 10, 2017 at 05:19:46PM -0500, Eddie James wrote: > From: "Edward A. James" > > Signed-off-by: Edward A. James > --- > Documentation/hwmon/powerps | 54 > + > 1 file changed, 54 insertions(+) > create mode 100644 Documentation/hwmon/power

Re: [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures

2017-08-10 Thread Zhang Rui
On Tue, 2017-08-08 at 17:08 +0200, Julia Lawall wrote: > The thermal_zone_of_device_ops structures are only passed as the > fourth > argument to thermal_zone_of_sensor_register or > devm_thermal_zone_of_sensor_register, both of which are declared as > const. > Thus the thermal_zone_of_device_ops st

Re: [PATCH 0/9 v2] constify thermal_zone_of_device_ops structures

2017-08-10 Thread Julia Lawall
On Fri, 11 Aug 2017, Zhang Rui wrote: > On Tue, 2017-08-08 at 17:08 +0200, Julia Lawall wrote: > > The thermal_zone_of_device_ops structures are only passed as the > > fourth > > argument to thermal_zone_of_sensor_register or > > devm_thermal_zone_of_sensor_register, both of which are declared a