Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Compulab Utilite PRO vs i2cmux



On Tue, Dec 22, 2020 at 12:49:25 -0800, Jason Thorpe wrote:
 
> You need an i2c mux driver that confirms to the i2c-mux-gpio
> bindings.  I'll ping you off list.

Yay!  Thanks for such a quick response.

iicmux0 at simplebus0: GPIO I2C mux
iic3 at iicmux0: I2C bus
seeprom1 at iic3 addr 0x50: eeprom: size 256
em3027rtc0 at iic3 addr 0x56: Real-time Clock and Temperature Sensor
iic4 at iicmux0: I2C bus

Plase, commit.


It took a bit of time to make it work, b/c of a nasty bug in motoi2c.c
the driver for the parent bus.

static i2c_tag_t
motoi2c_get_tag(device_t dev)
{
	struct motoi2c_softc * const sc = device_private(dev);
	return &sc->sc_i2c;
}

The problem is that the device here is really imxi2c, so
device_private is imxi2c_softc, not motoi2c_softc!  I used a quick
kludge to get the real motoi2c_softc here, but it needs a proper fix.

-uwe


Home | Main Index | Thread Index | Old Index