-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[TOPIC-GPIO] Handle logical interrupt setting in common layer #19248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
2ef5b24 to
abcb2ed
Compare
abcb2ed to
afffe19
Compare
|
Handling of interrupt logical levels directly in the This part would not be visible in the public API, i.e. it wouldn't have public doxygen documentation. This approach has also potential of making #19251 redundant. One - temporary - drawback of the proposal is that the |
afffe19 to
a0c0a01
Compare
If we go done this path I would suggest a single enum rather than having to deal with invalid combinations of gpio_int_mode & gpio_int_trigger. Unfortunately this would mean a conversion between the existing flags and |
I'm not sure about this one. We would need then to decode the enum in the driver. That's going to be a lot of if statements (we shouldn't treat enum as a flag value anymore). The driver code has only a few decision it needs to take: should I enable/disable interrupts. If I should enable interrupts should it be level or edge. If it's edge or level, should it be falling/low, rising/high or both. In the hardware information about falling/low and rising/high trigger is often configured using the same register bits. The two argument approach will result in a smaller code size. Also, the only invalid combination is level interrupt and trigger on both edges. If we are concern about scenario |
a0c0a01 to
5f5b392
Compare
|
I didn't update |
5f5b392 to
197770b
Compare
Move handling of logical flag support into gpio_pin_configure and gpio_pin_interrupt_configure. This way drivers don't need to know anything about logical levels. Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Piotr Mienkowski <[email protected]>
Remove handling for GPIO_INT_LEVELS_LOGICAL in driver now that we do that in gpio_pin_interrupt_configure and gpio_pin_configure. Signed-off-by: Kumar Gala <[email protected]>
Remove handling for GPIO_INT_LEVELS_LOGICAL in driver now that we do that in gpio_pin_interrupt_configure and gpio_pin_configure. Signed-off-by: Kumar Gala <[email protected]>
Remove handling for GPIO_INT_LEVELS_LOGICAL in driver now that we do that in gpio_pin_interrupt_configure and gpio_pin_configure. Signed-off-by: Kumar Gala <[email protected]>
Remove handling for GPIO_INT_LEVELS_LOGICAL in driver now that we do that in gpio_pin_interrupt_configure and gpio_pin_configure. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
Add gpio_driver_data as the first element in the driver data as the gpio core expects this. Signed-off-by: Kumar Gala <[email protected]>
ff44009 to
32752f7
Compare
Move handling of inverting of flags for gpio_pin_interrupt_configure to common code so drivers don't have to do it.