lkml.org 
[lkml]   [2016]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] i2c: designware: balance clk enable/disable on removal
From
Date
On 01/30/2016 12:31 AM, Alexey Khoroshilov wrote:
> It seems clk_disable_unprepare() is missed in dw_i2c_plat_remove(),
> so the patch adds it.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> ---
> drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 438f1b4964c0..8f19b7b81fe0 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -267,6 +267,7 @@ static int dw_i2c_plat_remove(struct platform_device *pdev)
> i2c_del_adapter(&dev->adapter);
>
> i2c_dw_disable(dev);
> + i2c_dw_plat_prepare_clk(dev, false);
>
I tried this quickly and it appears more work is needed. When
CONFIG_PM_SLEEP is set then autosuspending will do the unprepare and
this patch causes double unprepare at remove. But when CONFIG_PM_SLEEP
is not set then indeed those clk calls are out of sync.

--
Jarkko

\
 
 \ /
  Last update: 2016-02-01 15:41    [W:0.068 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site