From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] I2C: OMAP: detect more devices when probing an i2c bus
Date: Tue, 12 Apr 2011 08:50:50 +0200 [thread overview]
Message-ID: <4DA3F64A.4010504@denx.de> (raw)
In-Reply-To: <4DA2C9C0.2000206@ge.com>
Hello Nick,
Nick Thompson wrote:
> The omap24xx driver only seems to support devices that have a single subaddress
> byte. With these types of devices, the first access in a bus transaction is
> usually a write (writes the subaddress) followed by either a read or write to
> access the devices registers.
>
> Many such devices will respond to a read as the first access, but there are at
> least some that will NACK such a read. (e.g. ADV7180.)
>
> The probe function attempts to detect a devices ACK to a read access only and
> fails to find devices that NACK a read.
>
> This commit modifies the probe function to start a write instead. This detects
> devices that respond to reads (since they must also respond to writes) as well
> as those that only respond to writes. The bus is immediately set to idle after a
> (N)ACK avoiding actually writing anything to the device.
>
> Signed-off-by: Nick Thompson <nick.thompson@ge.com>
> ---
> Tested on OMAP3530 with an ADV7180 video ADC.
>
> Detection of a device takes the same time as failing to find a device, so the
> probe is slightly faster.
>
> drivers/i2c/omap24xx_i2c.c | 42 +++++++++++-------------------------------
> 1 files changed, 11 insertions(+), 31 deletions(-)
Please check your patch with checkpatch, as it shows:
total: 2 errors, 8 warnings, 54 lines checked
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
scripts/cleanfile
[PATCH] I2C: OMAP: detect more devices when probing an i2c bus.eml has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Beside of this, your patch looks ok to me.
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
prev parent reply other threads:[~2011-04-12 6:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 9:28 [U-Boot] [PATCH] I2C: OMAP: detect more devices when probing an i2c bus Nick Thompson
2011-04-12 6:50 ` Heiko Schocher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DA3F64A.4010504@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox