RE: [PATCH V2 1/4] i2c: Add irq_gpio field to struct i2c_client.

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

 



Jonathan Cameron wrote at Friday, September 02, 2011 2:48 AM:
> On 09/01/11 17:52, Stephen Warren wrote:
> > Some devices use a single pin as both an IRQ and a GPIO. In that case,
> > irq_gpio is the GPIO ID for that pin. Not all drivers use this feature.
> > Where they do, and the use of this feature is optional, and the system
> > wishes to disable this feature, this field must be explicitly set to a
> > defined invalid GPIO ID, such as -1.
>
> Why make it specifically an irq related gpio?  Might as well just call it
> gpio then it can be used for cases where it never corresponds to an irq
> such as capture trigger pins.
> 
> Otherwise I'd be happy to see this go in.

The idea was specifically to replace the need to call irq_to_gpio(i2c->irq).
If we did just rename it plain "gpio" and allow it to be used for anything,
then that does indeed start looking more like device-specific platform data.

I guess it sounds like consensus is to go that way. It does seem like that
will end up creating a bunch more device-specific platform-data files though.
I wonder if adding IORESOURCE_GPIO would make sense so this could be handled
in a generic way without custom platform data types?

-- 
nvpublic

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux