linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: psmouse - cleanup Focaltech code
@ 2016-10-08 10:38 Dmitry Tunin
  2016-10-17 17:27 ` Mathias Gottschlag
  2016-10-24 23:35 ` Dmitry Torokhov
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Tunin @ 2016-10-08 10:38 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-input, linux-kernel, Mathias Gottschlag, Dmitry Tunin

psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long as
"FocaltechPS/2 Focaltech Focaltech Touchpad"

In focaltech_report_state() pointer to psmouse->dev is already stored as *dev

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
---
 drivers/input/mouse/focaltech.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c
index c8c6a8c..49a56f655 100644
--- a/drivers/input/mouse/focaltech.c
+++ b/drivers/input/mouse/focaltech.c
@@ -43,7 +43,7 @@ int focaltech_detect(struct psmouse *psmouse, bool set_properties)
 
 	if (set_properties) {
 		psmouse->vendor = "FocalTech";
-		psmouse->name = "FocalTech Touchpad";
+		psmouse->name = "Touchpad";
 	}
 
 	return 0;
@@ -146,8 +146,8 @@ static void focaltech_report_state(struct psmouse *psmouse)
 	}
 	input_mt_report_pointer_emulation(dev, true);
 
-	input_report_key(psmouse->dev, BTN_LEFT, state->pressed);
-	input_sync(psmouse->dev);
+	input_report_key(dev, BTN_LEFT, state->pressed);
+	input_sync(dev);
 }
 
 static void focaltech_process_touch_packet(struct psmouse *psmouse,
-- 
2.7.4

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

* Re: [PATCH] Input: psmouse - cleanup Focaltech code
  2016-10-08 10:38 [PATCH] Input: psmouse - cleanup Focaltech code Dmitry Tunin
@ 2016-10-17 17:27 ` Mathias Gottschlag
  2016-10-17 17:33   ` Dmitry Tunin
  2016-10-24 23:35 ` Dmitry Torokhov
  1 sibling, 1 reply; 4+ messages in thread
From: Mathias Gottschlag @ 2016-10-17 17:27 UTC (permalink / raw)
  To: Dmitry Tunin, Dmitry Torokhov; +Cc: linux-input, linux-kernel

The changes look good to me. However, what wording do other drivers use?
I've seen "TouchPad" with a capital P before. If this patch breaks
scripts searching for that string anyways, that's an opportunity to
unify the capitalization there. It probably doesn't matter, though... I
don't see a problem with this patch.

I can't test it because I no longer have the hardware.

Am 08.10.2016 um 12:38 schrieb Dmitry Tunin:
> psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long as
> "FocaltechPS/2 Focaltech Focaltech Touchpad"
>
> In focaltech_report_state() pointer to psmouse->dev is already stored as *dev
>
> Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
> ---
>  drivers/input/mouse/focaltech.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c
> index c8c6a8c..49a56f655 100644
> --- a/drivers/input/mouse/focaltech.c
> +++ b/drivers/input/mouse/focaltech.c
> @@ -43,7 +43,7 @@ int focaltech_detect(struct psmouse *psmouse, bool set_properties)
>  
>  	if (set_properties) {
>  		psmouse->vendor = "FocalTech";
> -		psmouse->name = "FocalTech Touchpad";
> +		psmouse->name = "Touchpad";
>  	}
>  
>  	return 0;
> @@ -146,8 +146,8 @@ static void focaltech_report_state(struct psmouse *psmouse)
>  	}
>  	input_mt_report_pointer_emulation(dev, true);
>  
> -	input_report_key(psmouse->dev, BTN_LEFT, state->pressed);
> -	input_sync(psmouse->dev);
> +	input_report_key(dev, BTN_LEFT, state->pressed);
> +	input_sync(dev);
>  }
>  
>  static void focaltech_process_touch_packet(struct psmouse *psmouse,

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

* Re: [PATCH] Input: psmouse - cleanup Focaltech code
  2016-10-17 17:27 ` Mathias Gottschlag
@ 2016-10-17 17:33   ` Dmitry Tunin
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Tunin @ 2016-10-17 17:33 UTC (permalink / raw)
  To: Mathias Gottschlag; +Cc: Dmitry Torokhov, linux-input, linux-kernel

Other drivers, like Synaptics use the same as I suggested. They even
shorten in psmouse-base.c psmouse_protocol.name to SynPS/2.
You used FocaltechPS/2. I think it is OK.

I do not think it is a big problem of changing the naming. It happens a lot.

I still have the hardware and I am still thankful to you that you
wrote that driver.

Now I am trying to write my own for a new i2c touchpad that is used in
new Asus laptops ;-)

2016-10-17 20:27 GMT+03:00 Mathias Gottschlag <mgottschlag@gmail.com>:
> The changes look good to me. However, what wording do other drivers use?
> I've seen "TouchPad" with a capital P before. If this patch breaks
> scripts searching for that string anyways, that's an opportunity to
> unify the capitalization there. It probably doesn't matter, though... I
> don't see a problem with this patch.
>
> I can't test it because I no longer have the hardware.
>
> Am 08.10.2016 um 12:38 schrieb Dmitry Tunin:
>> psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long as
>> "FocaltechPS/2 Focaltech Focaltech Touchpad"
>>
>> In focaltech_report_state() pointer to psmouse->dev is already stored as *dev
>>
>> Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
>> ---
>>  drivers/input/mouse/focaltech.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c
>> index c8c6a8c..49a56f655 100644
>> --- a/drivers/input/mouse/focaltech.c
>> +++ b/drivers/input/mouse/focaltech.c
>> @@ -43,7 +43,7 @@ int focaltech_detect(struct psmouse *psmouse, bool set_properties)
>>
>>       if (set_properties) {
>>               psmouse->vendor = "FocalTech";
>> -             psmouse->name = "FocalTech Touchpad";
>> +             psmouse->name = "Touchpad";
>>       }
>>
>>       return 0;
>> @@ -146,8 +146,8 @@ static void focaltech_report_state(struct psmouse *psmouse)
>>       }
>>       input_mt_report_pointer_emulation(dev, true);
>>
>> -     input_report_key(psmouse->dev, BTN_LEFT, state->pressed);
>> -     input_sync(psmouse->dev);
>> +     input_report_key(dev, BTN_LEFT, state->pressed);
>> +     input_sync(dev);
>>  }
>>
>>  static void focaltech_process_touch_packet(struct psmouse *psmouse,
>
>

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

* Re: [PATCH] Input: psmouse - cleanup Focaltech code
  2016-10-08 10:38 [PATCH] Input: psmouse - cleanup Focaltech code Dmitry Tunin
  2016-10-17 17:27 ` Mathias Gottschlag
@ 2016-10-24 23:35 ` Dmitry Torokhov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2016-10-24 23:35 UTC (permalink / raw)
  To: Dmitry Tunin; +Cc: linux-input, linux-kernel, Mathias Gottschlag

On Sat, Oct 08, 2016 at 01:38:56PM +0300, Dmitry Tunin wrote:
> psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long as
> "FocaltechPS/2 Focaltech Focaltech Touchpad"
> 
> In focaltech_report_state() pointer to psmouse->dev is already stored as *dev
> 
> Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>

Applied, thank you.

> ---
>  drivers/input/mouse/focaltech.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c
> index c8c6a8c..49a56f655 100644
> --- a/drivers/input/mouse/focaltech.c
> +++ b/drivers/input/mouse/focaltech.c
> @@ -43,7 +43,7 @@ int focaltech_detect(struct psmouse *psmouse, bool set_properties)
>  
>  	if (set_properties) {
>  		psmouse->vendor = "FocalTech";
> -		psmouse->name = "FocalTech Touchpad";
> +		psmouse->name = "Touchpad";
>  	}
>  
>  	return 0;
> @@ -146,8 +146,8 @@ static void focaltech_report_state(struct psmouse *psmouse)
>  	}
>  	input_mt_report_pointer_emulation(dev, true);
>  
> -	input_report_key(psmouse->dev, BTN_LEFT, state->pressed);
> -	input_sync(psmouse->dev);
> +	input_report_key(dev, BTN_LEFT, state->pressed);
> +	input_sync(dev);
>  }
>  
>  static void focaltech_process_touch_packet(struct psmouse *psmouse,
> -- 
> 2.7.4
> 

-- 
Dmitry

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

end of thread, other threads:[~2016-10-24 23:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-08 10:38 [PATCH] Input: psmouse - cleanup Focaltech code Dmitry Tunin
2016-10-17 17:27 ` Mathias Gottschlag
2016-10-17 17:33   ` Dmitry Tunin
2016-10-24 23:35 ` Dmitry Torokhov

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).