Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1480426 > unrolled thread
| Started by | Simon Wood <gitsend@mungewell.org> |
|---|---|
| First post | 2016-09-10 01:00 +0200 |
| Last post | 2016-09-14 21:00 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/5] HID:hid-logitech: Rewrite of descriptor for all DF wheels Simon Wood <gitsend@mungewell.org> - 2016-09-10 01:00 +0200
Re: [PATCH 4/5] HID:hid-logitech: Rewrite of descriptor for all DF wheels kbuild test robot <lkp@intel.com> - 2016-09-10 03:40 +0200
Re: [PATCH 4/5] HID:hid-logitech: Rewrite of descriptor for all DF wheels "Simon Wood" <simon@mungewell.org> - 2016-09-14 21:00 +0200
| From | Simon Wood <gitsend@mungewell.org> |
|---|---|
| Date | 2016-09-10 01:00 +0200 |
| Subject | [PATCH 4/5] HID:hid-logitech: Rewrite of descriptor for all DF wheels |
| Message-ID | <sfCW6-tE-15@gated-at.bofh.it> |
Rewrite the HID descriptor for _all_ Driving Force wheels (real
or emulated) so that they can report separate Accelerator and
Brake axis.
If the user wants a combined accel/brake axis, they can use the
'combined pedals' feature.
$ echo 1 > /sys/bus/hid/devices/<device-id>/combine_pedals
Signed-off-by: Simon Wood <simon@mungewell.org>
---
drivers/hid/hid-lg.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index 06f8a5e..53429c6 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -365,18 +365,7 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
/* Several wheels report as this id when operating in emulation mode. */
case USB_DEVICE_ID_LOGITECH_WHEEL:
- udesc = &(hid_to_usb_dev(hdev)->descriptor);
- if (!udesc) {
- hid_err(hdev, "NULL USB device descriptor\n");
- break;
- }
- bcdDevice = le16_to_cpu(udesc->bcdDevice);
- rev_maj = bcdDevice >> 8;
- rev_min = bcdDevice & 0xff;
-
- /* Update the report descriptor for only the Driving Force wheel */
- if (rev_maj == 1 && rev_min == 2 &&
- *rsize == DF_RDESC_ORIG_SIZE) {
+ if (*rsize == DF_RDESC_ORIG_SIZE) {
hid_info(hdev,
"fixing up Logitech Driving Force report descriptor\n");
rdesc = df_rdesc_fixed;
--
2.7.4
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-09-10 03:40 +0200 |
| Subject | Re: [PATCH 4/5] HID:hid-logitech: Rewrite of descriptor for all DF wheels |
| Message-ID | <sfFqW-24A-5@gated-at.bofh.it> |
| In reply to | #1480426 |
[Multipart message — attachments visible in raw view] — view raw
Hi Simon,
[auto build test WARNING on hid/for-next]
[also build test WARNING on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Simon-Wood/HID-hid-logitech-Introduce-dev_attr-for-combined-pedals-feature/20160910-065505
base: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-next
config: sh-titan_defconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sh
All warnings (new ones prefixed by >>):
drivers/hid/hid-lg.c: In function 'lg_report_fixup':
>> drivers/hid/hid-lg.c:347:28: warning: unused variable 'rev_min' [-Wunused-variable]
__u16 bcdDevice, rev_maj, rev_min;
^
>> drivers/hid/hid-lg.c:347:19: warning: unused variable 'rev_maj' [-Wunused-variable]
__u16 bcdDevice, rev_maj, rev_min;
^
>> drivers/hid/hid-lg.c:347:8: warning: unused variable 'bcdDevice' [-Wunused-variable]
__u16 bcdDevice, rev_maj, rev_min;
^
>> drivers/hid/hid-lg.c:346:32: warning: unused variable 'udesc' [-Wunused-variable]
struct usb_device_descriptor *udesc;
^
vim +/rev_min +347 drivers/hid/hid-lg.c
5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 340 * the original value of 0x28c of logical maximum to 0x104d
5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 341 */
73e4008d drivers/hid/hid-lg.c Nikolai Kondrashov 2010-08-06 342 static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,
73e4008d drivers/hid/hid-lg.c Nikolai Kondrashov 2010-08-06 343 unsigned int *rsize)
5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 344 {
25751553 drivers/hid/hid-lg.c Axel Lin 2012-09-13 345 struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
54bfe3f0 drivers/hid/hid-lg.c Paul Sbarra 2013-02-17 @346 struct usb_device_descriptor *udesc;
54bfe3f0 drivers/hid/hid-lg.c Paul Sbarra 2013-02-17 @347 __u16 bcdDevice, rev_maj, rev_min;
5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 348
4ab25786 drivers/hid/hid-lg.c Jiri Kosina 2014-08-21 349 if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 &&
5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 350 rdesc[84] == 0x8c && rdesc[85] == 0x02) {
:::::: The code at line 347 was first introduced by commit
:::::: 54bfe3f0dab2b2f0ac629690f187537d95adeb4f HID: logitech: add report descriptor for Driving Force wheel
:::::: TO: Paul Sbarra <sbarra.paul@gmail.com>
:::::: CC: Jiri Kosina <jkosina@suse.cz>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | "Simon Wood" <simon@mungewell.org> |
|---|---|
| Date | 2016-09-14 21:00 +0200 |
| Subject | Re: [PATCH 4/5] HID:hid-logitech: Rewrite of descriptor for all DF wheels |
| Message-ID | <shnzA-4sf-21@gated-at.bofh.it> |
| In reply to | #1480426 |
On Fri, September 9, 2016 7:34 pm, kbuild test robot wrote: > All warnings (new ones prefixed by >>): > > > drivers/hid/hid-lg.c: In function 'lg_report_fixup': > >>> drivers/hid/hid-lg.c:347:28: warning: unused variable 'rev_min' >>> [-Wunused-variable] >>> > __u16 bcdDevice, rev_maj, rev_min; > ^ > >>> drivers/hid/hid-lg.c:347:19: warning: unused variable 'rev_maj' >>> [-Wunused-variable] >>> > __u16 bcdDevice, rev_maj, rev_min; > ^ > >>> drivers/hid/hid-lg.c:347:8: warning: unused variable 'bcdDevice' >>> [-Wunused-variable] >>> > __u16 bcdDevice, rev_maj, rev_min; > ^ > >>> drivers/hid/hid-lg.c:346:32: warning: unused variable 'udesc' >>> [-Wunused-variable] >>> > struct usb_device_descriptor *udesc; ^ Hi all, No other comments from the rest of the patch set (so far), so I'll send a V2 patch set to cover these towards the end of the week. Also have better support for the "Wingman Forumula Force GT" to include, as I picked one up cheap on Kijiji. Simon.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web