[PATCH v2 1/2] hwmon: Add MAX31760 fan controller driver.

2017-04-11 Thread John Muir
Add a driver for the Maxim Integrated MAX31760 Precision Fan Speed Controller. v2: - Fixup open firmware code. - Add a few comments. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/hwmon/max31760 | 41 ++ drivers/hwmon/Kconfig| 10 + drivers/hwmon/Makefile

[PATCH v2 2/2] devicetree: Document the max31760 device binding.

2017-04-11 Thread John Muir
v2: - Fixup based on comments. Signed-off-by: John Muir <j...@jmuir.com> --- .../devicetree/bindings/hwmon/max31760.txt | 72 ++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/max31760.txt diff --git a/Documen

[PATCH 2/2] devicetree: Document the max31760 device binding.

2017-04-04 Thread John Muir
Signed-off-by: John Muir <j...@jmuir.com> --- .../devicetree/bindings/hwmon/max31760.txt | 58 ++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/max31760.txt diff --git a/Documentation/devicetree/bindings/hwmon/ma

[PATCH 1/2] hwmon: Add MAX31760 fan controller driver.

2017-04-04 Thread John Muir
Add a driver for the Maxim Integrated MAX31760 Precision Fan Speed Controller. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/hwmon/max31760 | 41 ++ drivers/hwmon/Kconfig| 10 + drivers/hwmon/Makefile |1 + drivers/hwmon/max31760.c

[PATCH 0/2] Add Maxim Integrated MAX31760 fan controller driver.

2017-04-04 Thread John Muir
Add a device driver for the MAX31760 I2C device with a hwmon interface and a few open firmware device properties. John Muir (2): hwmon: Add MAX31760 fan controller driver. devicetree: Document the max31760 device binding. .../devicetree/bindings/hwmon/max31760.txt | 58

[PATCH v3 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-12-01 Thread John Muir
Simple hwmon binding documentation. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/devicetree/bindings/hwmon/tmp108.txt | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt diff --git a/Documentation/devi

[PATCH v3 1/2] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-12-01 Thread John Muir
Add support for the TI TMP108 temperature sensor with some device configuration parameters. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/hwmon/tmp108 | 36 drivers/hwmon/Kconfig | 11 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/tmp108.c

[PATCH v3 0/2] Texas Instruments TMP108 temperature sensor driver.

2016-12-01 Thread John Muir
in a future patch. John Muir (2): hwmon: Add Texas Instruments TMP108 temperature sensor driver. devicetree: hwmon: Add documentation for TMP108 driver. Documentation/devicetree/bindings/hwmon/tmp108.txt | 14 + Documentation/hwmon/tmp108 | 36 ++ drivers/hwmon/Kconfig

Re: [PATCH 1/2] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-12-01 Thread John Muir
Hi Guenter, On Dec 1, 2016, at 2:08 PM, Guenter Roeck wrote: > >> >> Should we be concerned about restoring the configuration here? >> > Interesting question. If the chip was really powered off, you would > have to restore the entire configuration, not just the

Re: [PATCH 1/2] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-12-01 Thread John Muir
Hi Guenter, On Dec 1, 2016, at 7:19 AM, Guenter Roeck wrote: > >> +/* convert 12-bit TMP108 register value to milliCelsius */ >> +static inline int tmp108_temp_reg_to_mC(s16 val) >> +{ >> +return (val & ~0x01) * 1000 / 256; > > Why ~0x01 and not ~0x0f ? The lower 4 bits

Re: [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread John Muir
Hi Guenter, On Nov 30, 2016, at 4:42 PM, Guenter Roeck wrote: > >> +Optional node properties: >> +- ti,thermostat-mode-comparator : (boolean) select the comparator mode for >> the >> + thermostat rather than the default interrupt-mode. >> + > I keep arguing with myself

[PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread John Muir
Simple hwmon binding documentation. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/devicetree/bindings/hwmon/tmp108.txt | 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt diff --git a/Documen

[PATCH 1/2] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-30 Thread John Muir
Add support for the TI TMP108 temperature sensor with some device configuration parameters. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/hwmon/tmp108 | 38 drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/tmp108.c

[PATCH v2 0/2] Texas Instruments TMP108 temperature sensor driver.

2016-11-30 Thread John Muir
in a future patch. John Muir (2): hwmon: Add Texas Instruments TMP108 temperature sensor driver. devicetree: hwmon: Add documentation for TMP108 driver. Documentation/devicetree/bindings/hwmon/tmp108.txt | 24 + Documentation/hwmon/tmp108 | 38 ++ drivers/hwmon/Kconfig

Re: [PATCH 1/3] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-28 Thread John Muir
On Nov 28, 2016, at 2:19 PM, Guenter Roeck wrote: > > The tmp102 driver adds the timeout if the device was in shutdown mode (SD=1). > > if (tmp102->config_orig & TMP102_CONF_SD) { > ... > tmp102->ready_time +=

Re: [PATCH 1/3] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-28 Thread John Muir
> On Nov 28, 2016, at 11:58 AM, Guenter Roeck <li...@roeck-us.net> wrote: > > On Mon, Nov 28, 2016 at 11:40:42AM -0800, John Muir wrote: >>>> +static void tmp108_update_ready_time(struct tmp108 *tmp108) >>>> +{ >>>> + tmp108

Re: [PATCH 1/3] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-28 Thread John Muir
> On Nov 27, 2016, at 4:19 AM, Guenter Roeck <li...@roeck-us.net> wrote: > > On 11/26/2016 09:15 PM, John Muir wrote: >> Add support for the TI TMP108 temperature sensor with some device >> configuration parameters. >> +- ti,alert-active-high : (boolean) make

Re: [PATCH 3/3] hwmon: tmp108: Update driver to use hwmon_chip_info.

2016-11-27 Thread John Muir
> On 2016.11.27, at 15:00 , Guenter Roeck <li...@roeck-us.net> wrote: > > On Sat, Nov 26, 2016 at 09:15:37PM -0800, John Muir wrote: >> Move the tmp108 driver from hwmon attribute groups to >> hwmon_chip_info. >> >> Signed-off-by: John Muir <j...@jmuir.

[PATCH 2/3] hwmon: tmp108: Use devm variants of registration interfaces.

2016-11-26 Thread John Muir
From: John Muir <mu...@google.com> Use the devm hwmon and thermal zone registration functions to clean up the code and remove the need for an i2c_driver.remove callback. Signed-off-by: John Muir <j...@jmuir.com> --- drivers/hwmon/tmp108.c | 28 1 fil

[PATCH 1/3] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-26 Thread John Muir
Add support for the TI TMP108 temperature sensor with some device configuration parameters. Signed-off-by: John Muir <j...@jmuir.com> --- Documentation/devicetree/bindings/hwmon/tmp108.txt | 27 ++ Documentation/hwmon/tmp108 | 38 ++ drivers/hwmon/K

[PATCH 0/3] Texas Instruments TMP108 temperature sensor driver.

2016-11-26 Thread John Muir
This driver is split into three patches as it is being ported forward from a Linux 4.4 implementation where it was tested. The final driver code uses interfaces that are not available in 4.4. John Muir (3): hwmon: Add Texas Instruments TMP108 temperature sensor driver. hwmon: tmp108: Use devm