android_kernel_xiaomi_sm8350/drivers/i2c/busses
Aaro Koskinen baf46b4e37 i2c: OMAP2/3: Fix scll/sclh calculations
Fix scll/sclh calculations for HS and fast modes. Currently the driver
uses equal (roughly) low/high times which will result in too short
low time.

OMAP3430 TRM gives the following equations:

	F/S: tLow  = (scll + 7) * internal_clk
	     tHigh = (sclh + 5) * internal_clk
	HS:  tLow  = (scll + 7) * fclk
	     tHigh = (sclh + 5) * fclk

Furthermore, the I2C specification sets the following minimum values
for HS tLow/tHigh for capacitive bus loads 100 pF (maximum speed 3400)
and 400 pF (maximum speed 1700):

	speed	tLow		tHigh
	3400	160 ns		60 ns
	1700	320 ns		120 ns

and for F/S:

	speed	tLow		tHigh
	400	1300 ns		600 ns
	100	4700 ns		4000 ns

By using duty cycles 33/66 (HS, F) and 50/50 (S) we stay above these
minimum values.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-06-13 10:39:25 +01:00
..
i2c-acorn.c [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h 2009-03-25 10:21:35 +00:00
i2c-ali15x3.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-ali1535.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-ali1563.c
i2c-amd756-s4882.c
i2c-amd756.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-amd8111.c
i2c-at91.c
i2c-au1550.c
i2c-bfin-twi.c i2c: Blackfin TWI: implement I2C_FUNC_SMBUS_I2C_BLOCK functionality 2009-06-13 10:39:25 +01:00
i2c-cpm.c i2c-cpm: Pass dev ptr to dma_*_coherent rather than NULL 2009-05-12 00:36:04 +01:00
i2c-davinci.c i2c-davinci: Fix timeout handling 2009-03-28 21:34:43 +01:00
i2c-elektor.c
i2c-gpio.c
i2c-highlander.c
i2c-hydra.c
i2c-i801.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-ibm_iic.c i2c: Adapter timeout is in jiffies 2009-03-28 21:34:43 +01:00
i2c-ibm_iic.h
i2c-imx.c i2c: imx: Make disable_delay a per-device variable 2009-04-07 10:23:34 +01:00
i2c-iop3xx.c i2c: Adapter timeout is in jiffies 2009-03-28 21:34:43 +01:00
i2c-iop3xx.h
i2c-isch.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-ixp2000.c
i2c-mpc.c i2c-mpc: bug fix for MPC52xx clock setting and printout 2009-05-12 00:35:56 +01:00
i2c-mv64xxx.c i2c: Adapter timeout is in jiffies 2009-03-28 21:34:43 +01:00
i2c-nforce2-s4985.c
i2c-nforce2.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-ocores.c
i2c-omap.c i2c: OMAP2/3: Fix scll/sclh calculations 2009-06-13 10:39:25 +01:00
i2c-parport-light.c
i2c-parport.c
i2c-parport.h
i2c-pasemi.c
i2c-pca-isa.c i2c-algo-pca: Use timeout for checking the state machine 2009-03-28 21:34:45 +01:00
i2c-pca-platform.c i2c-pca-platform: Use defaults if no platform_data given 2009-03-28 21:34:45 +01:00
i2c-piix4.c i2c-piix4: Add support for the Broadcom HT1100 chipset 2009-03-28 21:34:46 +01:00
i2c-pmcmsp.c
i2c-pnx.c
i2c-powermac.c i2c: Add missing KERN_* constants to printks 2009-03-28 21:34:42 +01:00
i2c-pxa.c i2c-pxa.c: timeouts off by 1 2009-05-03 22:54:23 +01:00
i2c-s3c2410.c i2c: i2c-s3c2410: Initialise Samsung I2C controller early 2009-04-07 10:18:33 +01:00
i2c-s6000.c i2c: xtensa s6000 i2c driver 2009-04-07 10:23:34 +01:00
i2c-s6000.h i2c: xtensa s6000 i2c driver 2009-04-07 10:23:34 +01:00
i2c-sh7760.c sh: clkfwk: module_clk -> peripheral_clk rename. 2009-05-13 16:59:40 +09:00
i2c-sh_mobile.c
i2c-sibyte.c
i2c-simtec.c
i2c-sis96x.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-sis630.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-sis5595.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-stub.c
i2c-taos-evm.c
i2c-tiny-usb.c
i2c-versatile.c
i2c-via.c
i2c-viapro.c
i2c-voodoo3.c
Kconfig i2c: Blackfin TWI: make sure we don't end up with a CLKDIV=0 2009-06-13 10:39:25 +01:00
Makefile i2c: xtensa s6000 i2c driver 2009-04-07 10:23:34 +01:00
scx200_acb.c
scx200_i2c.c