From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Arnaud Ebalard <arno@natisbad.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: [PATCH 2/3] rtc: ds1307: add Intersil ISL12057 support
Date: Wed, 13 Jul 2016 02:59:30 +0200 [thread overview]
Message-ID: <1468371571-22641-3-git-send-email-alexandre.belloni@free-electrons.com> (raw)
In-Reply-To: <1468371571-22641-1-git-send-email-alexandre.belloni@free-electrons.com>
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported
by the ds1307 driver.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
drivers/rtc/Kconfig | 8 ++++----
drivers/rtc/rtc-ds1307.c | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index f47c2f5ff70d..ba0b3e7ce4c5 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -198,14 +198,14 @@ config RTC_DRV_AS3722
will be called rtc-as3722.
config RTC_DRV_DS1307
- tristate "Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025"
+ tristate "Dallas/Maxim DS1307/37/38/39/40, ST M41T00, EPSON RX-8025, ISL12057"
help
If you say yes here you get support for various compatible RTC
chips (often with battery backup) connected with I2C. This driver
should handle DS1307, DS1337, DS1338, DS1339, DS1340, ST M41T00,
- EPSON RX-8025 and probably other chips. In some cases the RTC
- must already have been initialized (by manufacturing or a
- bootloader).
+ EPSON RX-8025, Intersil ISL12057 and probably other chips. In some
+ cases the RTC must already have been initialized (by manufacturing or
+ a bootloader).
The first seven registers on these chips hold an RTC, and other
registers may add features such as NVRAM, a trickle charger for
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 4c5890864d9c..52be48f2e3c0 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -186,6 +186,7 @@ static const struct i2c_device_id ds1307_id[] = {
{ "mcp7941x", mcp794xx },
{ "pt7c4338", ds_1307 },
{ "rx8025", rx_8025 },
+ { "isl1207", ds_1337 },
{ }
};
MODULE_DEVICE_TABLE(i2c, ds1307_id);
@@ -1333,6 +1334,11 @@ static int ds1307_probe(struct i2c_client *client,
if (of_property_read_bool(client->dev.of_node, "wakeup-source")) {
ds1307_can_wakeup_device = true;
}
+ /* Intersil ISL12057 DT backward compatibility */
+ if (of_property_read_bool(client->dev.of_node,
+ "isil,irq2-can-wakeup-machine")) {
+ ds1307_can_wakeup_device = true;
+ }
#endif
switch (ds1307->type) {
--
2.8.1
next prev parent reply other threads:[~2016-07-13 1:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 0:59 [PATCH 0/3] rtc: remove intersil isl12057 Alexandre Belloni
2016-07-13 0:59 ` [PATCH 1/3] Documentation: dt: Intersil isl12057 is not a trivial device Alexandre Belloni
2016-07-14 20:10 ` Arnaud Ebalard
2016-07-20 19:32 ` Alexandre Belloni
2016-07-20 22:40 ` Rob Herring
2016-07-13 0:59 ` Alexandre Belloni [this message]
2016-07-14 19:57 ` [PATCH 2/3] rtc: ds1307: add Intersil ISL12057 support Arnaud Ebalard
2016-07-13 0:59 ` [PATCH 3/3] rtc: isl12057: remove driver Alexandre Belloni
2016-07-14 20:16 ` [PATCH 0/3] rtc: remove intersil isl12057 Arnaud Ebalard
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=1468371571-22641-3-git-send-email-alexandre.belloni@free-electrons.com \
--to=alexandre.belloni@free-electrons.com \
--cc=a.zummo@towertech.it \
--cc=arno@natisbad.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®