[lkml]   [2011]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: [PATCH V2 1/4] i2c: Add irq_gpio field to struct i2c_client.
    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?


     \ /
      Last update: 2011-09-02 17:33    [W:0.020 / U:77.820 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site