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

os/driver/input/ist415: Change to power off when touch disabling #6697

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

ewoodev
Copy link
Contributor

@ewoodev ewoodev commented Feb 25, 2025

Change to tunr off ist415 power when touch is disabled from apps for reduce power consumption.

@IMJuBBang
Copy link

Please add the ist415_forced_release function when you turn off the ist415 power.

@@ -568,6 +573,11 @@ static int ist415_resume_device(struct touchscreen_s *upper)
ASSERT(get_errno() == EINTR);
}

if (dev->forcedoff) {
sem_post(&dev->sem);
return EPERM;
Copy link
Contributor

Choose a reason for hiding this comment

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

EPERM is tightly related to permission, so I think ESHUTDOWN or ENXIO is good for this situation, I prefer ESHUTDOWN

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for suggestion. Updated


if (dev->forcedoff) {
ist415_power_off(dev);
} else if (dev->suspend) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if both of forceoff & suspend never set as true, I think you can define enum regarding state and use dev->state instead of these 3 states.

Change to tunr off ist415 power when touch is disabled from apps
for reduce power consumption.

Signed-off-by: eunwoo.nam <[email protected]>
@@ -568,6 +573,11 @@ static int ist415_resume_device(struct touchscreen_s *upper)
ASSERT(get_errno() == EINTR);
}

if (dev->forcedoff) {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about checking this at start of the function? Then, you don't need to take the sem.

@@ -534,6 +534,11 @@ static int ist415_suspend_device(struct touchscreen_s *upper)
ASSERT(get_errno() == EINTR);
}

if (dev->forcedoff) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as previous

@sunghan-chang sunghan-chang merged commit b2942f8 into Samsung:master Feb 26, 2025
11 checks passed
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.

4 participants