Thread (5 messages) flat view 5 messages, 2 authors, 2016-01-23

[rtc-linux] Re: [PATCH v2] rtc: rtc-ds1307: add temperature sensor support for ds3231

From: Akinobu Mita <akinobu.mita@gmail.com>
Date: 2016-01-23 13:52:50

2016-01-23 9:55 GMT+09:00 Guenter Roeck [off-list ref]:
On 01/22/2016 09:57 AM, Akinobu Mita wrote:
quoted
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

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Alessandro Zummo <redacted>
Cc: Alexandre Belloni <redacted>
Cc: rtc-linux@googlegroups.com
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: lm-sensors@lm-sensors.org
---
* v2
- convert to use hwmon framework, suggested by Alexandre Belloni

  drivers/rtc/rtc-ds1307.c | 122
+++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 122 insertions(+)
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c

Something else, on top of my previous comments.
quoted
+#if IS_ENABLED(CONFIG_HWMON)

I don't think this will work as intended. It will fail if the ds1307 driver
is built into the kernel but hwmon is built as module.

Check configurations such as BE2NET_HWMON or NET_DSA_HWMON for ideas
on how to handle this problem.
OK.  I'll add CONFIG_RTC_DRV_DS1307_HWMON and do something similar.

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help