From d5e3934362966fbd2b99f4c7a4f49c7958a849d4 Mon Sep 17 00:00:00 2001 From: Nelson Castillo Date: Wed, 19 Nov 2008 17:11:25 +0000 Subject: Subject: [PATCH 2/2] cleanup-gta02_lis302dl_bitbang.patch * Improve comment about the chip select issue with the accelerometers. Signed-off-by: Nelson Castillo --- arch/arm/mach-s3c2440/mach-gta02.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-s3c2440/mach-gta02.c') diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 21a147db695..a959f67dc12 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -1057,14 +1057,21 @@ static void __gta02_lis302dl_bitbang(struct lis302dl_info *lis, u8 *tx, local_irq_save(flags); /* - * Huh.. "quirk"... CS on this device is not really "CS" like you can - * expect. Instead when 1 it selects I2C interface mode. Because we - * have 2 devices on one interface, the "disabled" device when we talk - * to an "enabled" device sees the clocks as I2C clocks, creating - * havoc. + * Huh... "quirk"... CS on this device is not really "CS" like you can + * expect. * - * I2C sees MOSI going LOW while CLK HIGH as a START action, we must - * ensure this is never issued. + * When it is 0 it selects SPI interface mode. + * When it is 1 it selects I2C interface mode. + * + * Because we have 2 devices on one interface we have to make sure + * that the "disabled" device (actually in I2C mode) don't think we're + * talking to it. + * + * When we talk to the "enabled" device, the "disabled" device sees + * the clocks as I2C clocks, creating havoc. + * + * I2C sees MOSI going LOW while CLK HIGH as a START action, thus we + * must ensure this is never issued. */ if (&lis302_pdata_top == pdata) -- cgit v1.2.3