From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Wed, 29 Jan 2014 18:30:56 -0800 Subject: [U-Boot] [PATCH v2 3/9] kmp204x: I2C deblocking for I2C-bus1 added In-Reply-To: <1390819752-21233-4-git-send-email-valentin.longchamp@keymile.com> References: <1390819752-21233-1-git-send-email-valentin.longchamp@keymile.com> <1390819752-21233-4-git-send-email-valentin.longchamp@keymile.com> Message-ID: <52E9B960.5030205@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/27/2014 02:49 AM, Valentin Longchamp wrote: > From: Rainer Boschung > > -uses common deblocking algorithm from ../common/common.c I don't see any algorithm in the common.c file. > -supports deblocking of of I2C-bus1 by means of QRIO GPIO > - SCL1 = GPIO_A16 > - SDA1 = GPIO_A17 > > QRIO GPIOs act in an open-drain-like manner, for 0 GPIO drives > low and for 1 the GPIO is an input and must be pulled up externaly! > > Signed-off-by: Rainer Boschung > Signed-off-by: Valentin Longchamp > --- > > Changes in v2: None > > board/keymile/kmp204x/kmp204x.c | 53 ++++++++++++++++++++++++++++++++++--- > include/configs/km/kmp204x-common.h | 10 +++++++ > 2 files changed, 60 insertions(+), 3 deletions(-) > > diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c > index bbb2453..8d6eecb 100644 > --- a/board/keymile/kmp204x/kmp204x.c > +++ b/board/keymile/kmp204x/kmp204x.c > @@ -33,12 +33,51 @@ int checkboard(void) > return 0; > } > > -/* TODO: implement the I2C deblocking function */ > -int i2c_make_abort(void) > +/* I2C deblocking uses the algorithm defined in ../common/common.c, which > + * makes use of 2 QRIO GPIOs to act on the SCL and SDA signals of an I2C bus. > + * According to the standard I2C IOs must not drive HI-Levels, so the > + * QRIO GPIOs are used in open-drain fashion: > + * -> 0 GPIO configured as output that drives low > + * -> 1 GPIO configured as input pull-up ties high > + */ > + I failed to understand these comments as well. Are these comments copy-n-paste? York