Write shared touch initial status only once
Subsystems (3)
PATCH 1/2 Write shared touch initial status only once
From: Ping Cheng <[email protected]>
To match the same logic as with other shared data during registeration, use WRITE_ONCE for is_touch_on too.
--- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/wacom_sys.c +1 -1
@@ -2386,7 +2386,7 @@ static void wacom_set_shared_values(struct wacom_wac *wacom_wac)* match historic default. */ if (wacom_wac->is_soft_touch_switch) - wacom_wac->shared->is_touch_on = true; +WRITE_ONCE (wacom_wac->shared->is_touch_on, true); }if (wacom_wac->features.device_type &WACOM_DEVICETYPE_TOUCH ) {
Signature · 1 line
2.55.0
Hi Lee,
Do you have any questions about my patches, especially this first one? I added it to make the assignment consistent with your patch. Since the is_soft_touch_switch can only be set by pad, we would only get to this assignment once. It won't be assigned more than once with the current firmware logic. If you don't see an issue with the patch, can you give it an acked-by?
The second patch adds the softkey touch switch back, which is important. I hope my fix can be merged upstream along with your patchset. Otherwise we break userland.
Thank you,
Ping
Quoted 28 lines · Ping Cheng
From: Ping Cheng <[email protected]>
To match the same logic as with other shared data during registeration, use
WRITE_ONCEforis_touch_ontoo.Signed-off-by Ping Cheng <[email protected]>--- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/wacom_sys.c +1
-2@@ -2386,7 +2386,7 @@ static void wacom_set_shared_values(struct wacom_wac *wacom_wac)* match historic default. */ if (wacom_wac->is_soft_touch_switch) - wacom_wac->shared->is_touch_on = true; +WRITE_ONCE (wacom_wac->shared->is_touch_on, true); }if (wacom_wac->features.device_type &WACOM_DEVICETYPE_TOUCH ) { --2.55.0
Lee Jones
Reviewed-byQuoted 10 lines
Do you have any questions about my patches, especially this first one? I added it to make the assignment consistent with your patch. Since the
is_soft_touch_switchcan only be set by pad, we would only get to this assignment once. It won't be assigned more than once with the current firmware logic. If you don't see an issue with the patch, can you give it an acked-by?The second patch adds the softkey touch switch back, which is important. I hope my fix can be merged upstream along with your patchset. Otherwise we break userland.
Honestly, you know this driver much better than I do.
The change looks sound to my uninformed eyes though.
Bear in mind that the subject line does not match the style expected of the subsystem - or anywhere else for that matter. =:-)
Quoted 5 lines · Ping Cheng
Quoted 4 lines
From: Ping Cheng <[email protected]>
To match the same logic as with other shared data during registeration,
Spell check.
Quoted 3 lines
Quoted 3 lines
use
WRITE_ONCEforis_touch_ontoo.
Fixes:
With those fixed:
Quoted 21 lines
Quoted 21 lines
Signed-off-by Ping Cheng <[email protected]>--- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/wacom_sys.c +1
-2@@ -2386,7 +2386,7 @@ static void wacom_set_shared_values(struct wacom_wac *wacom_wac)* match historic default. */ if (wacom_wac->is_soft_touch_switch) - wacom_wac->shared->is_touch_on = true; +WRITE_ONCE (wacom_wac->shared->is_touch_on, true); }if (wacom_wac->features.device_type &WACOM_DEVICETYPE_TOUCH ) { --2.55.0
Signature · 1 line
Lee Jones
Quoted 12 lines · Lee Jones
Quoted 11 lines
Do you have any questions about my patches, especially this first one? I added it to make the assignment consistent with your patch. Since the
is_soft_touch_switchcan only be set by pad, we would only get to this assignment once. It won't be assigned more than once with the current firmware logic. If you don't see an issue with the patch, can you give it an acked-by?The second patch adds the softkey touch switch back, which is important. I hope my fix can be merged upstream along with your patchset. Otherwise we break userland.
Quoted 6 lines
Honestly, you know this driver much better than I do.
The change looks sound to my uninformed eyes though.
Bear in mind that the subject line does not match the style expected of the subsystem - or anywhere else for that matter. =:-)
I was so eager to get the patches out...
Quoted 10 lines
Quoted 5 lines · Ping Cheng
Quoted 4 lines
From: Ping Cheng <[email protected]>
To match the same logic as with other shared data during registeration,
Spell check.
Quoted 2 lines
Quoted 2 lines
use
WRITE_ONCEforis_touch_ontoo.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Fixes:
With those fixed:
Reviewed-by Lee Jones <[email protected]>
Thanks for the review. A second set of eyes are always helpful.
Cheers,
Ping
Quoted 24 lines
Quoted 17 lines
Quoted 17 lines
Signed-off-by Ping Cheng <[email protected]>--- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/wacom_sys.c +1
-1@@ -2386,7 +2386,7 @@ static void wacom_set_shared_values(struct wacom_wac *wacom_wac)* match historic default. */ if (wacom_wac->is_soft_touch_switch) - wacom_wac->shared->is_touch_on = true; +WRITE_ONCE (wacom_wac->shared->is_touch_on, true); }Quoted 4 lines
Quoted 4 lines
drivers/hid/wacom_sys.c +0
-1if (wacom_wac->features.device_type &WACOM_DEVICETYPE_TOUCH ) { --2.55.0
--
Lee Jones