On Mon, Nov 20, 2023 at 02:17:34PM +0000, Maciej Strozek wrote:
+ if (to_poll == &cs43130->xtal_rdy) {
+ offset = 0;
+ flag = CS43130_XTAL_RDY_INT;
+ } else if (to_poll == &cs43130->pll_rdy) {
+ offset = 0;
+ flag = CS43130_PLL_RDY_INT;
+ } else if (to_poll == &cs43130->hpload_evt) {
+ offset = 3;
+ flag = CS43130_HPLOAD_NO_DC_INT | CS43130_HPLOAD_UNPLUG_INT |
+ CS43130_HPLOAD_OOR_INT | CS43130_HPLOAD_AC_INT |
+ CS43130_HPLOAD_DC_INT | CS43130_HPLOAD_ON_INT |
+ CS43130_HPLOAD_OFF_INT;
+ } else {
+ return 0;
+ }
Is it a bug to call this function without to_poll set to something
known? This will just silently ignore it which seems wrong and is
inconsitent with the handling in the interrupt case which will wait for
the the completion to be signalled and report a timeout on error.