From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] i2c: fix SDA contention in read_byte()
Date: Wed, 14 Jul 2010 09:29:03 +0800 [thread overview]
Message-ID: <4C3D12DF.3040303@wytron.com.tw> (raw)
In-Reply-To: <4C3ABAF6.5030607@emk-elektronik.de>
Reinhard Meyer wrote:
> 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.
We want to use common gpio framework and unify the soft i2c access.
Please see the patches from Mike Frysinger,
[07/05] i2c: soft_i2c: add simple GPIO implementation
>
>> 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...
>
Yet, it is still at91 specific. I mean a common gpio framework like that
of linux.
- Thomas
next prev parent reply other threads:[~2010-07-14 1:29 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
2010-07-14 1:29 ` Thomas Chou [this message]
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=4C3D12DF.3040303@wytron.com.tw \
--to=thomas@wytron.com.tw \
--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