[PATCH v4 0/6] pmbus: Expand fan support and add MAX31785 driver

2017-11-02 Thread Andrew Jeffery
Hello, This series introduces support for the MAX31785 intelligent fan controller, a PMBus device providing closed-loop fan control among a number of other features. Along the way the series adds support to control fans and create virtual pages to the PMBus core, the latter to support some of the

[PATCH v4 1/6] dt-bindings: pmbus: Add Maxim MAX31785 documentation

2017-11-02 Thread Andrew Jeffery
Signed-off-by: Andrew Jeffery --- .../devicetree/bindings/hwmon/max31785.txt | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/max31785.txt diff --git

[PATCH v4 6/6] pmbus: max31785: Add dual tachometer support

2017-11-02 Thread Andrew Jeffery
The dual tachometer feature is implemented in hardware with a TACHSEL input to indicate the rotor under measurement, and exposed on the device by extending the READ_FAN_SPEED_1 word with two extra bytes*. The need to read the non-standard four-byte response leads to a cut-down implementation of

[PATCH v4 4/6] pmbus: max31785: Add fan control

2017-11-02 Thread Andrew Jeffery
The implementation makes use of the new fan control virtual registers exposed by the pmbus core. It mixes use of the default implementations with some overrides via the read/write handlers to handle FAN_COMMAND_1 on the MAX31785, whose definition breaks the value range into various control bands

[PATCH v4 2/6] pmbus: Add driver for Maxim MAX31785 Intelligent Fan Controller

2017-11-02 Thread Andrew Jeffery
The Maxim MAX31785 is a PMBus device providing closed-loop, multi-channel fan management with temperature and remote voltage sensing. Various fan control features are provided, including PWM frequency control, temperature hysteresis, dual tachometer measurements, and fan health monitoring. This

[PATCH v4 5/6] pmbus: core: Add virtual page config bit

2017-11-02 Thread Andrew Jeffery
Some circumstances call for virtual pages to expose multiple values packed into an extended PMBus register in a manner non-compliant with the PMBus standard. We should not try to set virtual pages on the device; add a flag so we can avoid doing so. Signed-off-by: Andrew Jeffery

[PATCH v4 3/6] pmbus: core: Add fan control support

2017-11-02 Thread Andrew Jeffery
Expose fanX_target, pwmX and pwmX_enable hwmon sysfs attributes. Fans in a PMBus device are driven by the configuration of two registers: FAN_CONFIG_x_y and FAN_COMMAND_x: FAN_CONFIG_x_y dictates how the fan and the tacho operate (if installed), while FAN_COMMAND_x sets the desired fan rate. The

Re: [PATCH v2 2/3] hwmon: (aspeed-pwm-tacho) Deassert reset in probe

2017-11-02 Thread Joel Stanley
On Fri, Nov 3, 2017 at 1:54 AM, Guenter Roeck wrote: > On Thu, Nov 02, 2017 at 02:53:48PM +1100, Joel Stanley wrote: >> The ASPEED SoC must deassert a reset in order to use the PWM/tach >> peripheral. >> > Again, you claim that the current driver would not work at all, which >

Re: [PATCH] pmbus: added possibility to change timeout for device update

2017-11-02 Thread Guenter Roeck
On Thu, Nov 02, 2017 at 05:17:21PM +0100, Romain Porte wrote: > On 02/11/2017 14:58, Guenter Roeck wrote: > >NACK, I'd rather drop the caching entirely, and possibly convert the > >driver to > >regmap for caching non-volatile registers. > I need to familiarize myself with regmap then, it looks

Re: [PATCH v2 2/3] hwmon: (aspeed-pwm-tacho) Deassert reset in probe

2017-11-02 Thread Guenter Roeck
On Thu, Nov 02, 2017 at 02:53:48PM +1100, Joel Stanley wrote: > The ASPEED SoC must deassert a reset in order to use the PWM/tach > peripheral. > Again, you claim that the current driver would not work at all, which is simply not correct. It doesn't work if the chip wasn't taken out of reset by

Re: [PATCH 1/2] drivers: hwmon: Add W83773G driver

2017-11-02 Thread Guenter Roeck
On 11/01/2017 11:33 PM, Lei YU wrote: Nuvoton W83773G is a hardware monitor IC providing one local temperature and two remote temperature sensors. This chip is pretty close to LM90. Have you explored adding support for it to the LM90 driver ? Signed-off-by: Lei YU ---

Re: [PATCH] pmbus: added possibility to change timeout for device update

2017-11-02 Thread Guenter Roeck
On 11/02/2017 04:31 AM, Romain Porte wrote: By default the time before really updating a device is hardcoded to one second in the pmbus_core.c file (HZ). This patch proposes a new configuration entry that allows to tune the timeout value before updating a device. It defaults to one second in

Re: [PATCH v1 09/15] hwmon: (w83781d) Remove duplicate NULL check

2017-11-02 Thread Andy Shevchenko
On Thu, 2017-11-02 at 00:07 +0100, Wolfram Sang wrote: > > > I'll keep the hwmon patches from this series on hold until the > > > changes > > > to i2c_unregister_device make it into the tree. Ok with me if the > > > patches > > > are merged through some other tree. > > > > Wolfram, what do you

[PATCH] pmbus: added possibility to change timeout for device update

2017-11-02 Thread Romain Porte
By default the time before really updating a device is hardcoded to one second in the pmbus_core.c file (HZ). This patch proposes a new configuration entry that allows to tune the timeout value before updating a device. It defaults to one second in order to stay compatible with the previous

[PATCH 2/2] hwmon: (w83773g) Add documentation

2017-11-02 Thread Lei YU
Add documentation for the w83773g driver. Signed-off-by: Lei YU --- Documentation/hwmon/w83773g | 28 1 file changed, 28 insertions(+) create mode 100644 Documentation/hwmon/w83773g diff --git a/Documentation/hwmon/w83773g

[PATCH 0/2] Add W83773G hwmon sensor driver and doc

2017-11-02 Thread Lei YU
Nuvoton W83773G is a hardware monitoring chip, which integrates two remote and one local temperature sensors. Lei YU (2): drivers: hwmon: Add W83773G driver hwmon: (w83773g) Add documentation Documentation/hwmon/w83773g | 28 + drivers/hwmon/Kconfig | 11 ++

[PATCH 1/2] drivers: hwmon: Add W83773G driver

2017-11-02 Thread Lei YU
Nuvoton W83773G is a hardware monitor IC providing one local temperature and two remote temperature sensors. Signed-off-by: Lei YU --- drivers/hwmon/Kconfig | 11 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/w83773g.c | 276