rtc: merge ds3232 and ds3234

According to "Feature Comparison of the DS323x Real-Time Clocks"
(http://pdfserv.maximintegrated.com/en/an/AN5143.pdf), DS3232 and
DS3234 are very similar.

This merges rtc-ds3232 and rtc-ds3234 with using regmap.
This change also enables to support alarm for ds3234.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Suggested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
Akinobu Mita
2016-03-07 00:27:48 +09:00
committed by Alexandre Belloni
parent 370927c4b6
commit 080481f54e
4 changed files with 189 additions and 194 deletions

View File

@@ -247,16 +247,6 @@ config RTC_DRV_DS1672
This driver can also be built as a module. If so, the module
will be called rtc-ds1672.
config RTC_DRV_DS3232
tristate "Dallas/Maxim DS3232"
help
If you say yes here you get support for Dallas Semiconductor
DS3232 real-time clock chips. If an interrupt is associated
with the device, the alarm functionality is supported.
This driver can also be built as a module. If so, the module
will be called rtc-ds3232.
config RTC_DRV_HYM8563
tristate "Haoyu Microelectronics HYM8563"
depends on OF
@@ -733,15 +723,6 @@ config RTC_DRV_MAX6902
This driver can also be built as a module. If so, the module
will be called rtc-max6902.
config RTC_DRV_DS3234
tristate "Maxim/Dallas DS3234"
help
If you say yes here you get support for the
Maxim/Dallas DS3234 SPI RTC chip.
This driver can also be built as a module. If so, the module
will be called rtc-ds3234.
config RTC_DRV_PCF2123
tristate "NXP PCF2123"
help
@@ -761,6 +742,31 @@ config RTC_DRV_MCP795
endif # SPI_MASTER
#
# Helper to resolve issues with configs that have SPI enabled but I2C
# modular. See SND_SOC_I2C_AND_SPI for more information
#
config RTC_I2C_AND_SPI
tristate
default m if I2C=m
default y if I2C=y
default y if SPI_MASTER=y
select REGMAP_I2C if I2C
select REGMAP_SPI if SPI_MASTER
comment "SPI and I2C RTC drivers"
config RTC_DRV_DS3232
tristate "Dallas/Maxim DS3232/DS3234"
depends on RTC_I2C_AND_SPI
help
If you say yes here you get support for Dallas Semiconductor
DS3232 and DS3234 real-time clock chips. If an interrupt is associated
with the device, the alarm functionality is supported.
This driver can also be built as a module. If so, the module
will be called rtc-ds3232.
comment "Platform RTC drivers"
# this 'CMOS' RTC driver is arch dependent because <asm-generic/rtc.h>