Skip to content
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

Add touch ic suspend feature #6618

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ewoodev
Copy link
Contributor

@ewoodev ewoodev commented Jan 7, 2025

No description provided.

os/drivers/input/ist415.c Outdated Show resolved Hide resolved
apps/examples/touchscreen/touchscreen_main.c Outdated Show resolved Hide resolved
@ewoodev ewoodev force-pushed the WORK-250107_ist415_knock_knock branch 3 times, most recently from 69bed5a to 3a87156 Compare January 9, 2025 06:22
}

if (ioctl(fd, TSIOC_SUSPEND, NULL) != OK) {
printf("Fail to TSIOC_SUSPEND %s, errno:%d\n", TOUCH_DEV_PATH, get_errno());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the ioctl is failed, it also returns OK. Is this ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -196,10 +229,14 @@ int touchscreen_main(int argc, char *argv[])
}

if (argc == 2) {
if (!strcmp(argv[1], "start")) {
if (!strncmp(argv[1], "start", 5)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will allow "touchscreen startaaa". Is this ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The svace is detecting it. so i changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I missed updersdanding, i got your point, I changed len

@@ -503,14 +523,18 @@ static void ist415_stop_device(struct ist415_dev_s *dev)
ist415_disable(dev);
ist415_power_off(dev);
}

return OK;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you let me know why you change the return type even this returns OK always?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ops in touchscreen, so some touch ic might have return fail

The touch device suspend feature is changing power mode to low power mode.

In the low power mode, power comsumption is reduced and touch irq is not comming.
But ist415 ic is checking double tap during low power mode, and it notify to apps the double tab event.

In this commit, Add ioctl to control touch ic suspend/resume and example app

Signed-off-by: eunwoo.nam <[email protected]>
In the ist415_forced_release function data.npoints can be 0.
(There is no pushed touch point)

But, since touch is reported even if touch point count is 0.

Therefore, fix wrong null touch event

Signed-off-by: eunwoo.nam <[email protected]>
@ewoodev ewoodev force-pushed the WORK-250107_ist415_knock_knock branch from 3a87156 to a1a5bfe Compare January 17, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants