RE: [PATCH V2 1/4] i2c: Add irq_gpio field to struct i2c_client.
From: Stephen Warren <hidden>
Date: 2011-09-02 15:31:14
Also in:
linux-i2c, linux-iio, lkml
From: Stephen Warren <hidden>
Date: 2011-09-02 15:31:14
Also in:
linux-i2c, linux-iio, lkml
Jonathan Cameron wrote at Friday, September 02, 2011 2:48 AM:
On 09/01/11 17:52, Stephen Warren wrote:quoted
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