From: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] i2c: fix SDA contention in read_byte()
Date: Mon, 12 Jul 2010 08:49:26 +0200 [thread overview]
Message-ID: <4C3ABAF6.5030607@emk-elektronik.de> (raw)
In-Reply-To: <4C3AAD74.7090307@wytron.com.tw>
Thomas Chou schrieb:
> Reinhard Meyer wrote:
>> Its even simpler, provided the hardware can do open collector. Here
>> was my solution for AVR32AP7000:
>>
>
> Then we could add a config for open drain similar to that of linux driver.
>
> # ifndef I2C_SDA
> # ifdef CONFIG_SOFT_I2C_GPIO_SDA_IS_OPEN_DRAIN
> # define I2C_SDA(bit) gpio_set_value(CONFIG_SOFT_I2C_GPIO_SDA, bit)
> # else
> # define I2C_SDA(bit) \
> if (bit) { \
> gpio_direction_input(CONFIG_SOFT_I2C_GPIO_SDA); \
> } else { \
> gpio_direction_output(CONFIG_SOFT_I2C_GPIO_SDA, 0);\
> }
> # endif
> # endif
Why would we need that? Since the defines reside in the board/project specific
include/configs/*.h file, it is well known if the hardware has open drain or
not.
>
> BTW, will you be interested in using common gpio framework for avr32
> family?
No, AVR32AP7000 is dead for me. Working on AT91SAM9xxx now, which already uses gpio framework...
Reinhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinhard_meyer.vcf
Type: text/x-vcard
Size: 370 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100712/6db4bf2c/attachment.vcf
next prev parent reply other threads:[~2010-07-12 6:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 6:14 [U-Boot] [PATCH] i2c: fix SDA contention in read_byte() Thomas Chou
2010-07-07 4:45 ` Andrew Dyer
2010-07-07 5:00 ` Reinhard Meyer
2010-07-12 4:14 ` Thomas Chou
2010-07-12 5:00 ` Reinhard Meyer
2010-07-12 5:51 ` Thomas Chou
2010-07-12 6:49 ` Reinhard Meyer [this message]
2010-07-14 1:29 ` Thomas Chou
2010-07-14 6:31 ` Reinhard Meyer
2010-07-21 17:40 ` Mike Frysinger
2010-07-22 2:47 ` Thomas Chou
2010-07-11 22:55 ` Mike Frysinger
2010-07-12 3:47 ` Andrew Dyer
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=4C3ABAF6.5030607@emk-elektronik.de \
--to=reinhard.meyer@emk-elektronik.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