[PATCH] hwmon: (lm75) Fix write operations for negative temperatures

2019-08-08 Thread Guenter Roeck
Writes into limit registers fail if the temperature written is negative. The regmap write operation checks the value range, regmap_write accepts an unsigned int as parameter, and the temperature value passed to regmap_write is kept in a variable declared as long. Negative values are converted

[PATCH RFT 3/3] hwmon: w83793d: convert to use devm_i2c_new_dummy_device

2019-08-08 Thread Wolfram Sang
And simplify the error handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/w83793.c | 30 -- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index 46f5dfec8d0a..9df48b70c70c 100644 ---

[PATCH RFT 0/3] hwmon: convert remaining drivers to i2c_new_dummy_device()

2019-08-08 Thread Wolfram Sang
This series is part of a tree-wide movement to replace the I2C API call 'i2c_new_dummy' which returns NULL with its new counterpart returning an ERRPTR. This series fixes the remaining hwmon drivers which could not be converted by my cocci script. So, I did it manually, yet all drivers still

[PATCH RFT 2/3] hwmon: w83792d: convert to use devm_i2c_new_dummy_device

2019-08-08 Thread Wolfram Sang
And simplify the error handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/w83792d.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c index da8a6d62aa23..7fc8a1160c8f 100644 ---

[PATCH RFT 1/3] hwmon: w83791d: convert to use devm_i2c_new_dummy_device

2019-08-08 Thread Wolfram Sang
And simplify the error handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/w83791d.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index 050ad4201691..aad8d4da5802 100644 ---

Re: [PATCH v2 0/4] Add support for variable sample time in lm75 driver

2019-08-08 Thread Guenter Roeck
On Thu, Aug 08, 2019 at 09:02:42AM +0100, Iker Perez wrote: > From: Iker Perez del Palomar Sustatxa > > Hello, > > The objective of following patch series is to add support to lm75 driver > to be able to configure the sample time of it's supported devices, > particularly the tmp75b. > > The

Re: [PATCH v2 3/4] hwmon: (lm75) Add new fields into lm75_params_

2019-08-08 Thread Guenter Roeck
On Thu, Aug 08, 2019 at 09:02:45AM +0100, Iker Perez wrote: > From: Iker Perez del Palomar Sustatxa > > The new fields are included to prepare the driver for next patch. The > fields are: > > * *resolutions: Stores all the supported resolutions by the device. > * num_sample_times: Stores the

Re: [PATCH] hwmon: pmbus: Add Inspur Power System power supply driver

2019-08-08 Thread Guenter Roeck
On Thu, Aug 08, 2019 at 03:36:36PM +0800, John Wang wrote: > Add the driver to monitor Inspur Power System power supplies > with hwmon over pmbus. > > This driver adds debugfs entries for addintional power supply data, s/addintional/additional/ > including vendor,model,part_number,serial

Re: [PATCH][next] hwmon: pmbus: ucd9000: remove unneeded include

2019-08-08 Thread Guenter Roeck
On Thu, Aug 08, 2019 at 10:01:44AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Build bot reports the following build issue after commit 9091373ab7ea > ("gpio: remove less important #ifdef around declarations): > >In file included from

[PATCH v2 2/4] hwmon: (lm75) Create function from code to write into registers

2019-08-08 Thread Iker Perez
From: Iker Perez del Palomar Sustatxa Wrap the existing code to write configurations into registers in a function. Added error handling to the function. Signed-off-by: Iker Perez del Palomar Sustatxa --- drivers/hwmon/lm75.c | 34 +++--- 1 file changed, 27

[PATCH v2 1/4] hwmon: (lm75) Create structure to save all the configuration parameters.

2019-08-08 Thread Iker Perez
From: Iker Perez del Palomar Sustatxa * Add to lm75_data kind field to store the kind of device the driver is working with. * Add an structure to store the configuration parameters of all the supported devices. * Delete resolution_limits from lm75_data and include them in the structure

[PATCH v2 0/4] Add support for variable sample time in lm75 driver

2019-08-08 Thread Iker Perez
From: Iker Perez del Palomar Sustatxa Hello, The objective of following patch series is to add support to lm75 driver to be able to configure the sample time of it's supported devices, particularly the tmp75b. The applied changes involve: * Replace the current switch-case method for

[PATCH v2 4/4] hwmon: (lm75) Modularize lm75_write and make hwmon_chip writable

2019-08-08 Thread Iker Perez
From: Iker Perez del Palomar Sustatxa * Create two separate functions to write into hwmon_temp and hwmon_chip. * Call the functions from lm75_write. * Make hwm_chip writable if the chip supports more than one sample time. Signed-off-by: Iker Perez del Palomar Sustatxa --- drivers/hwmon/lm75.c

[PATCH v2 3/4] hwmon: (lm75) Add new fields into lm75_params_

2019-08-08 Thread Iker Perez
From: Iker Perez del Palomar Sustatxa The new fields are included to prepare the driver for next patch. The fields are: * *resolutions: Stores all the supported resolutions by the device. * num_sample_times: Stores the number of possible sample times. * *sample_times: Stores all the possible

[PATCH][next] hwmon: pmbus: ucd9000: remove unneeded include

2019-08-08 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Build bot reports the following build issue after commit 9091373ab7ea ("gpio: remove less important #ifdef around declarations): In file included from drivers/hwmon/pmbus/ucd9000.c:19:0: >> include/linux/gpio/driver.h:576:1: error: redefinition of >>

[PATCH] hwmon: pmbus: Add Inspur Power System power supply driver

2019-08-08 Thread John Wang
Add the driver to monitor Inspur Power System power supplies with hwmon over pmbus. This driver adds debugfs entries for addintional power supply data, including vendor,model,part_number,serial number,firmware revision, hardware revision,and psu mode(active/standby). Signed-off-by: John Wang