From 080481f54ef621211d6c75a03dc652fb6ed04222 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Mon, 7 Mar 2016 00:27:48 +0900 Subject: 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 Suggested-by: Alexandre Belloni Signed-off-by: Alexandre Belloni --- drivers/rtc/Kconfig | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'drivers/rtc/Kconfig') diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 9babb4ccd65b..987c50168fd8 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -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 -- cgit v1.2.3