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 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 Guenter Roeck
Hi John, On Thu, Dec 01, 2016 at 01:50:22PM -0800, John Muir wrote: > Hi Guenter, > [ ... ] > > >> +static int __maybe_unused tmp108_resume(struct device *dev) > >> +{ > >> + struct tmp108 *tmp108 = dev_get_drvdata(dev); > >> + int err; > >> + > >> + err = regmap_write(tmp108->regmap,

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

2016-12-01 Thread John Muir
This adds a device driver for the Texas Instruments TMP108 temperature sensor. The driver provides support to read the temperature, read or modify the update interval, min and max temperature and hysteresis values, as well as read current alarm status. Support for alarm interrupts will come in a

[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 --- Documentation/hwmon/tmp108 | 36 drivers/hwmon/Kconfig | 11 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/tmp108.c | 466

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

2016-12-01 Thread Guenter Roeck
On 12/01/2016 06:32 PM, John Muir wrote: Simple hwmon binding documentation. Signed-off-by: John Muir Straightforward, so I'll apply it w/o waiting for confirmation from the DT maintainers (Rob - please scream if that is unacceptable). Thanks, Guenter ---

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

2016-12-01 Thread John Muir
Hi Gunter, > On 2016.12.01, at 20:40 , Guenter Roeck wrote: > > On 12/01/2016 06:32 PM, John Muir wrote: >> Add support for the TI TMP108 temperature sensor with some device >> configuration parameters. >> >> Signed-off-by: John Muir > > Nice job. Applied