77#include <linux/bcd.h>
88#include <linux/mfd/rohm-bd71815.h>
99#include <linux/mfd/rohm-bd71828.h>
10+ #include <linux/mfd/rohm-bd72720.h>
1011#include <linux/module.h>
1112#include <linux/of.h>
1213#include <linux/platform_device.h>
@@ -262,13 +263,13 @@ static int bd70528_probe(struct platform_device *pdev)
262263
263264 /*
264265 * See also BD718XX_ALM_EN_OFFSET:
265- * This works for BD71828 and BD71815 as they have same offset
266- * between ALM0 start and ALM0_MASK. If new ICs are to be
267- * added this requires proper check as ALM0_MASK is not located
268- * at the end of ALM0 block - but after all ALM blocks so if
269- * amount of ALMs differ the offset to enable/disable is likely
270- * to be incorrect and enable/disable must be given as own
271- * reg address here.
266+ * This works for BD71828, BD71815, and BD72720 as they all
267+ * have same offset between the ALM0 start and the ALM0_MASK.
268+ * If new ICs are to be added this requires proper check as
269+ * the ALM0_MASK is not located at the end of ALM0 block -
270+ * but after all ALM blocks. If amount of ALMs differ, the
271+ * offset to enable/disable is likely to be incorrect and
272+ * enable/disable must be given as own reg address here.
272273 */
273274 bd_rtc -> bd718xx_alm_block_start = BD71815_REG_RTC_ALM_START ;
274275 hour_reg = BD71815_REG_HOUR ;
@@ -278,6 +279,11 @@ static int bd70528_probe(struct platform_device *pdev)
278279 bd_rtc -> bd718xx_alm_block_start = BD71828_REG_RTC_ALM_START ;
279280 hour_reg = BD71828_REG_RTC_HOUR ;
280281 break ;
282+ case ROHM_CHIP_TYPE_BD72720 :
283+ bd_rtc -> reg_time_start = BD72720_REG_RTC_START ;
284+ bd_rtc -> bd718xx_alm_block_start = BD72720_REG_RTC_ALM_START ;
285+ hour_reg = BD72720_REG_RTC_HOUR ;
286+ break ;
281287 default :
282288 dev_err (& pdev -> dev , "Unknown chip\n" );
283289 return - ENOENT ;
@@ -337,6 +343,7 @@ static int bd70528_probe(struct platform_device *pdev)
337343static const struct platform_device_id bd718x7_rtc_id [] = {
338344 { "bd71828-rtc" , ROHM_CHIP_TYPE_BD71828 },
339345 { "bd71815-rtc" , ROHM_CHIP_TYPE_BD71815 },
346+ { "bd72720-rtc" , ROHM_CHIP_TYPE_BD72720 },
340347 { },
341348};
342349MODULE_DEVICE_TABLE (platform , bd718x7_rtc_id );
0 commit comments