From: Guenter Roeck <linux@roeck-us.net>
To: Akinobu Mita <akinobu.mita@gmail.com>, rtc-linux@googlegroups.com
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Jean Delvare <jdelvare@suse.com>,
lm-sensors@lm-sensors.org
Subject: [rtc-linux] Re: [PATCH v2] rtc: rtc-ds1307: add temperature sensor support for ds3231
Date: Fri, 22 Jan 2016 16:55:09 -0800 [thread overview]
Message-ID: <56A2CF6D.9040300@roeck-us.net> (raw)
In-Reply-To: <1453485441-11667-1-git-send-email-akinobu.mita@gmail.com>
On 01/22/2016 09:57 AM, Akinobu Mita wrote:
> 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 <a.zummo@towertech.it>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 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.
> +#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.
Thanks,
Guenter
--
--
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.
next prev parent reply other threads:[~2016-01-23 0:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 17:57 [rtc-linux] [PATCH v2] rtc: rtc-ds1307: add temperature sensor support for ds3231 Akinobu Mita
2016-01-22 18:50 ` [rtc-linux] " Guenter Roeck
2016-01-23 13:51 ` Akinobu Mita
2016-01-23 0:55 ` Guenter Roeck [this message]
2016-01-23 13:52 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A2CF6D.9040300@roeck-us.net \
--to=linux@roeck-us.net \
--cc=a.zummo@towertech.it \
--cc=akinobu.mita@gmail.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=jdelvare@suse.com \
--cc=lm-sensors@lm-sensors.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox