Re: [PATCH] hwmon: pmbus: refactor deprecated strncpy

2023-09-15 Thread Guenter Roeck
On Fri, Sep 15, 2023 at 06:28:41PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it guarantees >

Re: [PATCH] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-14 Thread Guenter Roeck
On 9/14/23 22:24, Kees Cook wrote: On Thu, Sep 14, 2023 at 11:21:06PM +, Justin Stitt wrote: `strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the

Re: [PATCH 4/8] hwmon: Add support for Azoteq IQS620AT temperature sensor

2019-10-21 Thread Guenter Roeck
On 10/21/19 7:26 PM, Jeff LaBundy wrote: Hi Guenter, Thank you for your prompt review. On Mon, Oct 21, 2019 at 08:38:25AM -0700, Guenter Roeck wrote: On Sun, Oct 20, 2019 at 11:11:19PM -0500, Jeff LaBundy wrote: This patch adds support for the Azoteq IQS620AT temperature sensor, capable

Re: [PATCH 4/8] hwmon: Add support for Azoteq IQS620AT temperature sensor

2019-10-21 Thread Guenter Roeck
On Sun, Oct 20, 2019 at 11:11:19PM -0500, Jeff LaBundy wrote: > This patch adds support for the Azoteq IQS620AT temperature sensor, > capable of reporting its absolute die temperature. > > Signed-off-by: Jeff LaBundy Seems to me this might be more feasible as iio driver. Jonathan, what do you

Re: [v1,1/1] hwmon: (nct7904) Fix the incorrect value of vsen_mask & tcpu_mask & temp_mode in nct7904_data struct.

2019-10-20 Thread Guenter Roeck
On Mon, Oct 14, 2019 at 04:24:51PM +0800, amy.s...@advantech.com.tw wrote: > From: "amy.shih" > > Voltage sensors overlap with external temperature sensors. Detect > the multi-function of voltage, thermal diode, thermistor and > reserved from register VT_ADC_MD_REG to set value of vsen_mask & >

Re: [PATCH v2 1/2] hwmon: Support ADI Fan Control IP

2019-10-20 Thread Guenter Roeck
On Wed, Oct 09, 2019 at 12:28:05PM +0200, Nuno Sá wrote: > The purpose of this IP Core is to control the fan used for the cooling of a > Xilinx Zynq Ultrascale+ MPSoC without the need of any external temperature > sensors. To achieve this, the IP core uses the PL SYSMONE4 primitive to > obtain the

Re: [PATCH v2 2/2] dt-bindings: hwmon: Add AXI FAN Control documentation

2019-10-20 Thread Guenter Roeck
On Wed, Oct 09, 2019 at 12:28:06PM +0200, Nuno Sá wrote: > Document the AXI FAN Control IP core devicetree bindings. > > Signed-off-by: Nuno Sá > Reviewed-by: Rob Herring Applied to hwmon-next. Thanks, Guenter > --- > Changes in v2: > * Set the correct license for new bindings; > * Fix

Re: [PATCH v4 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-20 Thread Guenter Roeck
On Mon, Oct 07, 2019 at 08:46:22PM +, Tremblay, Eric wrote: > hwmon: Add driver for Texas Instruments TMP512/513 sensor chips. > > TI's TMP512/513 are I2C/SMBus system monitor chips. These chips > monitor the supply voltage, supply current, power consumption > and provide one local and up to

Re: [PATCH v4 2/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-20 Thread Guenter Roeck
On Mon, Oct 07, 2019 at 08:47:03PM +, Tremblay, Eric wrote: > dt-bindings: Add TMP512/513 documentation > > Add documentation for TMP512/513 sensor chips > Since this is the devicetree documentation, it will need to be approved by a devicetree maintainer. Wondering why that didn't happen, I

Re: [PATCH][RESEND] New driver for TLV493D-A1B6 I2C chip, input and hwmon class device.

2019-10-18 Thread Guenter Roeck
On Fri, Oct 18, 2019 at 10:10:19PM +0200, Jakub Ladman wrote: > Dear maintainers. > > As a linux-patch newbie i made some mistakes in my first attempt to send this > patch. > This patch contains a new driver for i2c connected chip, Infineon > TLV493D-A1B6. > The chip is 3D hall-effect sensor with

Re: [PATCH] hwmon: (tmp421) Allow reading at 2Hz instead of 0.5Hz

2019-10-17 Thread Guenter Roeck
On Mon, Oct 14, 2019 at 09:03:10AM -0500, Kyle Roeschley wrote: > Our driver configures the device to read at 2Hz, but then only allows the > user to read cached temp values at up to 0.5Hz. Let's allow users to read > as quickly as we do. > > Signed-off-by: Kyle Roeschley Applied. Thanks,

Re: [PATCH] hwmon: w83793d: remove redundant assignment to variable res

2019-10-17 Thread Guenter Roeck
On Fri, Oct 11, 2019 at 06:02:15PM +0100, Colin King wrote: > From: Colin Ian King > > The variable res is being initialized with a value that > is never read and is being re-assigned a little later on. The > assignment is redundant and hence can be removed. > > Addresses-Coverity: ("Unused

Re: [PATCH 2/2] hwmon: (pmbus/ibm-cffps) Add version detection capability

2019-10-17 Thread Guenter Roeck
On Wed, Oct 09, 2019 at 02:11:02PM -0500, Eddie James wrote: > Some systems may plug in either version 1 or version 2 of the IBM common > form factor power supply. Add a version-less compatibility string that > tells the driver to try and detect which version of the power supply is > connected. >

Re: [PATCH 1/2] dt-bindings: hwmon: Document ibm,cffps compatible string

2019-10-17 Thread Guenter Roeck
On Wed, Oct 09, 2019 at 02:11:01PM -0500, Eddie James wrote: > Document this string that indicates that any version of the power supply > may be connected. In this case, the driver must detect the version > automatically. > > Signed-off-by: Eddie James > Acked-by: Rob Herring Applied. Thanks,

[GIT PULL] hwmon fixes for v5.4-rc3

2019-10-12 Thread Guenter Roeck
Hi Linus, Please pull hwmon fixes for Linux v5.4-rc3 from signed tag: git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-for-v5.4-rc3 Thanks, Guenter -- The following changes since commit 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c: Linux 5.4-rc1 (2019-09-30

Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung

2019-10-10 Thread Guenter Roeck
as well. Signed-off-by: Arnd Bergmann For hwmon: Acked-by: Guenter Roeck --- arch/arm/mach-s3c64xx/mach-crag6410.c | 2 +- arch/arm/mach-s3c64xx/mach-mini6410.c | 2 +- arch/arm/mach-s3c64xx/mach-real6410.c | 2 +- arch/arm/mach-s3c64xx/mach-smdk6410.c

Re: [PATCH 2/3] hwmon: Support ADI Fan Control IP

2019-10-08 Thread Guenter Roeck
On Tue, Oct 08, 2019 at 03:59:49PM +, Sa, Nuno wrote: [ ... ] > > > + > > > + ctl->irq = platform_get_irq(pdev, 0); > > > + if (ctl->irq < 0) { > > > > This can return -EPROBE_DEFER. On top of that, it already generates > > an error > > message, meaning another one here is unnecessary. > >

Re: [PATCH 2/3] hwmon: Support ADI Fan Control IP

2019-10-07 Thread Guenter Roeck
On 10/7/19 6:52 AM, Sa, Nuno wrote: [ ... ] +static long axi_fan_control_get_pwm_duty(const struct axi_fan_control_data *ctl) +{ + u32 pwm_width = axi_fan_control_ioread(ADI_REG_PWM_WIDTH, ctl); + u32 pwm_period = axi_fan_control_ioread(ADI_REG_PWM_PERIOD, ctl); + + return

Re: [PATCH] hwmon: abituguru: make array probe_order static, makes object smaller

2019-10-06 Thread Guenter Roeck
On Sun, Oct 06, 2019 at 03:52:31PM +0100, Colin King wrote: > From: Colin Ian King > > Don't populate the array probe_order on the stack but instead make it > static. Makes the object code smaller by 94 bytes. > > Before: >text data bss dec hex filename > 41473

Re: [PATCH 2/3] hwmon: Support ADI Fan Control IP

2019-10-06 Thread Guenter Roeck
On Thu, Sep 26, 2019 at 12:39:24PM +0200, Nuno Sá wrote: > The purpose of this IP Core is to control the fan used for the cooling of a > Xilinx Zynq Ultrascale+ MPSoC without the need of any external temperature > sensors. To achieve this, the IP core uses the PL SYSMONE4 primitive to > obtain the

Re: [PATCH v3 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-04 Thread Guenter Roeck
On Thu, Oct 03, 2019 at 06:34:17PM +, Tremblay, Eric wrote: > hwmon: Add driver for Texas Instruments TMP512/513 sensor chips. > > TI's TMP512/513 are I2C/SMBus system monitor chips. These chips > monitor the supply voltage, supply current, power consumption > and provide one local and up to

Re: [PATCH 09/10] hwmon: (lm70) Avoid undefined reference to match table

2019-10-04 Thread Guenter Roeck
of_match_ptr() here so that this doesn't break when that > change is made to the of_match_device() API. > > Cc: Arnd Bergmann > Cc: Geert Uytterhoeven > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: Rob Herring > Cc: Frank Rowand > Cc: > Signed-off-by: Stephen Boyd A

Re: [PATCH v3 2/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-04 Thread Guenter Roeck
On Thu, Oct 03, 2019 at 06:34:41PM +, Tremblay, Eric wrote: > hwmon: Add DT bindings for TMP513 driver > $subject is misleading. > Signed-off-by: Eric Tremblay > --- > .../devicetree/bindings/hwmon/tmp513.txt | 33 +++ > 1 file changed, 33 insertions(+) > create mode

Re: [PATCH v3 0/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-03 Thread Guenter Roeck
On Thu, Oct 03, 2019 at 06:35:51PM +, Tremblay, Eric wrote: > > Version three of the driver for Texas Instruments TMP512/513 sensors. > > > > Thanks again for the review, I think we are getting close. I'm not in an > > easy position for now to test the driver without device tree. I > > can

Re: [PATCH] hwmon: applesmc: switch to using input device polling mode

2019-10-02 Thread Guenter Roeck
On Wed, Oct 02, 2019 at 02:43:45PM -0700, Dmitry Torokhov wrote: > Now that instances of input_dev support polling mode natively, > we no longer need to create input_polled_dev instance. > > Signed-off-by: Dmitry Torokhov Applied to hwmon-next. I don't know what 0-day is complaining about; the

Re: [PATCH v2] hwmon: (applesmc) fix UB and udelay overflow

2019-10-02 Thread Guenter Roeck
On 10/2/19 2:43 PM, Nick Desaulniers wrote: On Mon, Sep 30, 2019 at 5:01 PM Guenter Roeck wrote: Again, I fail to understand why waiting for a multiple of 20 seconds under any circumstances would make any sense. Maybe the idea was to divide us by 1000 before entering the second loop ? Yes

Re: [PATCH v2 2/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-01 Thread Guenter Roeck
On Tue, Oct 01, 2019 at 09:36:30PM +, Tremblay, Eric wrote: > > On Tue, Oct 01, 2019 at 05:50:32PM +, Tremblay, Eric wrote: > > > hwmon: Add DT bindings for TMP513 driver > > > > > > Signed-off-by: Eric Tremblay > > > --- > > > .../devicetree/bindings/hwmon/tmp513.txt | 33

Re: [PATCH v2 2/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-01 Thread Guenter Roeck
On Tue, Oct 01, 2019 at 05:50:32PM +, Tremblay, Eric wrote: > hwmon: Add DT bindings for TMP513 driver > > Signed-off-by: Eric Tremblay > --- > .../devicetree/bindings/hwmon/tmp513.txt | 33 +++ > 1 file changed, 33 insertions(+) > create mode 100644

Re: [PATCH v2 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-10-01 Thread Guenter Roeck
On Tue, Oct 01, 2019 at 05:49:52PM +, Tremblay, Eric wrote: > hwmon: Add driver for Texas Instruments TMP512/513 sensor > > TI's TMP512/513 are I2C/SMBus system monitor chips. These chips > monitor the supply voltage, supply current, power consumption > and provide one local and up to three

Re: [PATCH v2] hwmon: (applesmc) fix UB and udelay overflow

2019-09-30 Thread Guenter Roeck
On 9/24/19 10:47 AM, Nick Desaulniers wrote: Fixes the following 2 issues in the driver: 1. Left shifting a signed integer is undefined behavior. Unsigned integral types should be used for bitwise operations. 2. The delay scales from 0x0010 to 0x2 by powers of 2, but udelay will

Re: [PATCH] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips

2019-09-30 Thread Guenter Roeck
On Mon, Sep 23, 2019 at 07:29:48PM +, Tremblay, Eric wrote: > Add driver for Texas Instruments TMP512/513 sensor chips. > > TI's TMP512/513 are I2C/SMBus system monitor chips. These chips > monitor the supply voltage, supply current, power consumption and > provide one local and up to three

Re: [v3,1/1] hwmon: (nct7904) Fix the incorrect value of vsen_mask in nct7904_data struct.

2019-09-18 Thread Guenter Roeck
On Wed, Sep 18, 2019 at 04:48:00PM +0800, amy.s...@advantech.com.tw wrote: > From: "amy.shih" > > Voltage sensors overlap with external temperature sensors. Detect > the multi-function of voltage, thermal diode and thermistor from > register VT_ADC_MD_REG to set value of vsen_mask in

Re: [PATCH] hwmon: (aspeed-pwm-tacho) Use devm_platform_ioremap_resource() in aspeed_pwm_tacho_probe()

2019-09-18 Thread Guenter Roeck
On Wed, Sep 18, 2019 at 10:20:09AM +0200, Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 18 Sep 2019 10:12:31 +0200 > > Simplify this function implementation by using a known wrapper function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus

Re: [v2,1/1] hwmon: (nct7904) Fix the incorrect value of vsen_mask in nct7904_data struct.

2019-09-17 Thread Guenter Roeck
On Mon, Sep 16, 2019 at 11:41:11AM +0800, amy.s...@advantech.com.tw wrote: > From: "amy.shih" > > Voltage sensors overlap with external temperature sensors. Detect > the multi-function of voltage, thermal diode and thermistor from > register VT_ADC_MD_REG to set value of vsen_mask in

Re: [v1,1/1] hwmon: (nct7904) Fix the incorrect value of vsen_mask in nct7904_data struct.

2019-09-15 Thread Guenter Roeck
On 9/15/19 7:18 PM, amy.s...@advantech.com.tw wrote: From: "amy.shih" Voltage sensors overlap with external temperature sensors. Detect the multi-function of voltage, thermal diode and thermistor from register VT_ADC_MD_REG to set value of vsen_mask in nct7904_data struct. Signed-off-by:

[GIT PULL] hwmon updates for v5.4

2019-09-15 Thread Guenter Roeck
hwmon_device_register_with_groups() Guenter Roeck (8): hwmon: (lm75) Fix write operations for negative temperatures hwmon: Remove ads1015 driver hwmon: (lm75) Support configuring the sample time for various chips hwmon: (lm75) Move updating the sample interval to its own function hwmon: (lm75

[PATCH] hwmon: submitting-patches: Add note on comment style

2019-09-13 Thread Guenter Roeck
Ask for standard multi-line comments, and ask for consistent comment style. Signed-off-by: Guenter Roeck --- Documentation/hwmon/submitting-patches.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/hwmon/submitting-patches.rst b/Documentation/hwmon/submitting

[PATCH] hwmon: submitting-patches: Point to with_info API

2019-09-13 Thread Guenter Roeck
New driver should use devm_hwmon_device_register_with_info() or hwmon_device_register_with_info() to register with the hwmon subsystem. Signed-off-by: Guenter Roeck --- Documentation/hwmon/submitting-patches.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: ABI for these two registers?

2019-09-12 Thread Guenter Roeck
On Thu, Sep 12, 2019 at 02:09:58PM -0700, Nicolin Chen wrote: > Hello Guenter, > > On Thu, Sep 12, 2019 at 11:32:18AM -0700, Guenter Roeck wrote: > > On Wed, Sep 11, 2019 at 05:28:14PM -0700, Nicolin Chen wrote: > > > Hello Guenter, > > > > > > Datasheet

Re: [v1,1/1] hwmon: (nct7904) Fix incorrect SMI status register setting of LTD temperature and fan.

2019-09-12 Thread Guenter Roeck
On Thu, Sep 12, 2019 at 11:33:00AM +, amy.s...@advantech.com.tw wrote: > From: "amy.shih" > > According to datasheet, the SMI status register setting of LTD > temperature is SMI_STS3, and the SMI status register setting > of fan is SMI_STS5 and SMI_STS6. > > Signed-off-by: amy.shih

Re: ABI for these two registers?

2019-09-12 Thread Guenter Roeck
On Wed, Sep 11, 2019 at 05:28:14PM -0700, Nicolin Chen wrote: > Hello Guenter, > > Datasheet: http://www.ti.com/lit/ds/symlink/ina3221.pdf > (At page 32, chapter 8.6.2.14 and 8.6.2.15) > > I have two registers that I need to expose to user space: > Shunt-Voltage-Sum and Shunt-Voltage-Limit

Re: [PATCH v6 1/3] Documentation: fpga: dfl: add descriptions for thermal/power management interfaces

2019-09-10 Thread Guenter Roeck
d-off-by: Wu Hao Acked-by: Guenter Roeck > --- > Documentation/fpga/dfl.rst | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/fpga/dfl.rst b/Documentation/fpga/dfl.rst > index 6fa483f..094fc8a 100644 > --- a/Documentation/fpga/dfl.rst > +++

Re: [PATCH 2/2] hwmon: (shtc1) fix shtc1 and shtw1 id mask

2019-09-10 Thread Guenter Roeck
On Thu, Sep 05, 2019 at 01:45:54AM +, Dan Robertson wrote: > Fix an error in the bitmaskfor the shtc1 and shtw1 bitmask used to > retrieve the chip ID from the ID register. See section 5.7 of the shtw1 > or shtc1 datasheet for details. > > Fixes: 1a539d372edd9832444e7a3daa710c444c014dc9

Re: [PATCH 1/2] hwmon: (shtc1) add support for the SHTC3 sensor

2019-09-10 Thread Guenter Roeck
On Thu, Sep 05, 2019 at 01:45:53AM +, Dan Robertson wrote: > Add support for the Sensirion SHTC3 humidity and temperature sensor to > the shtc1 module. > > Signed-off-by: Dan Robertson Applied to hwmon-next after making nitpick change (see below). > --- > Documentation/hwmon/shtc1.rst |

Re: [PATCH] Add PCI device IDs for family 17h, model 70h

2019-09-06 Thread Guenter Roeck
On Fri, Sep 06, 2019 at 03:09:16PM +0200, Boris Petkov wrote: > On September 6, 2019 3:02:06 PM GMT+02:00, Guenter Roeck > wrote: > >Also, how is this patch different to the patches already in linux-next > >? > > Which are those? Care to share their linux

Re: [PATCH] Add PCI device IDs for family 17h, model 70h

2019-09-06 Thread Guenter Roeck
On Fri, Sep 06, 2019 at 11:12:50AM +0200, Borislav Petkov wrote: > On Fri, Sep 06, 2019 at 01:56:56AM +, Isaac Vaughn wrote: > > Add the new Family 17h Model 70h PCI IDs (device 18h functions 0,3,4,6) > > to the kernel, the hwmon module, and the AMD64 EDAC module. > > > > Signed-off-by: Isaac

Re: [PATCH 1/1] hwmon: (lm75) Aproximate sample times to data-sheet values

2019-09-04 Thread Guenter Roeck
On Wed, Sep 04, 2019 at 12:56:21PM +0100, Iker Perez wrote: > From: Iker Perez del Palomar Sustatxa > > Current sample time values are over estimated, this patches applies > values closer to the ones defined in the data-sheets. > > Signed-off-by: Iker Perez del Palomar Sustatxa Merged with my

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

2019-09-03 Thread Guenter Roeck
On Tue, Sep 03, 2019 at 08:12:56PM +0200, Wolfram Sang wrote: > And simplify the error handling. > > Signed-off-by: Wolfram Sang Applied to hwmon-next. Thanks, Guenter > --- > drivers/hwmon/w83793.c | 30 -- > 1 file changed, 8 insertions(+), 22 deletions(-) > >

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

2019-09-03 Thread Guenter Roeck
On Tue, Sep 03, 2019 at 08:12:55PM +0200, Wolfram Sang wrote: > And simplify the error handling. > > Signed-off-by: Wolfram Sang Applied to hwmon-next. Thanks, Guenter > --- > drivers/hwmon/w83792d.c | 32 +--- > 1 file changed, 9 insertions(+), 23 deletions(-) >

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

2019-09-03 Thread Guenter Roeck
On Tue, Sep 03, 2019 at 08:12:54PM +0200, Wolfram Sang wrote: > And simplify the error handling. > > Signed-off-by: Wolfram Sang Applied to hwmon-next. Thanks, Guenter > --- > drivers/hwmon/w83791d.c | 32 +--- > 1 file changed, 9 insertions(+), 23 deletions(-) >

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

2019-09-03 Thread Guenter Roeck
On Tue, Sep 03, 2019 at 08:12:53PM +0200, Wolfram Sang wrote: > 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 >

Re: [PATCH] hwmon: fix devm_platform_ioremap_resource.cocci warnings

2019-09-03 Thread Guenter Roeck
On Tue, Sep 03, 2019 at 06:47:52AM +0200, Julia Lawall wrote: > From: kbuild test robot > > Use devm_platform_ioremap_resource helper which wraps > platform_get_resource() and devm_ioremap_resource() together. > > Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci > >

[PATCH 4/4] hwmon: (lm75) Add support for writing sampling period on PCT2075

2019-09-03 Thread Guenter Roeck
For PCT7027, the sampling period is configured using a dedicated register. Signed-off-by: Guenter Roeck --- drivers/hwmon/lm75.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index ce0f6c671b8f..d45e5cc4adf5

[PATCH 1/4] hwmon: (lm75) Support configuring the sample time for various chips

2019-09-03 Thread Guenter Roeck
and sample_clr_mask configuration parameters with a single array and with a constant. Signed-off-by: Guenter Roeck --- drivers/hwmon/lm75.c | 83 +++- 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon

[PATCH 3/4] hwmon: (lm75) Add support for writing conversion time for TMP112

2019-09-03 Thread Guenter Roeck
TMP112 uses an uncommon method to write the conversion time: its configuration register is 16 bit wide, and the conversion time is configured in its second byte. Signed-off-by: Guenter Roeck --- drivers/hwmon/lm75.c | 35 ++- 1 file changed, 26 insertions(+), 9

Re: [PATCH v2 2/2] hwmon: (as370-hwmon) Add DT bindings for Synaptics AS370 PVT

2019-09-02 Thread Guenter Roeck
On Tue, Aug 27, 2019 at 03:44:57AM +, Jisheng Zhang wrote: > Add device tree bindings for Synaptics AS370 PVT sensors. > > Signed-off-by: Jisheng Zhang > Reviewed-by: Guenter Roeck > Reviewed-by: Rob Herring Applied to hwmon-next. Thanks, Guenter > --- > Doc

Re: [PATCH v2 1/2] hwmon: Add Synaptics AS370 PVT sensor driver

2019-09-02 Thread Guenter Roeck
On Tue, Aug 27, 2019 at 03:44:15AM +, Jisheng Zhang wrote: > Add a new driver for Synaptics AS370 PVT sensors. Currently, only > temperature is supported. > > Signed-off-by: Jisheng Zhang > Reviewed-by: Guenter Roeck Applied to hwmon-next. Thanks, Guenter > --- >

Re: [PATCH v2 3/3] pmbus: ibm-cffps: Add support for version 2 of the PSU

2019-08-31 Thread Guenter Roeck
On Fri, Aug 30, 2019 at 02:11:03PM -0500, Eddie James wrote: > Version 2 of the PSU supports a second page of data and changes the > format of the FW version. Use the devicetree binding to differentiate > between the version the driver should use. > > Signed-off-by: Eddie James Applied to

Re: [PATCH v2 1/3] dt-bindings: hwmon: Document ibm,cffps2 compatible string

2019-08-31 Thread Guenter Roeck
On Fri, Aug 30, 2019 at 02:11:01PM -0500, Eddie James wrote: > Document the compatible string for version 2 of the IBM CFFPS PSU. > > Signed-off-by: Eddie James Applied to hwmon-next. Note that we'll still need review from a DT maintainer. I don't see any problems, but then who knows. Thanks,

Re: [PATCH v2 1/2] hwmon: Add Synaptics AS370 PVT sensor driver

2019-08-31 Thread Guenter Roeck
On Tue, Aug 27, 2019 at 03:44:15AM +, Jisheng Zhang wrote: > Add a new driver for Synaptics AS370 PVT sensors. Currently, only > temperature is supported. > > Signed-off-by: Jisheng Zhang For my reference: Reviewed-by: Guenter Roeck (pending dt maintainer dreview for

Re: [PATCH v2 2/2] hwmon: (as370-hwmon) Add DT bindings for Synaptics AS370 PVT

2019-08-31 Thread Guenter Roeck
On Tue, Aug 27, 2019 at 03:44:57AM +, Jisheng Zhang wrote: > Add device tree bindings for Synaptics AS370 PVT sensors. > > Signed-off-by: Jisheng Zhang For my reference: Reviewed-by: Guenter Roeck ... but we'll have to wait for DT maintainer review. > --- > Documenta

Re: [PATCH v1] hwmon: (iio_hwmon) Enable power exporting from IIO

2019-08-31 Thread Guenter Roeck
On Thu, Aug 22, 2019 at 04:22:24PM +0200, Michal Simek wrote: > There is no reason why power channel shouldn't be exported as is done for > voltage, current, temperature and humidity. > > Power channel is available on iio ina226 driver. > > Sysfs IIO documentation for power attribute added by

Re: [PATCH 3/3] pmbus: ibm-cffps: Add support for version 2 of the PSU

2019-08-30 Thread Guenter Roeck
On Fri, Aug 30, 2019 at 11:09:45AM -0500, Eddie James wrote: > Version 2 of the PSU supports a second page of data and changes the > format of the FW version. Use the devicetree binding to differentiate > between the version the driver should use. > > Signed-off-by: Eddie James > --- >

Re: [PATCH 1/2] driver core: platform: Introduce platform_get_irq_optional()

2019-08-28 Thread Guenter Roeck
On Wed, Aug 28, 2019 at 10:57:24AM +0200, Greg Kroah-Hartman wrote: > On Wed, Aug 28, 2019 at 10:34:10AM +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > In some cases the interrupt line of a device is optional. Introduce a > > new platform_get_irq_optional() that works much like

Re: [PATCH 2/2] hwmon: pwm-fan: Use platform_get_irq_optional()

2019-08-28 Thread Guenter Roeck
On Wed, Aug 28, 2019 at 10:34:11AM +0200, Thierry Reding wrote: > From: Thierry Reding > > The PWM fan interrupt is optional, so we don't want an error message in > the kernel log if it wasn't specified. > > Signed-off-by: Thierry Reding Acked-by: Guenter Roeck I assume t

Re: [PATCH 1/2] hwmon: Add Synaptics AS370 PVT sensor driver

2019-08-26 Thread Guenter Roeck
On 8/26/19 8:02 PM, Jisheng Zhang wrote: Hi Guenter, On Mon, 26 Aug 2019 06:44:34 -0700 Guenter Roeck wrote: On 8/26/19 3:01 AM, Jisheng Zhang wrote: Add a new driver for Synaptics AS370 PVT sensors. Currently, only temperature is supported. Signed-off-by: Jisheng Zhang --- drivers

Re: [PATCH 1/2] hwmon: Add Synaptics AS370 PVT sensor driver

2019-08-26 Thread Guenter Roeck
On 8/26/19 3:01 AM, Jisheng Zhang wrote: Add a new driver for Synaptics AS370 PVT sensors. Currently, only temperature is supported. Signed-off-by: Jisheng Zhang --- drivers/hwmon/Kconfig | 10 +++ drivers/hwmon/Makefile | 1 + drivers/hwmon/as370-hwmon.c | 158

Re: [RFC PATCH] hwmon: (iio_hwmon) Enable power exporting from IIO

2019-08-22 Thread Guenter Roeck
On Thu, Aug 22, 2019 at 03:43:39PM +0200, Michal Simek wrote: > On 20. 08. 19 17:39, Guenter Roeck wrote: > > On 8/12/19 6:29 AM, Michal Simek wrote: > >> There is no reason why power channel shouldn't be exported as is done for > >> voltage, current, temperature an

Re: [RFC PATCH] hwmon: (iio_hwmon) Enable power exporting from IIO

2019-08-20 Thread Guenter Roeck
On 8/12/19 6:29 AM, Michal Simek wrote: There is no reason why power channel shouldn't be exported as is done for voltage, current, temperature and humidity. Power channel is available on iio ina226 driver. Tested on Xilinx ZCU102 board. Signed-off-by: Michal Simek --- But I don't think

Re: [PATCH v5 2/3] hwmon/ltc2990: Generalise DT to fwnode support

2019-08-20 Thread Guenter Roeck
On Mon, Aug 19, 2019 at 02:16:17PM +0200, Max Staudt wrote: > ltc2990 will now use device_property_read_u32_array() instead of > of_property_read_u32_array() - allowing the use of software nodes > via fwnode_create_software_node(). > > This allows code using i2c_new_device() to specify a default

Re: [PATCH] hwmon/coretemp: Fix a memory leak bug

2019-08-20 Thread Guenter Roeck
On Mon, Aug 19, 2019 at 04:00:02PM -0500, Wenwen Wang wrote: > In coretemp_init(), 'zone_devices' is allocated through kcalloc(). However, > it is not deallocated in the following execution if > platform_driver_register() fails, leading to a memory leak. To fix this > issue, introduce the

Re: [PATCH] hwmon/ltc2990: Generalise DT to fwnode support

2019-08-16 Thread Guenter Roeck
On 8/16/19 5:43 AM, Max Staudt wrote: On 08/16/2019 02:36 PM, Geert Uytterhoeven wrote: Hi Max, On Fri, Aug 16, 2019 at 2:25 PM Max Staudt wrote: On 08/16/2019 01:07 PM, Geert Uytterhoeven wrote: One minor nit: as the driver no longer uses any of_*() symbols, you can replace #include by

Re: [PATCH v3 2/3] hwmon/ltc2990: Generalise DT to fwnode support

2019-08-15 Thread Guenter Roeck
On Fri, Aug 16, 2019 at 12:19:42AM +0200, Max Staudt wrote: > On 08/15/2019 02:58 PM, Max Staudt wrote: > > - if (of_node) { > > - ret = of_property_read_u32_array(of_node, "lltc,meas-mode", > > -data->mode, 2); > > + if (i2c->dev.of_node

Re: [PATCH v3 2/3] hwmon/ltc2990: Generalise DT to fwnode support

2019-08-15 Thread Guenter Roeck
On Thu, Aug 15, 2019 at 02:58:01PM +0200, Max Staudt wrote: > ltc2990 will now use device_property_read_u32_array() instead of > of_property_read_u32_array() - allowing the use of software nodes > via fwnode_create_software_node(). > > This allows code using i2c_new_device() to specify a default

Re: [PATCH 2/3] hwmon: raspberrypi: update MODULE_AUTHOR() email address

2019-08-14 Thread Guenter Roeck
On Tue, Aug 13, 2019 at 08:17:28PM +0200, Stefan Wahren wrote: > The email address listed in MODULE_AUTHOR() will be disabled in the > near future. Replace it with my private one. > > Signed-off-by: Stefan Wahren Applied to hwmon-next. Thanks, Guenter > --- >

Re: [PATCH v2 3/4] hwmon/ltc2990: Add platform_data support

2019-08-13 Thread Guenter Roeck
On 8/13/19 1:27 AM, Geert Uytterhoeven wrote: Hi Günter, On Tue, Aug 13, 2019 at 10:02 AM Guenter Roeck wrote: On Tue, Aug 13, 2019 at 01:52:36AM +0200, Max Staudt wrote: This allows code using i2c_new_device() to specify a measurement mode. Signed-off-by: Max Staudt Reviewed-by: Geert

Re: [PATCH v2 3/4] hwmon/ltc2990: Add platform_data support

2019-08-13 Thread Guenter Roeck
On 8/13/19 3:10 AM, Max Staudt wrote: On 08/13/2019 10:02 AM, Guenter Roeck wrote: On Tue, Aug 13, 2019 at 01:52:36AM +0200, Max Staudt wrote: This allows code using i2c_new_device() to specify a measurement mode. Signed-off-by: Max Staudt Reviewed-by: Geert Uytterhoeven --- drivers/hwmon

Re: [PATCH v2 3/4] hwmon/ltc2990: Add platform_data support

2019-08-13 Thread Guenter Roeck
On Tue, Aug 13, 2019 at 01:52:36AM +0200, Max Staudt wrote: > This allows code using i2c_new_device() to specify a measurement mode. > > Signed-off-by: Max Staudt > Reviewed-by: Geert Uytterhoeven > --- > drivers/hwmon/ltc2990.c | 9 + >

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

2019-08-08 Thread Guenter Roeck
large unsigned integers, which fails the range check. Fix by type casting the temperature to u16 when calling regmap_write(). Cc: Iker Perez del Palomar Sustatxa Fixes: e65365fed87f ("hwmon: (lm75) Convert to use regmap") Signed-off-by: Guenter Roeck --- drivers/hwmon/lm75.c | 2 +- 1 fi

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

2019-08-08 Thread Guenter Roeck
* Add support for configuring the devices via their sysfs nodes. > > The patch series was based on linux-next's master branch. > > Thank you Guenter Roeck, Michael Drake, Thomas Preston and Tom Eccles for > your time, help and feedback. > Series applied to hwmon-next. Thanks, Guenter

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

[GIT PULL] hwmon fixes for v5.3-rc4

2019-08-07 Thread Guenter Roeck
) Fixes to lm75 and nct7802 drivers In lm75 driver, fix TMP75B chip description to ensure correct initialization. In nct7802 driver, fix in4 presence detection. Guenter

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

2019-08-07 Thread Guenter Roeck
On Tue, Aug 06, 2019 at 10:11:04AM +0100, Iker Perez wrote: > 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. > *

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

2019-08-07 Thread Guenter Roeck
On Tue, Aug 06, 2019 at 10:11:06AM +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: [v5,1/1] hwmon: (nct7904) Add extra sysfs support for fan, voltage and temperature.

2019-08-06 Thread Guenter Roeck
On 8/6/19 6:38 PM, amy.s...@advantech.com.tw wrote: From: "amy.shih" NCT-7904D also supports reading of channel limitation registers and SMI status registers for fan, voltage and temperature monitoring, and also supports reading of temperature sensor type which is thermal diode, thermistor,

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

2019-08-06 Thread Guenter Roeck
On Tue, Aug 06, 2019 at 10:11:04AM +0100, Iker Perez wrote: > 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. > *

Re: [v4 1/2] hwmon: (nct7904) Fix the incorrect return value of case hwmon_fan_min in function "nct7904_write_fan".

2019-08-06 Thread Guenter Roeck
On Tue, Aug 06, 2019 at 02:30:07AM +, amy.s...@advantech.com.tw wrote: > From: "amy.shih" > > Return the -EINVAL(Invalid argument) when writing the values <= 0 > to sysfs node fan[1-*]_min. > > Signed-off-by: amy.shih > This again fixes a previous patch of the series. Please squash the

Re: [PATCH] hwmon: w83795: Fan control option isn't that dangerous

2019-08-06 Thread Guenter Roeck
On Tue, Aug 06, 2019 at 10:21:23AM +0200, Jean Delvare wrote: > I have been using SENSORS_W83795_FANCTRL for several years and never > had any problem. When the driver was added, I had not tested that > part of the driver yet so I wanted to be super cautious, but time has > shown that it works

Re: new device support doubts

2019-08-06 Thread Guenter Roeck
On Tue, Aug 06, 2019 at 07:38:32AM +, Sa, Nuno wrote: > Hi all, > > I'm currently developing a driver for a hwmon device and I have a couple of > questions that maybe someone > in the list can help me with. The device can be found in: >

Re: [PATCH] hwmon: (lm75) Fixup tmp75b clr_mask

2019-08-01 Thread Guenter Roeck
On Thu, Aug 01, 2019 at 08:53:24AM +0100, Iker Perez wrote: > From: Iker Perez del Palomar Sustatxa > > The configuration register of the tmp75b sensor is 16bit long, however > the first byte is reserved, so there is not no need to take care of it. > > Because the order of the bytes is little

Re: [PATCH v6 17/57] hwmon: Remove dev_err() usage after platform_get_irq()

2019-07-30 Thread Guenter Roeck
); > -... } > | > ... > -dev_err(...); > ) > ... > } > // > > While we're here, remove braces on if statements that only have one > statement (manually). > > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: linux-hwmon@vger.kernel.org > Cc: Greg Kroah-Ha

[PATCH] hwmon: (nct7802) Fix wrong detection if in4 presence

2019-07-26 Thread Guenter Roeck
and the "sensors" command displays in4_input. But as expected, we have no in4_min, in4_max, in4_alarm, in4_beep. Fix is_visible function to detect and report in4_input visibility as expected. Reported-by: Gilles Buloz Cc: Gilles Buloz Signed-off-by: Guenter Roeck --- drivers/hwmon/nct

[GIT PULL] hwmon fixes for v5.3-rc2

2019-07-25 Thread Guenter Roeck
Hi Linus, Please pull hwmon fixes for Linux v5.3-rc2 from signed tag: git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-for-v5.3-rc2 Thanks, Guenter -- The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b: Linus 5.3-rc1 (2019-07-21

Re: [PATCH] hwmon: w83793: Fix possible null-pointer dereferences in watchdog_open()

2019-07-25 Thread Guenter Roeck
On Thu, Jul 25, 2019 at 04:41:56PM +0800, Jia-Ju Bai wrote: > In watchdog_open(), data is initialized as NULL. > After the loop "list_for_each_entry" on lines 1302-1307, > data may not be assigned, thus data is still NULL. > > In this case, data is used on line 1310: > watchdog_is_open =

Re: [PATCH v2 1/1] drivers/hwmon/acpi_power_meter.c: Change log level

2019-07-24 Thread Guenter Roeck
On Wed, Jul 24, 2019 at 11:01:10AM +0300, Wang Shenran wrote: > At boot time, the acpi_power_meter driver logs the following error level > message: "Ignoring unsafe software power cap". Having read about it from > a few sources, it seems that the error message can be quite misleading. > > While

Re: [PATCH] hwmon: (nct6775) Integrated new model nct6116

2019-07-23 Thread Guenter Roeck
On Tue, Jul 23, 2019 at 06:06:46PM +0200, Björn Gerhart wrote: > Thanks for the review Guenter, I checked your proposals. Here comes an update > of the patch, and I hope this time the format fits as it should. > > Changes: > - simplified differences in register addresses > - although kept

Re: [PATCH 1/1] drivers/hwmon/acpi_power_meter.c: Change log level

2019-07-23 Thread Guenter Roeck
On 7/23/19 3:56 AM, Wang Shenran wrote: At boot time, the acpi_power_meter driver logs the following error level message: "Ignoring unsafe software power cap". Having read about it from a few sources, it seems that the error message can be quite misleading. While the message can imply that

Re: [PATCH] dt-bindings: hwmon: Add binding for pxe1610

2019-07-22 Thread Guenter Roeck
On 7/22/19 5:12 PM, Vijay Khemka wrote: On 7/22/19, 1:06 PM, "Guenter Roeck" wrote: On Mon, Jul 22, 2019 at 12:24:48PM -0700, Vijay Khemka wrote: > Added new DT binding document for Infineon PXE1610 devices. > > Signed-o

  1   2   3   4   5   6   7   8   9   10   >