analogdevicesinc / no-OS

Software drivers in C for systems without an operating system
http://analogdevicesinc.github.io/no-OS/
Other
927 stars 1.65k forks source link

drivers: platform: maxim: Simplify irq_register_callback #2131

Closed CiprianRegus closed 6 months ago

CiprianRegus commented 6 months ago

Pull Request Description

Currently max_irq_register_callback() explicitly uses an event name instead of callback_desc->event for no reason. This results in having to repeat the create/update callback list seqence for each event type. Fix this by accesing callback_desc->event instead.

Also, in case we already have an action registered, make sure the MCU specific configuration successfully completes before updating the action.

PR Type

PR Checklist