This is an automated email from the ASF dual-hosted git repository. jiuzhudong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ae85903f71d9b0f0aac62f93f5910fb5c4760606 Author: dongjiuzhu1 <[email protected]> AuthorDate: Thu May 15 12:30:49 2025 +0800 drivers/sensors: wakeup mode optimization. set nonwakeup mode as initialize state. Signed-off-by: dongjiuzhu1 <[email protected]> --- drivers/sensors/sensor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c index 2b2079d45c2..9c54f12095c 100644 --- a/drivers/sensors/sensor.c +++ b/drivers/sensors/sensor.c @@ -750,9 +750,9 @@ static int sensor_open(FAR struct file *filep) user->state.interval = UINT32_MAX; user->state.esize = upper->state.esize; + user->state.nonwakeup = true; nxsem_init(&user->buffersem, 0, 0); list_add_tail(&upper->userlist, &user->node); - sensor_update_nonwakeup(filep, upper, user, true); /* The new user generation, notify to other users */ @@ -1415,6 +1415,7 @@ int sensor_custom_register(FAR struct sensor_lowerhalf_s *lower, list_initialize(&upper->userlist); upper->state.esize = esize; upper->state.min_interval = UINT32_MAX; + upper->state.nonwakeup = true; if (lower->ops->activate) { upper->state.nadvertisers = 1;
