* [PATCH 1/2] Write shared touch initial status only once
@ 2026-09-16 2:03 Ping Cheng
2026-09-21 17:54 ` Ping Cheng
0 siblings, 1 reply; 4+ messages in thread
From: Ping Cheng @ 2026-09-16 2:03 UTC (permalink / raw)
To: lee, jikos, bentiss, linux-input; +Cc: stable, Ping Cheng
From: Ping Cheng <ping.cheng@wacom.com>
To match the same logic as with other shared data during registeration,
use WRITE_ONCE for is_touch_on too.
Cc: stable@vger.kernel.org
Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
---
drivers/hid/wacom_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 8dc7aa1c0a26..33fa491fba92 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] Write shared touch initial status only once
2026-09-16 2:03 [PATCH 1/2] Write shared touch initial status only once Ping Cheng
@ 2026-09-21 17:54 ` Ping Cheng
2026-09-22 7:31 ` Lee Jones
0 siblings, 1 reply; 4+ messages in thread
From: Ping Cheng @ 2026-09-21 17:54 UTC (permalink / raw)
To: lee, jikos, bentiss, linux-input; +Cc: stable, Ping Cheng, Jason Gerecke
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
On Tue, Sep 15, 2026 at 7:03 PM Ping Cheng <pinglinux@gmail.com> wrote:
>
> From: Ping Cheng <ping.cheng@wacom.com>
>
> To match the same logic as with other shared data during registeration,
> use WRITE_ONCE for is_touch_on too.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> ---
> drivers/hid/wacom_sys.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 8dc7aa1c0a26..33fa491fba92 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] Write shared touch initial status only once
2026-09-21 17:54 ` Ping Cheng
@ 2026-09-22 7:31 ` Lee Jones
2026-09-22 21:16 ` Ping Cheng
0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2026-09-22 7:31 UTC (permalink / raw)
To: Ping Cheng; +Cc: jikos, bentiss, linux-input, stable, Ping Cheng, Jason Gerecke
> 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.
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. =:-)
> On Tue, Sep 15, 2026 at 7:03 PM Ping Cheng <pinglinux@gmail.com> wrote:
> >
> > From: Ping Cheng <ping.cheng@wacom.com>
> >
> > To match the same logic as with other shared data during registeration,
Spell check.
> > use WRITE_ONCE for is_touch_on too.
> >
> > Cc: stable@vger.kernel.org
Fixes:
With those fixed:
Reviewed-by: Lee Jones <lee@kernel.org>
> > Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> > ---
> > drivers/hid/wacom_sys.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> > index 8dc7aa1c0a26..33fa491fba92 100644
> > --- a/drivers/hid/wacom_sys.c
> > +++ b/drivers/hid/wacom_sys.c
> > @@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] Write shared touch initial status only once
2026-09-22 7:31 ` Lee Jones
@ 2026-09-22 21:16 ` Ping Cheng
0 siblings, 0 replies; 4+ messages in thread
From: Ping Cheng @ 2026-09-22 21:16 UTC (permalink / raw)
To: Lee Jones; +Cc: jikos, bentiss, linux-input, stable, Ping Cheng, Jason Gerecke
On Tue, Sep 22, 2026 at 12:31 AM Lee Jones <lee@kernel.org> wrote:
>
> > 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.
>
> 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...
> > On Tue, Sep 15, 2026 at 7:03 PM Ping Cheng <pinglinux@gmail.com> wrote:
> > >
> > > From: Ping Cheng <ping.cheng@wacom.com>
> > >
> > > To match the same logic as with other shared data during registeration,
>
> Spell check.
>
> > > use WRITE_ONCE for is_touch_on too.
> > >
> > > Cc: stable@vger.kernel.org
>
> Fixes:
>
> With those fixed:
>
> Reviewed-by: Lee Jones <lee@kernel.org>
Thanks for the review. A second set of eyes are always helpful.
Cheers,
Ping
> > > Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> > > ---
> > > drivers/hid/wacom_sys.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> > > index 8dc7aa1c0a26..33fa491fba92 100644
> > > --- a/drivers/hid/wacom_sys.c
> > > +++ b/drivers/hid/wacom_sys.c
> > > @@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-22 21:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 2:03 [PATCH 1/2] Write shared touch initial status only once Ping Cheng
2026-09-21 17:54 ` Ping Cheng
2026-09-22 7:31 ` Lee Jones
2026-09-22 21:16 ` Ping Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox