[PATCH 2/2] hwmon: (ina3221) Add operating mode support

2018-10-09 Thread Nicolin Chen
The hwmon core now has a new optional mode interface. So this patch just implements this mode support so that user space can check and configure via sysfs node its operating modes: power-down, one-shot, and continuous modes. Signed-off-by: Nicolin Chen --- drivers/hwmon/ina3221.c | 64

[PATCH 1/2] hwmon: (core) Add hwmon_mode structure and mode sysfs node

2018-10-09 Thread Nicolin Chen
There are a few hwmon sensors support different operating modes, for example, one-shot and continuous modes. So it's probably not a bad idea to abstract a mode sysfs node as a common feature in the hwmon core. Right beside the hwmon device name, this patch adds a new sysfs attribute named "mode"

[PATCH 0/2] hwmon: Add operating mode support for core and ina3221

2018-10-09 Thread Nicolin Chen
Add operating mode support in the core and ina3221. Nicolin Chen (2): hwmon: (core) Add hwmon_mode structure and mode sysfs node hwmon: (ina3221) Add operating mode support Documentation/hwmon/sysfs-interface | 15 + drivers/hwmon/hwmon.c | 87 ++---

Re: [PATCH] hwmon: (npcm-750-pwm-fan): Change initial pwm target to 255

2018-10-09 Thread Kun Yi
Great, thanks! On Tue, Oct 9, 2018 at 5:38 PM Guenter Roeck wrote: > > On Mon, Oct 08, 2018 at 02:49:25PM -0700, Kun Yi wrote: > > Change initial PWM target to 255 to prevent overheating, for example > > when BMC hangs in userspace or when userspace fan control application is > > not implemented

Re: [PATCH v2] hwmon: (ina3221) Use _info API to register hwmon device

2018-10-09 Thread Guenter Roeck
On Mon, Oct 08, 2018 at 01:14:24PM -0700, Nicolin Chen wrote: > The hwmon core has a newer API which abstracts most of common > things in the core so as to simplify the hwmon device drivers. > > This patch implements this _info API to ina3221 hwmon driver. > > It also reduces the binary size: >

Re: [PATCH] hwmon: (npcm-750-pwm-fan): Change initial pwm target to 255

2018-10-09 Thread Guenter Roeck
On Mon, Oct 08, 2018 at 02:49:25PM -0700, Kun Yi wrote: > Change initial PWM target to 255 to prevent overheating, for example > when BMC hangs in userspace or when userspace fan control application is > not implemented yet. > > Signed-off-by: Kun Yi Makes sense to me, and in line with other

Re: [PATCH v2] hwmon: (ina3221) Validate shunt resistor value from DT

2018-10-09 Thread Guenter Roeck
On Mon, Oct 08, 2018 at 02:24:51PM -0700, Nicolin Chen wrote: > The input->shunt_resistor is int type while the value from DT is > unsigned int. Meanwhile, a divide-by-zero error would happen if > the value is 0. So this patch just simply validates the value. > > Signed-off-by: Nicolin Chen

Re: [PATCH] hwmon: (tmp421) make const array 'names' static

2018-10-09 Thread Guenter Roeck
On Tue, Oct 09, 2018 at 01:11:57PM +0100, Colin King wrote: > From: Colin Ian King > > The const array 'names' can be made static, saves populating it on > the stack and will make it read-only. > > Signed-off-by: Colin Ian King Applied to hwmon-next. Thanks, Guenter > --- >

[PATCH v2] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Nicolin Chen
Trace events are useful for people who collect data from the Ftrace outputs. There're people who analyse the relationship of cpufreq, thermal and hwmon (power/voltage/current) using the convenient and timestamped Ftrace outputs, while unlike cpufreq and thermal subsystems the hwmon does not have

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Guenter Roeck
On Tue, Oct 09, 2018 at 04:42:42PM -0400, Steven Rostedt wrote: > On Tue, 9 Oct 2018 13:39:37 -0700 > Guenter Roeck wrote: > > > > Personally a checkpatch warning bugs me more than having an extra > > > line :) > > > > > Same here. If we no longer believe in the 80-column limit, we should

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Steven Rostedt
On Tue, 9 Oct 2018 13:39:37 -0700 Guenter Roeck wrote: > > Personally a checkpatch warning bugs me more than having an extra > > line :) > > > Same here. If we no longer believe in the 80-column limit, we should remove > it, > not use it to hide other problems in the noise. Note, this is

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Steven Rostedt
On Tue, 9 Oct 2018 13:39:37 -0700 Guenter Roeck wrote: > > Personally a checkpatch warning bugs me more than having an extra > > line :) > > > Same here. If we no longer believe in the 80-column limit, we should remove > it, > not use it to hide other problems in the noise. Yes, please, can

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Guenter Roeck
On Tue, Oct 09, 2018 at 12:57:43PM -0700, Nicolin Chen wrote: > On Tue, Oct 09, 2018 at 03:49:45PM -0400, Steven Rostedt wrote: > > > > > Trace events are useful for people who collect data from the > > > > > ftrace output. This patch adds initial trace events for the > > > > > hwmon core. To call

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Nicolin Chen
On Tue, Oct 09, 2018 at 03:49:45PM -0400, Steven Rostedt wrote: > > > > Trace events are useful for people who collect data from the > > > > ftrace output. This patch adds initial trace events for the > > > > hwmon core. To call hwmon_attr_base() for aligned attr index > > > > numbers, this patch

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Steven Rostedt
On Tue, 9 Oct 2018 12:11:11 -0700 Nicolin Chen wrote: > On Tue, Oct 09, 2018 at 02:57:21PM -0400, Steven Rostedt wrote: > > > > Trace events are useful for people who collect data from the > > > ftrace output. This patch adds initial trace events for the > > > hwmon core. To call

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Nicolin Chen
On Tue, Oct 09, 2018 at 02:57:21PM -0400, Steven Rostedt wrote: > > Trace events are useful for people who collect data from the > > ftrace output. This patch adds initial trace events for the > > hwmon core. To call hwmon_attr_base() for aligned attr index > > numbers, this patch also moves the

Re: [PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Steven Rostedt
On Tue, 9 Oct 2018 11:26:02 -0700 Nicolin Chen wrote: > Trace events are useful for people who collect data from the > ftrace output. This patch adds initial trace events for the > hwmon core. To call hwmon_attr_base() for aligned attr index > numbers, this patch also moves the function upward.

[PATCH] hwmon: (core) Add trace events to _attr_show/store functions

2018-10-09 Thread Nicolin Chen
Trace events are useful for people who collect data from the ftrace output. This patch adds initial trace events for the hwmon core. To call hwmon_attr_base() for aligned attr index numbers, this patch also moves the function upward. Ftrace outputs: ...: hwmon_attr_show_string: index=2,

[PATCH] hwmon: (tmp421) make const array 'names' static

2018-10-09 Thread Colin King
From: Colin Ian King The const array 'names' can be made static, saves populating it on the stack and will make it read-only. Signed-off-by: Colin Ian King --- drivers/hwmon/tmp421.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/tmp421.c

[hwmon:watchdog-next 23/28] ERROR: "__udivdi3" [drivers/watchdog/armada_37xx_wdt.ko] undefined!

2018-10-09 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git watchdog-next head: 8de959ed4898d8f270fd990cbc551619799100ef commit: 6f935e7eff6f4fd9da9d54f46901b19ffc15df27 [23/28] watchdog: Add support for Armada 37xx CPU watchdog config: i386-allmodconfig (attached as