rtc: rtc-ds1307: add temperature sensor support for ds3231
PATCH v4 1/1 rtc: rtc-ds1307: add temperature sensor support for ds3231
DS3231 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon.
# cat /sys/class/i2c-adapter/i2c-2/2-0068/hwmon/hwmon0/temp1_input 21000
---
* v4 (all changes are suggested by Guenter Roeck)
- drop the Cc: mailing lists in commit log
- add Acked-by line
- remove unnecessary header include
- s/s32/int/
- make ds1307_hwmon_register() a void function as the return value is not used
drivers/rtc/Kconfig | 9 +++++ drivers/rtc/rtc-ds1307.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+)
drivers/rtc/Kconfig +9 -0
@@ -212,6 +212,15 @@ config RTC_DRV_DS1307 This driver can also be built as a module. If so, the module will be called rtc-ds1307. +config RTC_DRV_DS1307_HWMON + bool "HWMON support for rtc-ds1307" + depends on RTC_DRV_DS1307 && HWMON + depends on !(RTC_DRV_DS1307=y && HWMON=m) + default y + help + Say Y here if you want to expose temperature sensor data on + rtc-ds1307 (only DS3231) + config RTC_DRV_DS1374 tristate "Dallas/Maxim DS1374" help
drivers/rtc/rtc-ds1307.c +88 -0
106 lines not on this page · raw message
Signature · 7 lines
2.5.0 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Alexandre Belloni
AppliedQuoted 20 lines · Akinobu Mita
DS3231 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon.
# cat /sys/class/i2c-adapter/i2c-2/2-0068/hwmon/hwmon0/temp1_input 21000Signed-off-by Akinobu Mita <[email protected]>Acked-by Guenter Roeck <[email protected]>Cc Alessandro Zummo <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>---
* v4 (all changes are suggested by Guenter Roeck)
- drop the Cc: mailing lists in commit log
- add Acked-by line
- remove unnecessary header include
- s/s32/int/
- makeds1307_hwmon_register()a void function as the return value is not used
Quoted 3 lines
drivers/rtc/Kconfig | 9 +++++ drivers/rtc/rtc-ds1307.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com