linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hid-rmi: configuration automatically changed after suspend/resume
@ 2015-07-06 10:20 Gabriele Mazzotta
  2015-07-06 23:47 ` Andrew Duggan
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriele Mazzotta @ 2015-07-06 10:20 UTC (permalink / raw)
  Cc: linux-input, aduggan, benjamin.tissoires, jkosina

Hi,

I recently noticed that there's a minor issue with hid-rmi.c. After a
suspend/resume cycle the f11 control register is set to the default
configuration, thus undoing the changes performed on init.

I made some changes to the driver to prevent this from happening: the
configuration is saved on suspend and restored upon resume. This seemed
the simplest thing to do, but I encountered a small problem.

I'm saving and writing the whole register since the kernel can't know
what userspace tools might have done. According to a comment in the
sources, some firmwares split the control register, so blindly copying
and writing 20 sequential bytes as I'm doing could be a problem.

Is there a way to recognize those firmwares? Or even better, is there a
way to prevent the firmware from restoring the default configuration?

PS: I didn't check if the same happens with other registers, but I
suspenct it does.

Thanks,
Gabriele

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-07 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 10:20 hid-rmi: configuration automatically changed after suspend/resume Gabriele Mazzotta
2015-07-06 23:47 ` Andrew Duggan
2015-07-07 10:01   ` Gabriele Mazzotta
2015-07-07 14:45     ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).