Re: [PATCH 3/3] synaptics: Change min/max quirk table to pnp-id matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 16, 2014 at 08:46:49PM +0200, Hans de Goede wrote:
> Most of the affected models share pnp-ids for the touchpad. So switching
> to pnp-ids give us 2 advantages:
> 1) It shrinks the quirk list
> 2) It will lower the new quirk addition frequency, ie the recently added W540
>    quirk would not have been necessary since it uses the same LEN0034 pnp ids
>    as other models already added before it
> 
> As an added bonus it actually puts the quirk on the actual psmouse, rather then
> on the machine, which is technically more correct.
> 
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  drivers/input/mouse/synaptics.c | 149 ++++++++++------------------------------
>  1 file changed, 36 insertions(+), 113 deletions(-)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 395ec9c..c5ec703 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -117,6 +117,31 @@ void synaptics_reset(struct psmouse *psmouse)
>  }
>  
>  #ifdef CONFIG_MOUSE_PS2_SYNAPTICS
> +struct min_max_quirk {
> +	const char * const *pnp_ids;
> +	int x_min, x_max, y_min, y_max;
> +};


Why don't we define this as 1 quirk per PNP id?

struct min_max_quirk {
	const char *pnp_id;
	int x_min, x_max, y_min, y_max;
};

?

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux