Re: [PATCH v3] i2c: designware: Do not require clock when SSCN and FFCN are provided

From: Suravee Suthikulpanit
Date: Mon Jan 04 2016 - 10:17:45 EST


Hi Andy,

On 12/23/2015 12:27 PM, Andy Shevchenko wrote:
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c
>b/drivers/i2c/busses/i2c-designware-platdrv.c
>index 8ffc36b..04edd09 100644
>--- a/drivers/i2c/busses/i2c-designware-platdrv.c
>+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
Can we introduce

static int i2c_dw_plat_prepare_clk(struct dw_i2c_dev *i_dev, bool
prepare)
{
if (IS_ERR(i_dev->clk))
return PTR_ERR(i_dev->clk);

if (prepare)
/* REMOVEME: Yes, you have to check return value and this is one
benefit of this change */
return clk_prepare_enable(i_dev->clk);

clk_disable_unprepare(i_dev->clk);
return 0;
}

andâ


Yes, I think this change. I'll put this in the V4, and send out soon.

Suravee
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/