Subject: Re: [RFC PATCH 04/19] powerpc: wii: device tree

From: Albert Herranz <[email-masked]>
Date: Wed, 25 Nov 2009 19:09:38 +0100

Segher Boessenkool wrote:
>>>> +               i2c-video {
>>>> +                       #address-cells = <1>;
>>>> +                       #size-cells = <0>;
>>>> +                       compatible = "virtual,i2c-gpio";
>>> There isn't a documented binding for this.  Is there a driver for it?
>>>
>> I have a driver for it. But it isn't yet published.
> 
> I bet there already is a generic IIC-via-GPIOs driver that
> you could use.
> 

Yes, there is a platform driver for that.
I picked that, extracted the common code into a common file, converted the existing driver to use the common code, then created a new one for platform bindings using the common code again.

(Then added gpio_direction_is_output() to gpiolib and sda_enforce_dir() to i2c-gpio).

Thanks,
Albert