On Tue, Aug 18, 2020 at 06:14:31PM -0400, Mohammed Billoo wrote: > Andrew, > > Thanks for your comments. Does it make sense to replace the big_endian > bool with a small_endian bool? The code to choose the appropriate > non-grlib accessors assumes that big_endian will be specified, either > in a device tree blob or via platform_data: > > if (!i2c->setreg || !i2c->getreg) { > bool be = pdata ? pdata->big_endian : > of_device_is_big_endian(pdev->dev.of_node); > . > . > . > case 2: > i2c->setreg = be ? oc_setreg_16be : oc_setreg_16; > > And so if endianess isn't specified (assuming the default is big > endian), it will actually default to small endian. You have to assume there is no indication of endianness in device tree by default. For your broken hardware you will indicate little endian in device tree. If you want, you could add support for DT indicating big endian, but it is not required. Andrew