Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1445064 > unrolled thread
| Started by | Pavel Machek <pavel@ucw.cz> |
|---|---|
| First post | 2016-07-17 20:00 +0200 |
| Last post | 2016-07-25 17:00 +0200 |
| Articles | 20 on this page of 42 — 6 participants |
Back to article view | Back to linux.kernel
v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-17 20:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-17 20:30 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-17 20:50 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-17 21:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-17 22:10 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-18 01:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 02:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-20 02:40 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 03:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-20 03:40 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 03:50 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-20 04:10 +0200
[PATCH] Input: tsc200x - Report proper input_dev name Michael Welling <mwelling@ieee.org> - 2016-07-20 06:00 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Pavel Machek <pavel@ucw.cz> - 2016-07-20 08:40 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Pavel Machek <pavel@ucw.cz> - 2016-07-20 09:00 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Michael Welling <mwelling@ieee.org> - 2016-07-20 09:10 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Pavel Machek <pavel@ucw.cz> - 2016-07-20 09:50 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 18:50 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Pali Rohár <pali.rohar@gmail.com> - 2016-07-20 19:00 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 19:10 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 19:20 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Pavel Machek <pavel@ucw.cz> - 2016-07-20 22:30 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Pali Rohár <pali.rohar@gmail.com> - 2016-07-20 22:40 +0200
Re: [PATCH] Input: tsc200x - Report proper input_dev name Michael Welling <mwelling@ieee.org> - 2016-07-20 09:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pali Rohár <pali.rohar@gmail.com> - 2016-07-20 18:40 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Aaro Koskinen <aaro.koskinen@iki.fi> - 2016-07-20 03:30 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Michael Welling <mwelling@ieee.org> - 2016-07-20 04:20 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-20 08:30 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-20 18:30 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-20 22:30 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Peter Hutterer <peter.hutterer@who-t.net> - 2016-07-20 23:50 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-21 00:30 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Peter Hutterer <peter.hutterer@who-t.net> - 2016-07-21 01:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-21 08:40 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Peter Hutterer <peter.hutterer@who-t.net> - 2016-07-21 08:50 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pavel Machek <pavel@ucw.cz> - 2016-07-21 11:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pali Rohár <pali.rohar@gmail.com> - 2016-07-21 11:10 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Peter Hutterer <peter.hutterer@who-t.net> - 2016-07-22 02:20 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pali Rohár <pali.rohar@gmail.com> - 2016-07-25 17:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Peter Hutterer <peter.hutterer@who-t.net> - 2016-07-22 02:20 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-07-22 03:00 +0200
Re: v4.1 to v4.7: regression in tsc2005 driver Pali Rohár <pali.rohar@gmail.com> - 2016-07-25 17:00 +0200
Page 1 of 3 [1] 2 3 Next page →
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-07-17 20:00 +0200 |
| Subject | v4.1 to v4.7: regression in tsc2005 driver |
| Message-ID | <rVYw9-3KJ-17@gated-at.bofh.it> |
Hi! tsc2005 driver changed input device name, from drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 touchscreen"; to "TSC200X touchscreen". Unfortunately, X seems to propagate that name to userspace, where it is needed to be able to do xinput --set-prop --type=int ... with the right arguments to calibrate touchscreen. (Touchscreen is unusable without calibration). What to do with that? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-17 20:30 +0200 |
| Message-ID | <rVYZc-49k-9@gated-at.bofh.it> |
| In reply to | #1445064 |
On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > Hi! > > tsc2005 driver changed input device name, from > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > touchscreen"; > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > name to userspace, where it is needed to be able to do > > xinput --set-prop --type=int ... > > with the right arguments to calibrate touchscreen. (Touchscreen is > unusable without calibration). > > What to do with that? The input_dev name could be passed to the common probe function. http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 It could also be inferred from the bus_type or dev_name. http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc200x-core.c#L547 Pick a method and I will provide a patch. > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-07-17 20:50 +0200 |
| Message-ID | <rVZix-4fE-5@gated-at.bofh.it> |
| In reply to | #1445075 |
On Sun 2016-07-17 13:24:45, Michael Welling wrote: > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > Hi! > > > > tsc2005 driver changed input device name, from > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > touchscreen"; > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > name to userspace, where it is needed to be able to do > > > > xinput --set-prop --type=int ... > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > unusable without calibration). > > > > What to do with that? > > The input_dev name could be passed to the common probe function. > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 That would be preffered, I guess. How many stable releases are affected? Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-17 21:00 +0200 |
| Message-ID | <rVZsd-4jy-13@gated-at.bofh.it> |
| In reply to | #1445081 |
On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > Hi! > > > > > > tsc2005 driver changed input device name, from > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > touchscreen"; > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > name to userspace, where it is needed to be able to do > > > > > > xinput --set-prop --type=int ... > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > unusable without calibration). > > > > > > What to do with that? > > > > The input_dev name could be passed to the common probe function. > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > That would be preffered, I guess. > > How many stable releases are affected? Well this patch is 9 months old now. Lets see. It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. > > Thanks, > Pavel > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-07-17 22:10 +0200 |
| Message-ID | <rW0xY-59Z-13@gated-at.bofh.it> |
| In reply to | #1445086 |
On Sun 2016-07-17 13:51:34, Michael Welling wrote: > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > > Hi! > > > > > > > > tsc2005 driver changed input device name, from > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > > touchscreen"; > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > > name to userspace, where it is needed to be able to do > > > > > > > > xinput --set-prop --type=int ... > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > > unusable without calibration). > > > > > > > > What to do with that? > > > > > > The input_dev name could be passed to the common probe function. > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > > > That would be preffered, I guess. > > > > How many stable releases are affected? > > Well this patch is 9 months old now. Lets see. > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. Ok, thanks for the information. I believe changing it back to "TSC2005" version makes sense (and then fixing it in stable). Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-18 01:00 +0200 |
| Message-ID | <rW3ct-6yi-1@gated-at.bofh.it> |
| In reply to | #1445100 |
On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote: > On Sun 2016-07-17 13:51:34, Michael Welling wrote: > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > > > Hi! > > > > > > > > > > tsc2005 driver changed input device name, from > > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > > > touchscreen"; > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > > > name to userspace, where it is needed to be able to do > > > > > > > > > > xinput --set-prop --type=int ... > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > > > unusable without calibration). > > > > > > > > > > What to do with that? > > > > > > > > The input_dev name could be passed to the common probe function. > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > > > > > That would be preffered, I guess. > > > > > > How many stable releases are affected? > > > > Well this patch is 9 months old now. Lets see. > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. > > Ok, thanks for the information. I believe changing it back to > "TSC2005" version makes sense (and then fixing it in stable). Lets see if the maintainer has any input before I submit a patch. > > Best regards, > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2016-07-20 02:00 +0200 |
| Message-ID | <rWN5D-26r-11@gated-at.bofh.it> |
| In reply to | #1445135 |
On Sun, Jul 17, 2016 at 05:56:36PM -0500, Michael Welling wrote: > On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote: > > On Sun 2016-07-17 13:51:34, Michael Welling wrote: > > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > > > > Hi! > > > > > > > > > > > > tsc2005 driver changed input device name, from > > > > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > > > > touchscreen"; > > > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > > > > name to userspace, where it is needed to be able to do Technically X _is_ userspace. > > > > > > > > > > > > xinput --set-prop --type=int ... > > > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > > > > unusable without calibration). > > > > > > > > > > > > What to do with that? Hmm, I do not think we ever committed for the device names to be stable. You are supposed to locate touchscreen device based on its properties and you might need some heuristic if you encounter a system with more than one such touchscreen. > > > > > > > > > > The input_dev name could be passed to the common probe function. > > > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > > > > > > > That would be preffered, I guess. > > > > > > > > How many stable releases are affected? > > > > > > Well this patch is 9 months old now. Lets see. > > > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. > > > > Ok, thanks for the information. I believe changing it back to > > "TSC2005" version makes sense (and then fixing it in stable). Do we know how many users are affected? > > Lets see if the maintainer has any input before I submit a patch. I guess we could also pass the input_id structure to tsc200x_probe, fill the proper product ID (2004 or 2005) and derive the name form it. Thanks. -- Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-20 02:40 +0200 |
| Message-ID | <rWNIl-2BH-1@gated-at.bofh.it> |
| In reply to | #1446809 |
On Tue, Jul 19, 2016 at 04:51:20PM -0700, Dmitry Torokhov wrote: > On Sun, Jul 17, 2016 at 05:56:36PM -0500, Michael Welling wrote: > > On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote: > > > On Sun 2016-07-17 13:51:34, Michael Welling wrote: > > > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > > > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > > > > > Hi! > > > > > > > > > > > > > > tsc2005 driver changed input device name, from > > > > > > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > > > > > touchscreen"; > > > > > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > > > > > name to userspace, where it is needed to be able to do > > Technically X _is_ userspace. > > > > > > > > > > > > > > > xinput --set-prop --type=int ... > > > > > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > > > > > unusable without calibration). > > > > > > > > > > > > > > What to do with that? > > Hmm, I do not think we ever committed for the device names to be stable. > You are supposed to locate touchscreen device based on its properties > and you might need some heuristic if you encounter a system with more > than one such touchscreen. > > > > > > > > > > > > > The input_dev name could be passed to the common probe function. > > > > > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > > > > > > > > > That would be preffered, I guess. > > > > > > > > > > How many stable releases are affected? > > > > > > > > Well this patch is 9 months old now. Lets see. > > > > > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. > > > > > > Ok, thanks for the information. I believe changing it back to > > > "TSC2005" version makes sense (and then fixing it in stable). > > Do we know how many users are affected? Anyone with an old N900 and the smarts to update the kernel. > > > > > Lets see if the maintainer has any input before I submit a patch. > > I guess we could also pass the input_id structure to tsc200x_probe, fill > the proper product ID (2004 or 2005) and derive the name form it. > Okay do you really think this should be considered a regression? Should I go ahead with the patch? > Thanks. > > -- > Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2016-07-20 03:00 +0200 |
| Message-ID | <rWO1H-2Kq-19@gated-at.bofh.it> |
| In reply to | #1446835 |
On Tue, Jul 19, 2016 at 07:39:08PM -0500, Michael Welling wrote: > On Tue, Jul 19, 2016 at 04:51:20PM -0700, Dmitry Torokhov wrote: > > On Sun, Jul 17, 2016 at 05:56:36PM -0500, Michael Welling wrote: > > > On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote: > > > > On Sun 2016-07-17 13:51:34, Michael Welling wrote: > > > > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > > > > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > > > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > > > > > > Hi! > > > > > > > > > > > > > > > > tsc2005 driver changed input device name, from > > > > > > > > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > > > > > > touchscreen"; > > > > > > > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > > > > > > name to userspace, where it is needed to be able to do > > > > Technically X _is_ userspace. > > > > > > > > > > > > > > > > > > xinput --set-prop --type=int ... > > > > > > > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > > > > > > unusable without calibration). > > > > > > > > > > > > > > > > What to do with that? > > > > Hmm, I do not think we ever committed for the device names to be stable. > > You are supposed to locate touchscreen device based on its properties > > and you might need some heuristic if you encounter a system with more > > than one such touchscreen. > > > > > > > > > > > > > > > > The input_dev name could be passed to the common probe function. > > > > > > > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > > > > > > > > > > > That would be preffered, I guess. > > > > > > > > > > > > How many stable releases are affected? > > > > > > > > > > Well this patch is 9 months old now. Lets see. > > > > > > > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. > > > > > > > > Ok, thanks for the information. I believe changing it back to > > > > "TSC2005" version makes sense (and then fixing it in stable). > > > > Do we know how many users are affected? > > Anyone with an old N900 and the smarts to update the kernel. Soo... only Pavel? ;) > > > > > > > > > Lets see if the maintainer has any input before I submit a patch. > > > > I guess we could also pass the input_id structure to tsc200x_probe, fill > > the proper product ID (2004 or 2005) and derive the name form it. > > > > Okay do you really think this should be considered a regression? > > Should I go ahead with the patch? To "fix" it is a small change so we might as well do that, but I probably leave it off stable for now. Thanks. -- Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-20 03:40 +0200 |
| Message-ID | <rWOEq-3d3-7@gated-at.bofh.it> |
| In reply to | #1446844 |
On Tue, Jul 19, 2016 at 05:53:07PM -0700, Dmitry Torokhov wrote: > On Tue, Jul 19, 2016 at 07:39:08PM -0500, Michael Welling wrote: > > On Tue, Jul 19, 2016 at 04:51:20PM -0700, Dmitry Torokhov wrote: > > > On Sun, Jul 17, 2016 at 05:56:36PM -0500, Michael Welling wrote: > > > > On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote: > > > > > On Sun 2016-07-17 13:51:34, Michael Welling wrote: > > > > > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote: > > > > > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote: > > > > > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote: > > > > > > > > > Hi! > > > > > > > > > > > > > > > > > > tsc2005 driver changed input device name, from > > > > > > > > > > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005 > > > > > > > > > touchscreen"; > > > > > > > > > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that > > > > > > > > > name to userspace, where it is needed to be able to do > > > > > > Technically X _is_ userspace. > > > > > > > > > > > > > > > > > > > > > xinput --set-prop --type=int ... > > > > > > > > > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is > > > > > > > > > unusable without calibration). > > > > > > > > > > > > > > > > > > What to do with that? > > > > > > Hmm, I do not think we ever committed for the device names to be stable. > > > You are supposed to locate touchscreen device based on its properties > > > and you might need some heuristic if you encounter a system with more > > > than one such touchscreen. > > > > > > > > > > > > > > > > > > > The input_dev name could be passed to the common probe function. > > > > > > > > > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65 > > > > > > > > > > > > > > That would be preffered, I guess. > > > > > > > > > > > > > > How many stable releases are affected? > > > > > > > > > > > > Well this patch is 9 months old now. Lets see. > > > > > > > > > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6. > > > > > > > > > > Ok, thanks for the information. I believe changing it back to > > > > > "TSC2005" version makes sense (and then fixing it in stable). > > > > > > Do we know how many users are affected? > > > > Anyone with an old N900 and the smarts to update the kernel. > > Soo... only Pavel? ;) > > > > > > > > > > > > > > Lets see if the maintainer has any input before I submit a patch. > > > > > > I guess we could also pass the input_id structure to tsc200x_probe, fill > > > the proper product ID (2004 or 2005) and derive the name form it. > > > If we passed the input_dev with the filled product idea it would have to be allocated in the calling probe functions instead of the common probe. This will lead to more duplicated code which we jumped through so many hoops to avoid. > > > > Okay do you really think this should be considered a regression? > > > > Should I go ahead with the patch? > > To "fix" it is a small change so we might as well do that, but I > probably leave it off stable for now. > > Thanks. > > -- > Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2016-07-20 03:50 +0200 |
| Message-ID | <rWOO6-3gp-3@gated-at.bofh.it> |
| In reply to | #1446877 |
On Tue, Jul 19, 2016 at 08:34:57PM -0500, Michael Welling wrote:
> On Tue, Jul 19, 2016 at 05:53:07PM -0700, Dmitry Torokhov wrote:
> > On Tue, Jul 19, 2016 at 07:39:08PM -0500, Michael Welling wrote:
> > > On Tue, Jul 19, 2016 at 04:51:20PM -0700, Dmitry Torokhov wrote:
> > > > On Sun, Jul 17, 2016 at 05:56:36PM -0500, Michael Welling wrote:
> > > > > On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote:
> > > > > > On Sun 2016-07-17 13:51:34, Michael Welling wrote:
> > > > > > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote:
> > > > > > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote:
> > > > > > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote:
> > > > > > > > > > Hi!
> > > > > > > > > >
> > > > > > > > > > tsc2005 driver changed input device name, from
> > > > > > > > > >
> > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005
> > > > > > > > > > touchscreen";
> > > > > > > > > >
> > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that
> > > > > > > > > > name to userspace, where it is needed to be able to do
> > > >
> > > > Technically X _is_ userspace.
> > > >
> > > > > > > > > >
> > > > > > > > > > xinput --set-prop --type=int ...
> > > > > > > > > >
> > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is
> > > > > > > > > > unusable without calibration).
> > > > > > > > > >
> > > > > > > > > > What to do with that?
> > > >
> > > > Hmm, I do not think we ever committed for the device names to be stable.
> > > > You are supposed to locate touchscreen device based on its properties
> > > > and you might need some heuristic if you encounter a system with more
> > > > than one such touchscreen.
> > > >
> > > > > > > > >
> > > > > > > > > The input_dev name could be passed to the common probe function.
> > > > > > > > >
> > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65
> > > > > > > >
> > > > > > > > That would be preffered, I guess.
> > > > > > > >
> > > > > > > > How many stable releases are affected?
> > > > > > >
> > > > > > > Well this patch is 9 months old now. Lets see.
> > > > > > >
> > > > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6.
> > > > > >
> > > > > > Ok, thanks for the information. I believe changing it back to
> > > > > > "TSC2005" version makes sense (and then fixing it in stable).
> > > >
> > > > Do we know how many users are affected?
> > >
> > > Anyone with an old N900 and the smarts to update the kernel.
> >
> > Soo... only Pavel? ;)
> >
> > >
> > > >
> > > > >
> > > > > Lets see if the maintainer has any input before I submit a patch.
> > > >
> > > > I guess we could also pass the input_id structure to tsc200x_probe, fill
> > > > the proper product ID (2004 or 2005) and derive the name form it.
> > > >
>
> If we passed the input_dev with the filled product idea it would have to be
> allocated in the calling probe functions instead of the common probe.
>
> This will lead to more duplicated code which we jumped through so many hoops
> to avoid.
Not input_dev, input_id, like :
static const struct input_id tsc2005_input_id = {
.bustype = BUS_SPI,
.product = 2005,
};
static int tsc2005_probe(struct spi_device *spi)
{
...
return tsc200x_probe(&spi->dev, spi->irq,
&tsc2005_input_id,
devm_regmap_init_spi(spi, &tsc200x_regmap_config),
tsc2005_cmd);
};
and in tsc200x_probe() you'd do:
input_dev->name = dev_kasprintf(dev, GFP_KERNEL, "TSC%04d touchscreen",
tsc_id->product);
if (!input_dev->name)
return -ENOMEM;
...
input_dev->id = *tsc_id;
Thanks.
--
Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-20 04:10 +0200 |
| Message-ID | <rWP7r-3BQ-1@gated-at.bofh.it> |
| In reply to | #1446880 |
On Tue, Jul 19, 2016 at 06:44:24PM -0700, Dmitry Torokhov wrote:
> On Tue, Jul 19, 2016 at 08:34:57PM -0500, Michael Welling wrote:
> > On Tue, Jul 19, 2016 at 05:53:07PM -0700, Dmitry Torokhov wrote:
> > > On Tue, Jul 19, 2016 at 07:39:08PM -0500, Michael Welling wrote:
> > > > On Tue, Jul 19, 2016 at 04:51:20PM -0700, Dmitry Torokhov wrote:
> > > > > On Sun, Jul 17, 2016 at 05:56:36PM -0500, Michael Welling wrote:
> > > > > > On Sun, Jul 17, 2016 at 10:03:39PM +0200, Pavel Machek wrote:
> > > > > > > On Sun 2016-07-17 13:51:34, Michael Welling wrote:
> > > > > > > > On Sun, Jul 17, 2016 at 08:42:09PM +0200, Pavel Machek wrote:
> > > > > > > > > On Sun 2016-07-17 13:24:45, Michael Welling wrote:
> > > > > > > > > > On Sun, Jul 17, 2016 at 07:52:57PM +0200, Pavel Machek wrote:
> > > > > > > > > > > Hi!
> > > > > > > > > > >
> > > > > > > > > > > tsc2005 driver changed input device name, from
> > > > > > > > > > >
> > > > > > > > > > > drivers/input/touchscreen/tsc2005.c: input_dev->name = "TSC2005
> > > > > > > > > > > touchscreen";
> > > > > > > > > > >
> > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that
> > > > > > > > > > > name to userspace, where it is needed to be able to do
> > > > >
> > > > > Technically X _is_ userspace.
> > > > >
> > > > > > > > > > >
> > > > > > > > > > > xinput --set-prop --type=int ...
> > > > > > > > > > >
> > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is
> > > > > > > > > > > unusable without calibration).
> > > > > > > > > > >
> > > > > > > > > > > What to do with that?
> > > > >
> > > > > Hmm, I do not think we ever committed for the device names to be stable.
> > > > > You are supposed to locate touchscreen device based on its properties
> > > > > and you might need some heuristic if you encounter a system with more
> > > > > than one such touchscreen.
> > > > >
> > > > > > > > > >
> > > > > > > > > > The input_dev name could be passed to the common probe function.
> > > > > > > > > >
> > > > > > > > > > http://lxr.free-electrons.com/source/drivers/input/touchscreen/tsc2005.c#L65
> > > > > > > > >
> > > > > > > > > That would be preffered, I guess.
> > > > > > > > >
> > > > > > > > > How many stable releases are affected?
> > > > > > > >
> > > > > > > > Well this patch is 9 months old now. Lets see.
> > > > > > > >
> > > > > > > > It was introduced in v4.4-rc1. So v4.4, v4.5 and v4.6.
> > > > > > >
> > > > > > > Ok, thanks for the information. I believe changing it back to
> > > > > > > "TSC2005" version makes sense (and then fixing it in stable).
> > > > >
> > > > > Do we know how many users are affected?
> > > >
> > > > Anyone with an old N900 and the smarts to update the kernel.
> > >
> > > Soo... only Pavel? ;)
> > >
> > > >
> > > > >
> > > > > >
> > > > > > Lets see if the maintainer has any input before I submit a patch.
> > > > >
> > > > > I guess we could also pass the input_id structure to tsc200x_probe, fill
> > > > > the proper product ID (2004 or 2005) and derive the name form it.
> > > > >
> >
> > If we passed the input_dev with the filled product idea it would have to be
> > allocated in the calling probe functions instead of the common probe.
> >
> > This will lead to more duplicated code which we jumped through so many hoops
> > to avoid.
>
> Not input_dev, input_id, like :
>
> static const struct input_id tsc2005_input_id = {
> .bustype = BUS_SPI,
> .product = 2005,
> };
>
>
>
> static int tsc2005_probe(struct spi_device *spi)
> {
> ...
> return tsc200x_probe(&spi->dev, spi->irq,
> &tsc2005_input_id,
> devm_regmap_init_spi(spi, &tsc200x_regmap_config),
> tsc2005_cmd);
> };
>
> and in tsc200x_probe() you'd do:
>
> input_dev->name = dev_kasprintf(dev, GFP_KERNEL, "TSC%04d touchscreen",
> tsc_id->product);
> if (!input_dev->name)
> return -ENOMEM;
> ...
> input_dev->id = *tsc_id;
>
Okay. Easy enough.
> Thanks.
>
> --
> Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-20 06:00 +0200 |
| Subject | [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rWQPU-4zq-7@gated-at.bofh.it> |
| In reply to | #1446880 |
Passes input_id struct to the the common probe function for the tsc200x drivers
instead of just the bustype.
This allows for the use of the product variable to set the input_dev->name
variable according to the type of touchscreen used.
Signed-off-by: Michael Welling <mwelling@ieee.org>
---
drivers/input/touchscreen/tsc2004.c | 7 ++++++-
drivers/input/touchscreen/tsc2005.c | 7 ++++++-
drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
drivers/input/touchscreen/tsc200x-core.h | 2 +-
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/drivers/input/touchscreen/tsc2004.c b/drivers/input/touchscreen/tsc2004.c
index 7295c19..6fe55d5 100644
--- a/drivers/input/touchscreen/tsc2004.c
+++ b/drivers/input/touchscreen/tsc2004.c
@@ -22,6 +22,11 @@
#include <linux/regmap.h>
#include "tsc200x-core.h"
+static const struct input_id tsc2004_input_id = {
+ .bustype = BUS_I2C,
+ .product = 2004,
+};
+
static int tsc2004_cmd(struct device *dev, u8 cmd)
{
u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
@@ -42,7 +47,7 @@ static int tsc2004_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
- return tsc200x_probe(&i2c->dev, i2c->irq, BUS_I2C,
+ return tsc200x_probe(&i2c->dev, i2c->irq, &tsc2004_input_id,
devm_regmap_init_i2c(i2c, &tsc200x_regmap_config),
tsc2004_cmd);
}
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
index b9f593d..f2c5f0e 100644
--- a/drivers/input/touchscreen/tsc2005.c
+++ b/drivers/input/touchscreen/tsc2005.c
@@ -24,6 +24,11 @@
#include <linux/regmap.h>
#include "tsc200x-core.h"
+static const struct input_id tsc2005_input_id = {
+ .bustype = BUS_SPI,
+ .product = 2005,
+};
+
static int tsc2005_cmd(struct device *dev, u8 cmd)
{
u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
@@ -62,7 +67,7 @@ static int tsc2005_probe(struct spi_device *spi)
if (error)
return error;
- return tsc200x_probe(&spi->dev, spi->irq, BUS_SPI,
+ return tsc200x_probe(&spi->dev, spi->irq, &tsc2005_input_id,
devm_regmap_init_spi(spi, &tsc200x_regmap_config),
tsc2005_cmd);
}
diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
index 26e81d1b..5e625c4 100644
--- a/drivers/input/touchscreen/tsc200x-core.c
+++ b/drivers/input/touchscreen/tsc200x-core.c
@@ -450,7 +450,7 @@ static void tsc200x_close(struct input_dev *input)
mutex_unlock(&ts->mutex);
}
-int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
+int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
struct regmap *regmap,
int (*tsc200x_cmd)(struct device *dev, u8 cmd))
{
@@ -547,9 +547,10 @@ int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
snprintf(ts->phys, sizeof(ts->phys),
"%s/input-ts", dev_name(dev));
- input_dev->name = "TSC200X touchscreen";
+ input_dev->name = devm_kasprintf(dev, GFP_KERNEL, "TSC%04d touchscreen",
+ tsc_id->product);
input_dev->phys = ts->phys;
- input_dev->id.bustype = bustype;
+ input_dev->id = *tsc_id;
input_dev->dev.parent = dev;
input_dev->evbit[0] = BIT(EV_ABS) | BIT(EV_KEY);
input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
diff --git a/drivers/input/touchscreen/tsc200x-core.h b/drivers/input/touchscreen/tsc200x-core.h
index 7a482d1..49a63a3 100644
--- a/drivers/input/touchscreen/tsc200x-core.h
+++ b/drivers/input/touchscreen/tsc200x-core.h
@@ -70,7 +70,7 @@
extern const struct regmap_config tsc200x_regmap_config;
extern const struct dev_pm_ops tsc200x_pm_ops;
-int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
+int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
struct regmap *regmap,
int (*tsc200x_cmd)(struct device *dev, u8 cmd));
int tsc200x_remove(struct device *dev);
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-07-20 08:40 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rWTkK-6iI-17@gated-at.bofh.it> |
| In reply to | #1446932 |
Hi!
> Passes input_id struct to the the common probe function for the tsc200x drivers
> instead of just the bustype.
>
> This allows for the use of the product variable to set the input_dev->name
> variable according to the type of touchscreen used.
>
> Signed-off-by: Michael Welling <mwelling@ieee.org>
> ---
> drivers/input/touchscreen/tsc2004.c | 7 ++++++-
> drivers/input/touchscreen/tsc2005.c | 7 ++++++-
> drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
> drivers/input/touchscreen/tsc200x-core.h | 2 +-
> 4 files changed, 17 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/input/touchscreen/tsc2004.c b/drivers/input/touchscreen/tsc2004.c
> index 7295c19..6fe55d5 100644
> --- a/drivers/input/touchscreen/tsc2004.c
> +++ b/drivers/input/touchscreen/tsc2004.c
> @@ -22,6 +22,11 @@
> #include <linux/regmap.h>
> #include "tsc200x-core.h"
>
> +static const struct input_id tsc2004_input_id = {
> + .bustype = BUS_I2C,
> + .product = 2004,
> +};
> +
> static int tsc2004_cmd(struct device *dev, u8 cmd)
> {
> u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> @@ -42,7 +47,7 @@ static int tsc2004_probe(struct i2c_client *i2c,
> const struct i2c_device_id *id)
>
> {
> - return tsc200x_probe(&i2c->dev, i2c->irq, BUS_I2C,
> + return tsc200x_probe(&i2c->dev, i2c->irq, &tsc2004_input_id,
> devm_regmap_init_i2c(i2c, &tsc200x_regmap_config),
> tsc2004_cmd);
> }
> diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
> index b9f593d..f2c5f0e 100644
> --- a/drivers/input/touchscreen/tsc2005.c
> +++ b/drivers/input/touchscreen/tsc2005.c
> @@ -24,6 +24,11 @@
> #include <linux/regmap.h>
> #include "tsc200x-core.h"
>
> +static const struct input_id tsc2005_input_id = {
> + .bustype = BUS_SPI,
> + .product = 2005,
> +};
> +
> static int tsc2005_cmd(struct device *dev, u8 cmd)
> {
> u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> @@ -62,7 +67,7 @@ static int tsc2005_probe(struct spi_device *spi)
> if (error)
> return error;
>
> - return tsc200x_probe(&spi->dev, spi->irq, BUS_SPI,
> + return tsc200x_probe(&spi->dev, spi->irq, &tsc2005_input_id,
> devm_regmap_init_spi(spi, &tsc200x_regmap_config),
> tsc2005_cmd);
> }
> diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
> index 26e81d1b..5e625c4 100644
> --- a/drivers/input/touchscreen/tsc200x-core.c
> +++ b/drivers/input/touchscreen/tsc200x-core.c
> @@ -450,7 +450,7 @@ static void tsc200x_close(struct input_dev *input)
> mutex_unlock(&ts->mutex);
> }
>
> -int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
> +int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
> struct regmap *regmap,
> int (*tsc200x_cmd)(struct device *dev, u8 cmd))
> {
> @@ -547,9 +547,10 @@ int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
> snprintf(ts->phys, sizeof(ts->phys),
> "%s/input-ts", dev_name(dev));
>
> - input_dev->name = "TSC200X touchscreen";
> + input_dev->name = devm_kasprintf(dev, GFP_KERNEL, "TSC%04d touchscreen",
> + tsc_id->product);
What about:
if (tsc_id->product == 2005)
input_dev->name = "TSC2005 touchscreen";
else
input_dev->name = "TSC200X touchscreen";
We do want to use 'TSC2005' name for TSC2005, because compatibility,
but you should keep TSC200X.... because compatibility. You don't want
to break people's setups by going from TSC200X to TSC2004.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-07-20 09:00 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rWTE5-6ph-7@gated-at.bofh.it> |
| In reply to | #1447016 |
On Wed 2016-07-20 01:50:24, Michael Welling wrote:
> On Wed, Jul 20, 2016 at 08:31:06AM +0200, Pavel Machek wrote:
> > Hi!
> >
> > > Passes input_id struct to the the common probe function for the tsc200x drivers
> > > instead of just the bustype.
> > >
> > > This allows for the use of the product variable to set the input_dev->name
> > > variable according to the type of touchscreen used.
> > >
> > > Signed-off-by: Michael Welling <mwelling@ieee.org>
> > > ---
> > > drivers/input/touchscreen/tsc2004.c | 7 ++++++-
> > > drivers/input/touchscreen/tsc2005.c | 7 ++++++-
> > > drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
> > > drivers/input/touchscreen/tsc200x-core.h | 2 +-
> > > 4 files changed, 17 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/input/touchscreen/tsc2004.c b/drivers/input/touchscreen/tsc2004.c
> > > index 7295c19..6fe55d5 100644
> > > --- a/drivers/input/touchscreen/tsc2004.c
> > > +++ b/drivers/input/touchscreen/tsc2004.c
> > > @@ -22,6 +22,11 @@
> > > #include <linux/regmap.h>
> > > #include "tsc200x-core.h"
> > >
> > > +static const struct input_id tsc2004_input_id = {
> > > + .bustype = BUS_I2C,
> > > + .product = 2004,
> > > +};
> > > +
> > > static int tsc2004_cmd(struct device *dev, u8 cmd)
> > > {
> > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > @@ -42,7 +47,7 @@ static int tsc2004_probe(struct i2c_client *i2c,
> > > const struct i2c_device_id *id)
> > >
> > > {
> > > - return tsc200x_probe(&i2c->dev, i2c->irq, BUS_I2C,
> > > + return tsc200x_probe(&i2c->dev, i2c->irq, &tsc2004_input_id,
> > > devm_regmap_init_i2c(i2c, &tsc200x_regmap_config),
> > > tsc2004_cmd);
> > > }
> > > diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
> > > index b9f593d..f2c5f0e 100644
> > > --- a/drivers/input/touchscreen/tsc2005.c
> > > +++ b/drivers/input/touchscreen/tsc2005.c
> > > @@ -24,6 +24,11 @@
> > > #include <linux/regmap.h>
> > > #include "tsc200x-core.h"
> > >
> > > +static const struct input_id tsc2005_input_id = {
> > > + .bustype = BUS_SPI,
> > > + .product = 2005,
> > > +};
> > > +
> > > static int tsc2005_cmd(struct device *dev, u8 cmd)
> > > {
> > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > @@ -62,7 +67,7 @@ static int tsc2005_probe(struct spi_device *spi)
> > > if (error)
> > > return error;
> > >
> > > - return tsc200x_probe(&spi->dev, spi->irq, BUS_SPI,
> > > + return tsc200x_probe(&spi->dev, spi->irq, &tsc2005_input_id,
> > > devm_regmap_init_spi(spi, &tsc200x_regmap_config),
> > > tsc2005_cmd);
> > > }
> > > diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
> > > index 26e81d1b..5e625c4 100644
> > > --- a/drivers/input/touchscreen/tsc200x-core.c
> > > +++ b/drivers/input/touchscreen/tsc200x-core.c
> > > @@ -450,7 +450,7 @@ static void tsc200x_close(struct input_dev *input)
> > > mutex_unlock(&ts->mutex);
> > > }
> > >
> > > -int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
> > > +int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
> > > struct regmap *regmap,
> > > int (*tsc200x_cmd)(struct device *dev, u8 cmd))
> > > {
> > > @@ -547,9 +547,10 @@ int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
> > > snprintf(ts->phys, sizeof(ts->phys),
> > > "%s/input-ts", dev_name(dev));
> > >
> > > - input_dev->name = "TSC200X touchscreen";
> > > + input_dev->name = devm_kasprintf(dev, GFP_KERNEL, "TSC%04d touchscreen",
> > > + tsc_id->product);
> >
> > What about:
> >
> > if (tsc_id->product == 2005)
> > input_dev->name = "TSC2005 touchscreen";
> > else
> > input_dev->name = "TSC200X touchscreen";
> >
> > We do want to use 'TSC2005' name for TSC2005, because compatibility,
> > but you should keep TSC200X.... because compatibility. You don't want
> > to break people's setups by going from TSC200X to TSC2004.
>
> By same logic we shouldn't change from TSC200X back to TSC2005 because of
> people's possibly new setup in the last 9 months.
That's your, broken logic.
TSC200X->TSC2005 needs to be fixed, because people seen the TSC2005
for past few years.
TSC200X->TSC2004 is just introducing regression, because noone ever
seen TSC2004, AFAICT.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Date | 2016-07-20 09:10 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rWTNL-6HG-5@gated-at.bofh.it> |
| In reply to | #1447024 |
On Wed, Jul 20, 2016 at 08:54:05AM +0200, Pavel Machek wrote: > > By same logic we shouldn't change from TSC200X back to TSC2005 because of > > people's possibly new setup in the last 9 months. > > That's your, broken logic. > > TSC200X->TSC2005 needs to be fixed, because people seen the TSC2005 > for past few years. > > TSC200X->TSC2004 is just introducing regression, because noone ever > seen TSC2004, AFAICT. I am pretty sure no one cares. Escpecially me. > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-07-20 09:50 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rWUqu-6WG-5@gated-at.bofh.it> |
| In reply to | #1447030 |
On Wed 2016-07-20 02:06:17, Michael Welling wrote: > On Wed, Jul 20, 2016 at 08:54:05AM +0200, Pavel Machek wrote: > > > By same logic we shouldn't change from TSC200X back to TSC2005 because of > > > people's possibly new setup in the last 9 months. > > > > That's your, broken logic. > > > > TSC200X->TSC2005 needs to be fixed, because people seen the TSC2005 > > for past few years. > > > > TSC200X->TSC2004 is just introducing regression, because noone ever > > seen TSC2004, AFAICT. > > I am pretty sure no one cares. Escpecially me. Dunno. Lets do the right thing: TSC2005 for 2005, TSC200X for everyone else. Interface issues are tricky to handle once created, so its best to be careful. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2016-07-20 18:50 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rX2R3-3Qq-13@gated-at.bofh.it> |
| In reply to | #1447024 |
On Wed, Jul 20, 2016 at 08:54:05AM +0200, Pavel Machek wrote:
> On Wed 2016-07-20 01:50:24, Michael Welling wrote:
> > On Wed, Jul 20, 2016 at 08:31:06AM +0200, Pavel Machek wrote:
> > > Hi!
> > >
> > > > Passes input_id struct to the the common probe function for the tsc200x drivers
> > > > instead of just the bustype.
> > > >
> > > > This allows for the use of the product variable to set the input_dev->name
> > > > variable according to the type of touchscreen used.
> > > >
> > > > Signed-off-by: Michael Welling <mwelling@ieee.org>
> > > > ---
> > > > drivers/input/touchscreen/tsc2004.c | 7 ++++++-
> > > > drivers/input/touchscreen/tsc2005.c | 7 ++++++-
> > > > drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
> > > > drivers/input/touchscreen/tsc200x-core.h | 2 +-
> > > > 4 files changed, 17 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/drivers/input/touchscreen/tsc2004.c b/drivers/input/touchscreen/tsc2004.c
> > > > index 7295c19..6fe55d5 100644
> > > > --- a/drivers/input/touchscreen/tsc2004.c
> > > > +++ b/drivers/input/touchscreen/tsc2004.c
> > > > @@ -22,6 +22,11 @@
> > > > #include <linux/regmap.h>
> > > > #include "tsc200x-core.h"
> > > >
> > > > +static const struct input_id tsc2004_input_id = {
> > > > + .bustype = BUS_I2C,
> > > > + .product = 2004,
> > > > +};
> > > > +
> > > > static int tsc2004_cmd(struct device *dev, u8 cmd)
> > > > {
> > > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > > @@ -42,7 +47,7 @@ static int tsc2004_probe(struct i2c_client *i2c,
> > > > const struct i2c_device_id *id)
> > > >
> > > > {
> > > > - return tsc200x_probe(&i2c->dev, i2c->irq, BUS_I2C,
> > > > + return tsc200x_probe(&i2c->dev, i2c->irq, &tsc2004_input_id,
> > > > devm_regmap_init_i2c(i2c, &tsc200x_regmap_config),
> > > > tsc2004_cmd);
> > > > }
> > > > diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
> > > > index b9f593d..f2c5f0e 100644
> > > > --- a/drivers/input/touchscreen/tsc2005.c
> > > > +++ b/drivers/input/touchscreen/tsc2005.c
> > > > @@ -24,6 +24,11 @@
> > > > #include <linux/regmap.h>
> > > > #include "tsc200x-core.h"
> > > >
> > > > +static const struct input_id tsc2005_input_id = {
> > > > + .bustype = BUS_SPI,
> > > > + .product = 2005,
> > > > +};
> > > > +
> > > > static int tsc2005_cmd(struct device *dev, u8 cmd)
> > > > {
> > > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > > @@ -62,7 +67,7 @@ static int tsc2005_probe(struct spi_device *spi)
> > > > if (error)
> > > > return error;
> > > >
> > > > - return tsc200x_probe(&spi->dev, spi->irq, BUS_SPI,
> > > > + return tsc200x_probe(&spi->dev, spi->irq, &tsc2005_input_id,
> > > > devm_regmap_init_spi(spi, &tsc200x_regmap_config),
> > > > tsc2005_cmd);
> > > > }
> > > > diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
> > > > index 26e81d1b..5e625c4 100644
> > > > --- a/drivers/input/touchscreen/tsc200x-core.c
> > > > +++ b/drivers/input/touchscreen/tsc200x-core.c
> > > > @@ -450,7 +450,7 @@ static void tsc200x_close(struct input_dev *input)
> > > > mutex_unlock(&ts->mutex);
> > > > }
> > > >
> > > > -int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
> > > > +int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
> > > > struct regmap *regmap,
> > > > int (*tsc200x_cmd)(struct device *dev, u8 cmd))
> > > > {
> > > > @@ -547,9 +547,10 @@ int tsc200x_probe(struct device *dev, int irq, __u16 bustype,
> > > > snprintf(ts->phys, sizeof(ts->phys),
> > > > "%s/input-ts", dev_name(dev));
> > > >
> > > > - input_dev->name = "TSC200X touchscreen";
> > > > + input_dev->name = devm_kasprintf(dev, GFP_KERNEL, "TSC%04d touchscreen",
> > > > + tsc_id->product);
> > >
> > > What about:
> > >
> > > if (tsc_id->product == 2005)
> > > input_dev->name = "TSC2005 touchscreen";
> > > else
> > > input_dev->name = "TSC200X touchscreen";
> > >
> > > We do want to use 'TSC2005' name for TSC2005, because compatibility,
> > > but you should keep TSC200X.... because compatibility. You don't want
> > > to break people's setups by going from TSC200X to TSC2004.
> >
> > By same logic we shouldn't change from TSC200X back to TSC2005 because of
> > people's possibly new setup in the last 9 months.
>
> That's your, broken logic.
>
> TSC200X->TSC2005 needs to be fixed, because people seen the TSC2005
> for past few years.
People might have also seen TSC2005->TSC200X for the last few months.
They could be dependent on this now and start complaining once we
revert.
I am sorely tempted to leave the name as is. Just adjust your script to
check the name. Something like
TSC_MODEL=`sed -ne 's/^N: Name="TSC\([0-9]\+\) .*/\1/p' /proc/bus/input/devices`
xinput ... "TSC${TSC_MODEL} Touchscreen"
Or fetch the current name from sysfs.
Thanks.
--
Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Pali Rohár <pali.rohar@gmail.com> |
|---|---|
| Date | 2016-07-20 19:00 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rX30K-3X3-11@gated-at.bofh.it> |
| In reply to | #1447355 |
[Multipart message — attachments visible in raw view] — view raw
On Wednesday 20 July 2016 18:45:03 Dmitry Torokhov wrote:
> On Wed, Jul 20, 2016 at 08:54:05AM +0200, Pavel Machek wrote:
> > On Wed 2016-07-20 01:50:24, Michael Welling wrote:
> > > On Wed, Jul 20, 2016 at 08:31:06AM +0200, Pavel Machek wrote:
> > > > Hi!
> > > >
> > > > > Passes input_id struct to the the common probe function for
> > > > > the tsc200x drivers instead of just the bustype.
> > > > >
> > > > > This allows for the use of the product variable to set the
> > > > > input_dev->name variable according to the type of
> > > > > touchscreen used.
> > > > >
> > > > > Signed-off-by: Michael Welling <mwelling@ieee.org>
> > > > > ---
> > > > >
> > > > > drivers/input/touchscreen/tsc2004.c | 7 ++++++-
> > > > > drivers/input/touchscreen/tsc2005.c | 7 ++++++-
> > > > > drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
> > > > > drivers/input/touchscreen/tsc200x-core.h | 2 +-
> > > > > 4 files changed, 17 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/drivers/input/touchscreen/tsc2004.c
> > > > > b/drivers/input/touchscreen/tsc2004.c index 7295c19..6fe55d5
> > > > > 100644
> > > > > --- a/drivers/input/touchscreen/tsc2004.c
> > > > > +++ b/drivers/input/touchscreen/tsc2004.c
> > > > > @@ -22,6 +22,11 @@
> > > > >
> > > > > #include <linux/regmap.h>
> > > > > #include "tsc200x-core.h"
> > > > >
> > > > > +static const struct input_id tsc2004_input_id = {
> > > > > + .bustype = BUS_I2C,
> > > > > + .product = 2004,
> > > > > +};
> > > > > +
> > > > >
> > > > > static int tsc2004_cmd(struct device *dev, u8 cmd)
> > > > > {
> > > > >
> > > > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > > >
> > > > > @@ -42,7 +47,7 @@ static int tsc2004_probe(struct i2c_client
> > > > > *i2c,
> > > > >
> > > > > const struct i2c_device_id *id)
> > > > >
> > > > > {
> > > > >
> > > > > - return tsc200x_probe(&i2c->dev, i2c->irq, BUS_I2C,
> > > > > + return tsc200x_probe(&i2c->dev, i2c->irq,
> > > > > &tsc2004_input_id,
> > > > >
> > > > > devm_regmap_init_i2c(i2c,
> > > > > &tsc200x_regmap_config),
> > > > > tsc2004_cmd);
> > > > >
> > > > > }
> > > > >
> > > > > diff --git a/drivers/input/touchscreen/tsc2005.c
> > > > > b/drivers/input/touchscreen/tsc2005.c index b9f593d..f2c5f0e
> > > > > 100644
> > > > > --- a/drivers/input/touchscreen/tsc2005.c
> > > > > +++ b/drivers/input/touchscreen/tsc2005.c
> > > > > @@ -24,6 +24,11 @@
> > > > >
> > > > > #include <linux/regmap.h>
> > > > > #include "tsc200x-core.h"
> > > > >
> > > > > +static const struct input_id tsc2005_input_id = {
> > > > > + .bustype = BUS_SPI,
> > > > > + .product = 2005,
> > > > > +};
> > > > > +
> > > > >
> > > > > static int tsc2005_cmd(struct device *dev, u8 cmd)
> > > > > {
> > > > >
> > > > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > > >
> > > > > @@ -62,7 +67,7 @@ static int tsc2005_probe(struct spi_device
> > > > > *spi)
> > > > >
> > > > > if (error)
> > > > >
> > > > > return error;
> > > > >
> > > > > - return tsc200x_probe(&spi->dev, spi->irq, BUS_SPI,
> > > > > + return tsc200x_probe(&spi->dev, spi->irq,
> > > > > &tsc2005_input_id,
> > > > >
> > > > > devm_regmap_init_spi(spi,
> > > > > &tsc200x_regmap_config),
> > > > > tsc2005_cmd);
> > > > >
> > > > > }
> > > > >
> > > > > diff --git a/drivers/input/touchscreen/tsc200x-core.c
> > > > > b/drivers/input/touchscreen/tsc200x-core.c index
> > > > > 26e81d1b..5e625c4 100644
> > > > > --- a/drivers/input/touchscreen/tsc200x-core.c
> > > > > +++ b/drivers/input/touchscreen/tsc200x-core.c
> > > > > @@ -450,7 +450,7 @@ static void tsc200x_close(struct
> > > > > input_dev *input)
> > > > >
> > > > > mutex_unlock(&ts->mutex);
> > > > >
> > > > > }
> > > > >
> > > > > -int tsc200x_probe(struct device *dev, int irq, __u16
> > > > > bustype, +int tsc200x_probe(struct device *dev, int irq,
> > > > > const struct input_id *tsc_id,
> > > > >
> > > > > struct regmap *regmap,
> > > > > int (*tsc200x_cmd)(struct device *dev, u8 cmd))
> > > > >
> > > > > {
> > > > >
> > > > > @@ -547,9 +547,10 @@ int tsc200x_probe(struct device *dev,
> > > > > int irq, __u16 bustype,
> > > > >
> > > > > snprintf(ts->phys, sizeof(ts->phys),
> > > > >
> > > > > "%s/input-ts", dev_name(dev));
> > > > >
> > > > > - input_dev->name = "TSC200X touchscreen";
> > > > > + input_dev->name = devm_kasprintf(dev, GFP_KERNEL, "TSC%04d
> > > > > touchscreen", + tsc_id->product);
> > > >
> > > > What about:
> > > > if (tsc_id->product == 2005)
> > > >
> > > > input_dev->name = "TSC2005 touchscreen";
> > > >
> > > > else
> > > >
> > > > input_dev->name = "TSC200X touchscreen";
> > > >
> > > > We do want to use 'TSC2005' name for TSC2005, because
> > > > compatibility, but you should keep TSC200X.... because
> > > > compatibility. You don't want to break people's setups by
> > > > going from TSC200X to TSC2004.
> > >
> > > By same logic we shouldn't change from TSC200X back to TSC2005
> > > because of people's possibly new setup in the last 9 months.
> >
> > That's your, broken logic.
> >
> > TSC200X->TSC2005 needs to be fixed, because people seen the TSC2005
> > for past few years.
>
> People might have also seen TSC2005->TSC200X for the last few
> months. They could be dependent on this now and start complaining
> once we revert.
They could. But did it? Is there real breakage of real existing
applications which are in use? I doubt. But there is for opposite
scenario.
Older applications (like Maemo mce) worked with older kernel version,
but not with new due to this change TSC2005->TSC200X.
So I still think this is a regression, which should be fixed...
--
Pali Rohár
pali.rohar@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2016-07-20 19:10 +0200 |
| Subject | Re: [PATCH] Input: tsc200x - Report proper input_dev name |
| Message-ID | <rX3aq-4fX-35@gated-at.bofh.it> |
| In reply to | #1447360 |
On Wed, Jul 20, 2016 at 06:56:51PM +0200, Pali Rohár wrote:
> On Wednesday 20 July 2016 18:45:03 Dmitry Torokhov wrote:
> > On Wed, Jul 20, 2016 at 08:54:05AM +0200, Pavel Machek wrote:
> > > On Wed 2016-07-20 01:50:24, Michael Welling wrote:
> > > > On Wed, Jul 20, 2016 at 08:31:06AM +0200, Pavel Machek wrote:
> > > > > Hi!
> > > > >
> > > > > > Passes input_id struct to the the common probe function for
> > > > > > the tsc200x drivers instead of just the bustype.
> > > > > >
> > > > > > This allows for the use of the product variable to set the
> > > > > > input_dev->name variable according to the type of
> > > > > > touchscreen used.
> > > > > >
> > > > > > Signed-off-by: Michael Welling <mwelling@ieee.org>
> > > > > > ---
> > > > > >
> > > > > > drivers/input/touchscreen/tsc2004.c | 7 ++++++-
> > > > > > drivers/input/touchscreen/tsc2005.c | 7 ++++++-
> > > > > > drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
> > > > > > drivers/input/touchscreen/tsc200x-core.h | 2 +-
> > > > > > 4 files changed, 17 insertions(+), 6 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/input/touchscreen/tsc2004.c
> > > > > > b/drivers/input/touchscreen/tsc2004.c index 7295c19..6fe55d5
> > > > > > 100644
> > > > > > --- a/drivers/input/touchscreen/tsc2004.c
> > > > > > +++ b/drivers/input/touchscreen/tsc2004.c
> > > > > > @@ -22,6 +22,11 @@
> > > > > >
> > > > > > #include <linux/regmap.h>
> > > > > > #include "tsc200x-core.h"
> > > > > >
> > > > > > +static const struct input_id tsc2004_input_id = {
> > > > > > + .bustype = BUS_I2C,
> > > > > > + .product = 2004,
> > > > > > +};
> > > > > > +
> > > > > >
> > > > > > static int tsc2004_cmd(struct device *dev, u8 cmd)
> > > > > > {
> > > > > >
> > > > > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > > > >
> > > > > > @@ -42,7 +47,7 @@ static int tsc2004_probe(struct i2c_client
> > > > > > *i2c,
> > > > > >
> > > > > > const struct i2c_device_id *id)
> > > > > >
> > > > > > {
> > > > > >
> > > > > > - return tsc200x_probe(&i2c->dev, i2c->irq, BUS_I2C,
> > > > > > + return tsc200x_probe(&i2c->dev, i2c->irq,
> > > > > > &tsc2004_input_id,
> > > > > >
> > > > > > devm_regmap_init_i2c(i2c,
> > > > > > &tsc200x_regmap_config),
> > > > > > tsc2004_cmd);
> > > > > >
> > > > > > }
> > > > > >
> > > > > > diff --git a/drivers/input/touchscreen/tsc2005.c
> > > > > > b/drivers/input/touchscreen/tsc2005.c index b9f593d..f2c5f0e
> > > > > > 100644
> > > > > > --- a/drivers/input/touchscreen/tsc2005.c
> > > > > > +++ b/drivers/input/touchscreen/tsc2005.c
> > > > > > @@ -24,6 +24,11 @@
> > > > > >
> > > > > > #include <linux/regmap.h>
> > > > > > #include "tsc200x-core.h"
> > > > > >
> > > > > > +static const struct input_id tsc2005_input_id = {
> > > > > > + .bustype = BUS_SPI,
> > > > > > + .product = 2005,
> > > > > > +};
> > > > > > +
> > > > > >
> > > > > > static int tsc2005_cmd(struct device *dev, u8 cmd)
> > > > > > {
> > > > > >
> > > > > > u8 tx = TSC200X_CMD | TSC200X_CMD_12BIT | cmd;
> > > > > >
> > > > > > @@ -62,7 +67,7 @@ static int tsc2005_probe(struct spi_device
> > > > > > *spi)
> > > > > >
> > > > > > if (error)
> > > > > >
> > > > > > return error;
> > > > > >
> > > > > > - return tsc200x_probe(&spi->dev, spi->irq, BUS_SPI,
> > > > > > + return tsc200x_probe(&spi->dev, spi->irq,
> > > > > > &tsc2005_input_id,
> > > > > >
> > > > > > devm_regmap_init_spi(spi,
> > > > > > &tsc200x_regmap_config),
> > > > > > tsc2005_cmd);
> > > > > >
> > > > > > }
> > > > > >
> > > > > > diff --git a/drivers/input/touchscreen/tsc200x-core.c
> > > > > > b/drivers/input/touchscreen/tsc200x-core.c index
> > > > > > 26e81d1b..5e625c4 100644
> > > > > > --- a/drivers/input/touchscreen/tsc200x-core.c
> > > > > > +++ b/drivers/input/touchscreen/tsc200x-core.c
> > > > > > @@ -450,7 +450,7 @@ static void tsc200x_close(struct
> > > > > > input_dev *input)
> > > > > >
> > > > > > mutex_unlock(&ts->mutex);
> > > > > >
> > > > > > }
> > > > > >
> > > > > > -int tsc200x_probe(struct device *dev, int irq, __u16
> > > > > > bustype, +int tsc200x_probe(struct device *dev, int irq,
> > > > > > const struct input_id *tsc_id,
> > > > > >
> > > > > > struct regmap *regmap,
> > > > > > int (*tsc200x_cmd)(struct device *dev, u8 cmd))
> > > > > >
> > > > > > {
> > > > > >
> > > > > > @@ -547,9 +547,10 @@ int tsc200x_probe(struct device *dev,
> > > > > > int irq, __u16 bustype,
> > > > > >
> > > > > > snprintf(ts->phys, sizeof(ts->phys),
> > > > > >
> > > > > > "%s/input-ts", dev_name(dev));
> > > > > >
> > > > > > - input_dev->name = "TSC200X touchscreen";
> > > > > > + input_dev->name = devm_kasprintf(dev, GFP_KERNEL, "TSC%04d
> > > > > > touchscreen", + tsc_id->product);
> > > > >
> > > > > What about:
> > > > > if (tsc_id->product == 2005)
> > > > >
> > > > > input_dev->name = "TSC2005 touchscreen";
> > > > >
> > > > > else
> > > > >
> > > > > input_dev->name = "TSC200X touchscreen";
> > > > >
> > > > > We do want to use 'TSC2005' name for TSC2005, because
> > > > > compatibility, but you should keep TSC200X.... because
> > > > > compatibility. You don't want to break people's setups by
> > > > > going from TSC200X to TSC2004.
> > > >
> > > > By same logic we shouldn't change from TSC200X back to TSC2005
> > > > because of people's possibly new setup in the last 9 months.
> > >
> > > That's your, broken logic.
> > >
> > > TSC200X->TSC2005 needs to be fixed, because people seen the TSC2005
> > > for past few years.
> >
> > People might have also seen TSC2005->TSC200X for the last few
> > months. They could be dependent on this now and start complaining
> > once we revert.
>
> They could. But did it? Is there real breakage of real existing
> applications which are in use? I doubt. But there is for opposite
> scenario.
>
> Older applications (like Maemo mce) worked with older kernel version,
> but not with new due to this change TSC2005->TSC200X.
>
> So I still think this is a regression, which should be fixed...
OK, fine, let's keep 200X for 2004, and real number for everyone else.
Thanks.
--
Dmitry
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | linux.kernel
csiph-web