Re: [PATCH v2] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

From: Stephen Warren
Date: Fri Sep 05 2014 - 12:56:10 EST


On 09/05/2014 03:28 AM, Mikko Perttunen wrote:
From: Mikko Perttunen <mperttunen@xxxxxxxxxx>

Currently the i2c-tegra bus driver prepares, enables
and set_rates its clocks separately for each transfer.
This causes locking problems when doing I2C transfers
from clock notifiers; see
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/268653.html

This patch moves clk_prepare/unprepare and clk_set_rate calls to
the probe function, leaving only clk_enable/disable to be
done on each transfer. This solves the locking issue.

Reviewed-by: Stephen Warren <swarren@xxxxxxxxxx>
--
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/