Private
Public Access
2
0

gt: allow for i2c bus to move around a little

Unfortunately GT has alot of i2c buses, the second lot of designware buses can
turn up after the i915 i2c buses but since they all have the same name, we do a
dumb check to see if they are 5/6 or 9/10. Hopefully future kernel/firmware
will let us do something smarter.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-07-12 12:26:45 +01:00
parent 6c9aeb9b9e
commit 874d0f47bd

View File

@@ -66,12 +66,19 @@ mraa_gt_tuchuck_board()
b->i2c_bus[0].bus_id = 0;
b->i2c_bus[0].sda = 11;
b->i2c_bus[0].scl = 13;
b->i2c_bus[1].bus_id = 5;
if (mraa_find_i2c_bus("designware", 5) != 5) {
b->i2c_bus[1].bus_id = 9;
b->i2c_bus[2].bus_id = 10;
} else {
b->i2c_bus[1].bus_id = 5;
b->i2c_bus[2].bus_id = 6;
}
b->i2c_bus[1].sda = 15;
b->i2c_bus[1].scl = 17;
b->i2c_bus[2].bus_id = 6;
b->i2c_bus[2].sda = 19;
b->i2c_bus[2].scl = 21;
b->def_i2c_bus = b->i2c_bus[0].bus_id;
#if 0