pkarashchenko commented on a change in pull request #5624: URL: https://github.com/apache/incubator-nuttx/pull/5624#discussion_r817603333
########## File path: drivers/input/ajoystick.c ########## @@ -722,6 +720,19 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, opriv->ao_fds[i] = fds; fds->priv = &opriv->ao_fds[i]; + + /* Report if the event is pending */ + + if (opriv->ao_pollpending) + { + fds->revents |= (fds->events & POLLIN); + if (fds->revents != 0) + { + iinfo("Report events: %02x\n", fds->revents); + nxsem_post(fds->sem); Review comment: What about notification logic? This is still not answered. In `touch_poll` we have: ``` for (i = 0; i < CONFIG_INPUT_TOUCHSCREEN_NPOLLWAITERS; i++) { if (NULL == upper->fds[i]) { upper->fds[i] = fds; fds->priv = &upper->fds[i]; break; } } ... if (eventset) { touch_notify(upper, eventset); } ``` and `touch_notify` iterates `for (i = 0; i < CONFIG_INPUT_TOUCHSCREEN_NPOLLWAITERS; i++)` again, With this logic we just notify until the first free entry met. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org