rtc: ds3232: add temperature support
PATCH v3 1/1 rtc: ds3232: add temperature support
DS3232/DS3234 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon.
# cat /sys/class/hwmon/hwmon0/temp1_input 37250
Signed-off-by Kirill Esipov <[email protected]>
--- drivers/rtc/Kconfig | 8 ++++ drivers/rtc/rtc-ds3232.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+)
drivers/rtc/Kconfig +8 -0
@@ -791,6 +791,14 @@ config RTC_DRV_DS3232 This driver can also be built as a module. If so, the module will be called rtc-ds3232. +config RTC_DRV_DS3232_HWMON + bool "HWMON support for Dallas/Maxim DS3232/DS3234" + depends on RTC_DRV_DS3232 && HWMON && !(RTC_DRV_DS3232=y && HWMON=m) + default y + help + Say Y here if you want to expose temperature sensor data on + rtc-ds3232 + config RTC_DRV_PCF2127 tristate "NXP PCF2127" depends on RTC_I2C_AND_SPI
drivers/rtc/rtc-ds3232.c +119 -0
143 lines not on this page · raw message
Signature · 1 line
2.7.4
Alexandre Belloni
AppliedQuoted 12 lines · Kirill Esipov
DS3232/DS3234 has the temperature registers with a resolution of 0.25 degree celsius. This enables to get the value through hwmon.
# cat /sys/class/hwmon/hwmon0/temp1_input 37250Signed-off-by Kirill Esipov <[email protected]>--- drivers/rtc/Kconfig | 8 ++++ drivers/rtc/rtc-ds3232.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com