lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 4.4 056/101] rtc: pcf8563: fix output clock rate
    Date
    From: Philipp Zabel <p.zabel@pengutronix.de>

    [ Upstream commit a3350f9c57ffad569c40f7320b89da1f3061c5bb ]

    The pcf8563_clkout_recalc_rate function erroneously ignores the
    frequency index read from the CLKO register and always returns
    32768 Hz.

    Fixes: a39a6405d5f9 ("rtc: pcf8563: add CLKOUT to common clock framework")
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    ---
    drivers/rtc/rtc-pcf8563.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
    index c8f95b8e463a..45b5a3d47ccf 100644
    --- a/drivers/rtc/rtc-pcf8563.c
    +++ b/drivers/rtc/rtc-pcf8563.c
    @@ -427,7 +427,7 @@ static unsigned long pcf8563_clkout_recalc_rate(struct clk_hw *hw,
    return 0;

    buf &= PCF8563_REG_CLKO_F_MASK;
    - return clkout_rates[ret];
    + return clkout_rates[buf];
    }

    static long pcf8563_clkout_round_rate(struct clk_hw *hw, unsigned long rate,
    --
    2.11.0
    \
     
     \ /
      Last update: 2017-12-07 17:42    [W:4.048 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site