Commit Graph

5 Commits

Author SHA1 Message Date
sundarjdev 4e66cd13ff hwmon: (tmp103) Fix resource leak bug in tmp103 temperature sensor driver
tmp103 temperature sensor driver registers with the hwmon framework by calling
hwmon_device_register_with_groups but does not have a .remove method to call
hwmon_device_unregister to unregister from the framework when the device is no
longer needed. Fix this by calling devm_hwmon_device_register_with_groups.

Signed-off-by: Sundar J Dev <sundarjayakumardev@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-09-22 11:11:48 -07:00
Axel Lin 6ddd855c13 hwmon: (tmp103) Remove duplicate test for I2C_FUNC_SMBUS_BYTE_DATA functionality
Since commit b42261078a ("regmap: i2c: fallback to SMBus if the adapter
does not support standard I2C"), regmap-i2c will check the
I2C_FUNC_SMBUS_[BYTE|WORD]_DATA functionality based on the regmap_config
setting if the adapter does not support standard I2C.

So remove the I2C_FUNC_SMBUS_BYTE_DATA functionality check in the driver code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-10 07:51:42 -07:00
Axel Lin 034b44b4a2 hwmon: Make regmap configs const
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:35 -07:00
Axel Lin 233adcefee hwmon: (tmp103) Add missing i2c_set_clientdata call in tmp103_probe
Add missing i2c_set_clientdata() call in tmp103_probe, this makes the
dev_get_drvdata() call in tmp103_suspend/tmp103_resume return correct
address.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:34 -07:00
Heiko Schocher d17a7dca04 hwmon: Driver for TI TMP103 temperature sensor
Driver for the TI TMP103.

The TI TMP103 is similar to the TMP102.  It differs from the TMP102
by having only 8 bit registers.

Signed-off-by: Heiko Schocher <hs@denx.de>
[linux@roeck-us.net: Select REGMAP_I2C in Kconfig]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:33 -07:00