From: Josep Orga Date: Tue, 21 Apr 2020 19:07:45 +0000 (+0200) Subject: rtc: pcf8563: Enable or disable clock out due to clk_disable_unused hang. X-Git-Tag: rel_imx_4.19.35_1.1.0-somdevices.0~3 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=61539c85a290f7c57e6402253f45e003fda0489a;p=linux.git rtc: pcf8563: Enable or disable clock out due to clk_disable_unused hang. Signed-off-by: Josep Orga --- diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 3efc86c25d27..ee64ec8f53f4 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -23,6 +23,9 @@ #include #include +/*Enable or disable clock out due to clk_disable_unused hang*/ +//#define PCF8563_ENABLE_CLKO + #define PCF8563_REG_ST1 0x00 /* status */ #define PCF8563_REG_ST2 0x01 #define PCF8563_BIT_AIE (1 << 1) @@ -82,7 +85,7 @@ struct pcf8563 { int voltage_low; /* incicates if a low_voltage was detected */ struct i2c_client *client; -#ifdef CONFIG_COMMON_CLK +#if defined(CONFIG_COMMON_CLK) && defined(PCF8563_ENABLE_CLKO) struct clk_hw clkout_hw; #endif }; @@ -396,7 +399,7 @@ static int pcf8563_irq_enable(struct device *dev, unsigned int enabled) return pcf8563_set_alarm_mode(to_i2c_client(dev), !!enabled); } -#ifdef CONFIG_COMMON_CLK +#if defined(CONFIG_COMMON_CLK) && defined(PCF8563_ENABLE_CLKO) /* * Handling of the clkout */ @@ -615,7 +618,7 @@ static int pcf8563_probe(struct i2c_client *client, } -#ifdef CONFIG_COMMON_CLK +#if defined(CONFIG_COMMON_CLK) && defined(PCF8563_ENABLE_CLKO) /* register clk in common clk framework */ pcf8563_clkout_register_clk(pcf8563); #endif