diff options
author | Anatol Pomazau <anatol@google.com> | 2015-02-04 10:09:27 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-22 08:57:36 +0200 |
commit | d9af30bec1c5d47f51dcdfbe540ad2fcebb2fdc4 (patch) | |
tree | 6865280c0654471d1514d3161911cb5cc3830295 /src/include/elog.h | |
parent | 985589592753b380c54300b38d6d3ec259c4a240 (diff) |
broadcom/cygnus: Implement I2C driver
BUG=chrome-os-partner:35810
BRANCH=purin
TEST=Enable I2C1, reset devboard codec, read a register.
Here is the code that demonstrates how I2C works:
i2c_init(1, 100*KHz);
mdelay(50);
int rc = i2c_writeb(1, 0x18, 1, 0x80); // reset codec
printk(BIOS_INFO, "I2C reset rc=%d\n", rc);
mdelay(50);
uint8_t data = 0;
rc = i2c_readb(1, 0x18, 43, &data);
printk(BIOS_INFO, "I2C read rc=%d data=%x\n", rc, data); // data == 0x80
Change-Id: I0d202f8b0375b5ccd9f71b23fb0cadd5a70ae779
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6bbe9afe3dccd104f39c2c286d3765a28ea20141
Original-Signed-off-by: Anatol Pomazau <anatol@google.com>
Original-Reviewed-on: https://chrome-internal-review.googlesource.com/195706
Original-Reviewed-by: Daisuke Nojiri <dnojiri@google.com>
Original-Reviewed-by: Anatol Pomazau <anatol@google.com>
Original-Commit-Queue: Anatol Pomazau <anatol@google.com>
Original-Tested-by: Anatol Pomazau <anatol@google.com>
Original-Change-Id: I178acef9de18fa854983294edcd2c05886795e2a
Original-Reviewed-on: https://chromium-review.googlesource.com/263496
Original-Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Original-Trybot-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Original-Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Original-Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: http://review.coreboot.org/9908
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/include/elog.h')
0 files changed, 0 insertions, 0 deletions