Chris Johns commented on a discussion on cpukit/include/dev/gpio/gpio.h: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159826

 > + *
 > + * The pin must already be configured with a trigger other than
 > + * #RTEMS_GPIO_TRIGGER_NONE.
 > + *
 > + * @param fd is the descriptor for the controller's device node.
 > + *
 > + * @param pin is the logical pin whose interrupt to deliver.
 > + *
 > + * @param handler is the handler to call.
 > + *
 > + * @param arg is the argument to pass to the handler.
 > + *
 > + * @retval 0 Successful operation.
 > + * @retval -1 An error occurred.  The errno is set to indicate the error.
 > + */
 > +int rtems_gpio_pin_irq_enable(int fd, uint32_t pin,

I would assume the hardware has a means to add the peripheral such as a bus or 
connector of some type? Would the BSP support for that interface already know 
how to deal with interrupts for the bus?

Can multiple interrupt handlers be delegated to a handler designed to service a 
number of users of the pin? Maybe that would be better because we do not need 
to add the extra code and complexity to the drivers for this specific case?

I can see a use case of an [I2C IO device 
](https://www.nxp.com/products/interfaces/ic-spi-i3c-interface-devices/general-purpose-i-o-gpio/8-bit-ic-bus-and-smbus-low-power-i-o-port-with-interrupt-and-reset:PCA9538)with
 interrupt support being wired to a GPIO pin and this API being used. The code 
would have a thread blocked on a GPIO pin wired to the interrupt pin of the IO 
device and when it wakes reads the I2C inputs. I see this as a case of a GPIO 
pin that supports interrupts rather than pushing this API into or under the 
interrupt API.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1499#note_159826
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-7p914q3ragufa6vmea8kza7wl-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to