Re: [RFC] GPIO API changes
Vinicius Costa Gomes
Tomasz Bursztyka <tomasz.bursztyka(a)linux.intel.com> writes:
a way to have the callback called with the pins expressed in a bitmask,
now the same behaviour can be achieved by running
'_pin_enable_callback(port, 0xffffffff)'. Just saying that, with the new
API, '_port_enable_callback()' adds little value.
Cheers,
--
Vinicius
Hi Vinicius,I am just wondering that in the "old" API '_port_enable_callback()' wasAnother issue of the current API is the confusion caused bygpio_port_callback() make the callback called, whatever pins is
'gpio_port_enable_callback()' and 'gpio_pin_enable_callback()'.
With the changes proposed later in this thread, you could have a
unified call:
'gpio_enable_callback(struct device *port, uint32_t pinmask)' (or something like it)
triggering the interrupt and enabled or not (callback wise).
So they are different (documentation could be better though)
a way to have the callback called with the pins expressed in a bitmask,
now the same behaviour can be achieved by running
'_pin_enable_callback(port, 0xffffffff)'. Just saying that, with the new
API, '_port_enable_callback()' adds little value.
gpio_dw.c implementation is awkward however: I don't think it should by
default enable the int on pin 0.
Tomasz
Cheers,
--
Vinicius