linux/drivers/i2c
Daniel Kurtz 9bcd04bfbb i2c: s3c2410: grab adapter lock while changing i2c clock
We probably don't want to change I2C frequency while a transfer is in
progress.  The current implementation grabs a spinlock, but that only
protected the writes to IICCON when starting a message, it didn't protect
against clock changes in the middle of a transaction.

Note: The i2c-core already grabs the adapter lock before calling
s3c24xx_i2c_doxfer(), which ensures that only one caller is issuing a
xfer at a time. This means it is not necessary to disable interrupts
(spin_lock_irqsave) when changing frequencies, since there won't be
any i2c interrupts if there is no on-going xfer.

Lastly, i2c_lock_adapter() may cause the cpufreq_transition to sleep if
if a xfer is in progress, but this is ok since cpufreq notifiers are
called in a kernel thread, and there are already cases where it could
sleep, such as when using i2c to update the output of a voltage
regulator.

Note: the cpufreq part of this change has no functional affect on
	exynos, where the i2c clock is independent of the cpufreq.
	But, there is a slight perfomance boost since we no longer need to
	lock/unlock an additional spinlock.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-11-16 13:08:48 +01:00
..
algos Linux 3.6-rc7 2012-10-08 12:46:32 +02:00
busses i2c: s3c2410: grab adapter lock while changing i2c clock 2012-11-16 13:08:48 +01:00
muxes i2c: mux: Add dt support to i2c-mux-gpio driver 2012-11-16 09:28:27 +01:00
i2c-boardinfo.c i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-core.c i2c: Convert struct i2c_msg initialization to C99 format 2012-10-05 22:23:52 +02:00
i2c-core.h i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-dev.c i2c-dev: Add support for I2C_M_RECV_LEN 2012-05-30 10:55:34 +02:00
i2c-mux.c i2c-mux: Add support for device auto-detection 2012-10-05 22:23:51 +02:00
i2c-smbus.c i2c-smbus: Convert kzalloc to devm_kzalloc 2012-10-05 22:23:52 +02:00
i2c-stub.c i2c-stub: Move to drivers/i2c 2012-10-28 21:37:00 +01:00
Kconfig i2c: Make I2C available on UML 2012-10-05 22:23:52 +02:00
Makefile i2c-stub: Move to drivers/i2c 2012-10-28 21:37:00 +01:00