From db07c447caacd5f9003a57ef2802afa8a4c81348 Mon Sep 17 00:00:00 2001 From: Chuanhua Han Date: Fri, 26 Jul 2019 19:24:00 +0800 Subject: rtc: ds3232/ds3231: Add support to generate 32KHz output for driver module Add an implementation of the rtc_enable_32khz_output() that uses the driver model i2c APIs. Also put code related to rtc_enable_32khz_output under CONFIG_RTC_ENABLE_32KHZ_OUTPUT. Signed-off-by: Chuanhua Han Reviewed-by: Prabhakar Kushwaha --- include/rtc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/rtc.h') diff --git a/include/rtc.h b/include/rtc.h index b255bdc..7386d52 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -166,11 +166,17 @@ int rtc_read32(struct udevice *dev, unsigned int reg, u32 *valuep); */ int rtc_write32(struct udevice *dev, unsigned int reg, u32 value); +#ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT +int rtc_enable_32khz_output(int busnum, int chip_addr); +#endif + #else int rtc_get (struct rtc_time *); int rtc_set (struct rtc_time *); void rtc_reset (void); +#ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT void rtc_enable_32khz_output(void); +#endif /** * rtc_read8() - Read an 8-bit register -- cgit v1.1