Hi Linus,

Thanks for resending this patch. This patch is needed for me to be
able to add clock lookups for the i2c devices for ux500, unless the
boot will be broken.

Kind regards
Ulf Hansson

On 10 October 2012 13:02, Linus Walleij <[email protected]> wrote:
> From: Philippe Begnic <[email protected]>
>
> Make sure to clk_prepare as well as clk_enable.
>
> Signed-off-by: Philippe Begnic <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>
> Signed-off-by: Linus Walleij <[email protected]>
> ---
>  drivers/i2c/busses/i2c-nomadik.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-nomadik.c 
> b/drivers/i2c/busses/i2c-nomadik.c
> index 1b898b6..3eeae52 100644
> --- a/drivers/i2c/busses/i2c-nomadik.c
> +++ b/drivers/i2c/busses/i2c-nomadik.c
> @@ -642,7 +642,11 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
>
>         pm_runtime_get_sync(&dev->adev->dev);
>
> -       clk_enable(dev->clk);
> +       status = clk_prepare_enable(dev->clk);
> +       if (status) {
> +               dev_err(&dev->adev->dev, "can't prepare_enable clock\n");
> +               goto out_clk;
> +       }
>
>         status = init_hw(dev);
>         if (status)
> @@ -669,7 +673,8 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap,
>         }
>
>  out:
> -       clk_disable(dev->clk);
> +       clk_disable_unprepare(dev->clk);
> +out_clk:
>         pm_runtime_put_sync(&dev->adev->dev);
>
>         dev->busy = false;
> --
> 1.7.11.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to