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: Mon, 12 Jul 2010 13:51:48 +0800 [thread overview]
Message-ID: <4C3AAD74.7090307@wytron.com.tw> (raw)
In-Reply-To: <4C3AA15E.6070203@emk-elektronik.de>
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
BTW, will you be interested in using common gpio framework for avr32 family?
Cheers,
Thomas
next prev parent reply other threads:[~2010-07-12 5:51 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 [this message]
2010-07-12 6:49 ` Reinhard Meyer
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=4C3AAD74.7090307@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