When I come to trying to work on that, should that all be kept in
mdio-i2c.c? I'm asking because we have a downstream implementation
moving that SMbus stuff to mdio-smbus.c. This covers quite a lot right
now, C22/C45 and Rollball, but just with byte access [1].
It really should be that the I2C access mechanism, and the protocol
running on top of these accesses are orthogonal. So i could see the
code split it mdio-i2c.c, mdio-smbus.c, mdio-rollaball.c,
mdio-marvell.c. But only if there is no replicated between these
files. And i'm not sure we have reached the complexity level to make
such a split.
Because that isn't my work, I'll need to check with the original
authors and adapt this for an upstream patch, trying to add word +
block access.
The code should be GPL, so you should be able to just take it and
adapt it. However, i've always had a good experience asking the
authors, they either say yes, or point out issues with the code that
need addressing. BTW: IANAL.
Andrew