Skip to content

Commit

Permalink
rtc: ds1307: add Intersil ISL12057 support
Browse files Browse the repository at this point in the history
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported
by the ds1307 driver.

Acked-by: Arnaud Ebalard <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
alexandrebelloni committed Aug 31, 2016
1 parent 50d6c0e commit 78aaa06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,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
Expand Down
6 changes: 6 additions & 0 deletions drivers/rtc/rtc-ds1307.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ static const struct i2c_device_id ds1307_id[] = {
{ "mcp7941x", mcp794xx },
{ "pt7c4338", ds_1307 },
{ "rx8025", rx_8025 },
{ "isl12057", ds_1337 },
{ }
};
MODULE_DEVICE_TABLE(i2c, ds1307_id);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 78aaa06

Please sign in to comment.