Subject: Re: [PATCH v2] i2c: Driver to expose PowerNV platform i2c busses

From: Wolfram Sang <[email-masked]>
Date: Tue, 25 Nov 2014 18:14:03 +0100

On Tue, Nov 25, 2014 at 03:32:17PM +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2014-11-24 at 13:18 +0100, Wolfram Sang wrote:
> > 
> > I think there are now 3 drivers in my queue which are not fully I2C
> > compatible but more supporting the very minimum to, say, read an
> > eeprom.
> > I am not feeling well to allow them to use I2C_FUNC_I2C. So, I want to
> > think about ways how to communicate deficiencies like "only 255 byte"
> > or
> > "only WRRD messages" to users of that I2C controller. This is most
> > likely not happening before 3.19. But assistance is very welcome.
> 
> There are drivers doing that already, this is afaik common practice.

Well, there are drivers doing it, but to me this is somewhere between a
hack and a workaround. Somehow like using subsys_initcall() to overcome
probe ordering issues. That has never been nice and I still don't have a
solution how to convert those drivers back to module_init() + deferred
probe without causing regressions. As a result, people still want to
copy that behaviour.

> Please don't gate the merging process to some hypothetical rework that
> will imply reworking also a number of user space tools and in-kernel i2c
> device drivers. Basically that would mean "your platform won't be
> supported upstream for the next year and btw, rewrite all userspace".

Call me naive but I don't think we need to rewrite all userspace. That
is what I am at least aiming for.

> By all means let's create new "smbus" APIs for >1 bytes offset but let's
> not make it a gate to merging drivers using the existing way of doing
> things that has been so far perfectly functional.

You say "let's", yet my experience is that once I accept a patch like
yours, people are off with their support leaving me alone with the
topic. Not because they are evil, but because they also have tons of
other stuff to do. I perfectly understand I know this myself. And then,
more and more people will come asking for the same as you and the
situation gets harder and harder to fix.

That all being said, the driver has other issues which I will mention in
a seperate thread.