Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-10 Thread Henrique de Moraes Holschuh
On Wed, 09 Dec 2009, Dmitry Torokhov wrote: Still, please look at the patch below... Would something like this be a cleaner API? It is certainly more obvious, and it is cleaner on the driver side (one function call does everything, instead of a call to input_set_capability plus a call to

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-10 Thread Dmitry Torokhov
On Thu, Dec 10, 2009 at 11:19:18AM -0200, Henrique de Moraes Holschuh wrote: On Wed, 09 Dec 2009, Dmitry Torokhov wrote: Still, please look at the patch below... Would something like this be a cleaner API? It is certainly more obvious, and it is cleaner on the driver side (one

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-10 Thread Henrique de Moraes Holschuh
On Thu, 10 Dec 2009, Dmitry Torokhov wrote: Right, input_set_abs_params()... No, I don't really want to go through all touchpad, touchscreen and joystick drivers at once, thank you vey much ;) Besides, for the vast majority of uses 0 is the proper initial value for absolute axis. Heh. The

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-10 Thread Dmitry Torokhov
On Thu, Dec 10, 2009 at 10:46:02PM -0200, Henrique de Moraes Holschuh wrote: On Thu, 10 Dec 2009, Dmitry Torokhov wrote: Right, input_set_abs_params()... No, I don't really want to go through all touchpad, touchscreen and joystick drivers at once, thank you vey much ;) Besides, for the vast

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-09 Thread Henrique de Moraes Holschuh
On Tue, 08 Dec 2009, Dmitry Torokhov wrote: On Tuesday 08 December 2009 05:36:30 pm Henrique de Moraes Holschuh wrote: Before we register the input device, sync the input layer EV_SW state directly by setting the bitmaps, to avoid issuing a gratuitous event for the initial state of these

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-09 Thread Dmitry Torokhov
On Wed, Dec 09, 2009 at 02:30:41PM -0200, Henrique de Moraes Holschuh wrote: On Tue, 08 Dec 2009, Dmitry Torokhov wrote: On Tuesday 08 December 2009 05:36:30 pm Henrique de Moraes Holschuh wrote: Before we register the input device, sync the input layer EV_SW state directly by setting the

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-09 Thread Henrique de Moraes Holschuh
On Wed, 09 Dec 2009, Dmitry Torokhov wrote: input_report_switch() will call input_event(), which will have a 50% chance of doing the wrong thing at startup (i.e. issue an event) since it will look at the state of the sw bitmap to decide whether to issue an event or not. It will not

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-09 Thread Dmitry Torokhov
On Wed, Dec 09, 2009 at 06:32:01PM -0200, Henrique de Moraes Holschuh wrote: On Wed, 09 Dec 2009, Dmitry Torokhov wrote: input_report_switch() will call input_event(), which will have a 50% chance of doing the wrong thing at startup (i.e. issue an event) since it will look at the

[ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-08 Thread Henrique de Moraes Holschuh
Before we register the input device, sync the input layer EV_SW state directly by setting the bitmaps, to avoid issuing a gratuitous event for the initial state of these switches. I will propose a clean input layer API for this and change the driver to use it later, but I'd rather get the driver

Re: [ibm-acpi-devel] [PATCH 10/10] thinkpad-acpi: sync input device EV_SW state directly

2009-12-08 Thread Dmitry Torokhov
On Tuesday 08 December 2009 05:36:30 pm Henrique de Moraes Holschuh wrote: Before we register the input device, sync the input layer EV_SW state directly by setting the bitmaps, to avoid issuing a gratuitous event for the initial state of these switches. I will propose a clean input layer