From patchwork Mon Jan 8 09:19:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "sandeep.cs" X-Patchwork-Id: 13513192 X-Patchwork-Delegate: jikos@jikos.cz Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F45211C88 for ; Mon, 8 Jan 2024 09:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="Drt3uTDS" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240108091957epoutp01f7c9dd8ff2f8bbb02690b6917e08e18e~oVLWMvhfX1946819468epoutp01F for ; Mon, 8 Jan 2024 09:19:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240108091957epoutp01f7c9dd8ff2f8bbb02690b6917e08e18e~oVLWMvhfX1946819468epoutp01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1704705597; bh=dzkbZ/aJDTM0eaofC0HD6c34S5tpUkSxQ0jX4ZPNcl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Drt3uTDSrSWgm0PXthwFHhWb2a3HdEpPCoZnyNqms3ldN34VI+Fbzf4clMVYreEBe vmZl1RLSP2HyHSI5eFbuPcXBlwWaV1FxLwIS+6tLIsk4OsuMeLiZ47ejYHNff+nKAu STiiVh3dJVUPTsnyz86mYN9LQLC1NNOzIkXe8Qnk= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240108091957epcas5p377edd7dd749865ee39043cb46804e89b~oVLV29tfH0530905309epcas5p3A; Mon, 8 Jan 2024 09:19:57 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.181]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4T7pRv2KY2z4x9Q9; Mon, 8 Jan 2024 09:19:55 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id A0.22.10009.B3EBB956; Mon, 8 Jan 2024 18:19:55 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20240108091954epcas5p39f9ca04b57adf01a7c964593b7be87d2~oVLTprznt0530905309epcas5p36; Mon, 8 Jan 2024 09:19:54 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240108091954epsmtrp22c13cd3c054fe334f3ca96fbdd4bbfb8~oVLTo9VEM1969219692epsmtrp2-; Mon, 8 Jan 2024 09:19:54 +0000 (GMT) X-AuditID: b6c32a4a-261fd70000002719-ad-659bbe3b11d0 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 87.A0.18939.A3EBB956; Mon, 8 Jan 2024 18:19:54 +0900 (KST) Received: from ws2030077324.sa.corp.samsungelectronics.net (unknown [107.99.237.91]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240108091953epsmtip24c355d58e1a701143ce2c650e39232b4~oVLSN3PR02117321173epsmtip2i; Mon, 8 Jan 2024 09:19:53 +0000 (GMT) From: Sandeep C S To: Jiri Kosina , Benjamin Tissoires Cc: gaudium.lee@samsung.com, ih0923.kim@samsung.com, suhyun_.kim@samsung.com, jitender.s21@samsung.com, junwan.cho@samsung.com, sandeep.cs@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [HID Patchsets for Samsung driver v2 1/6] HID Samsung : Broaden device compatibility in samsung driver. Date: Mon, 8 Jan 2024 14:49:11 +0530 Message-Id: <20240108091917.1552013-2-sandeep.cs@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108091917.1552013-1-sandeep.cs@samsung.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphk+LIzCtJLcpLzFFi42LZdlhTQ9d63+xUg7U7BSyuT9nManF7gafF 1iVzWS1uHW9ltHj5YAO7xebJj1gsbn76xmpxedccNov22c8YLR6t2MTkwOWxaVUnm8f7fVfZ PPq2rGL0+LxJLoAlKtsmIzUxJbVIITUvOT8lMy/dVsk7ON453tTMwFDX0NLCXEkhLzE31VbJ xSdA1y0zB+geJYWyxJxSoFBAYnGxkr6dTVF+aUmqQkZ+cYmtUmpBSk6BSYFecWJucWleul5e aomVoYGBkSlQYUJ2xrE1S1kKtglULP97nqWB8QRvFyMnh4SAicSX8+dZuhi5OIQEdjNK/J+z nhnC+cQosWLDc3aQKjDn0gNBmI5v814yQRTtZJQ4O2UJVHsnk8TstvnMIFVsAloSfUe+M4HY IgIREu8WbGIEsZkFrjNKPHgYCGILCxRJ7Hz9iw3EZhFQldj2axuYzStgK7F16iVmiG3yEvsP ngWzOQXsJLY92cgEUSMocXLmExaImfISzVtng50tIfCRXeJt91agQRxAjotE4yE+iDnCEq+O b2GHsKUkPr/bywZR380osfT2MXYIZwajRMvOq1Cb7SV+vp4ANohZQFNi/S59iGV8Er2/nzBB zOeV6GgTgqhWkXjatZsVZv73ExB3Sgh4SGyaMR8aihMZJe7dMp/AKD8LyQuzkLwwC2HZAkbm VYySqQXFuempxaYFRnmp5fCITc7P3cQITpZaXjsYHz74oHeIkYmD8RCjBAezkgiv5IzZqUK8 KYmVValF+fFFpTmpxYcY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DJ2KS1x+LLzMeKercEO6pp9w7Dlv9n2PLjRsMOBhO/C5 rNkv/hibTe8VgYZNh08wP45JK7V6dnwuw5ZT+8+ctt+m4Ta7eAnvvXyu/xvqLNOlfDcvKy/z W/i5RUqW8XpJ/O2WiXlKj7iv7RE8us6/q/mq1oY5+TfcZ/Cy2nM1ME4IMksSSpku1cd2ICir lGHSofU1j2Tan5rnai6dt+cX26Lcizeq7F3mzmtLOh+61I5ZbItV/6znXde+PT/x1z9k+eH3 GfMr3y8++17EQkuF38bkZveHpz/an2n2XN5XWvbDJGztc/GURz9sd0wzU2Ipzkg01GIuKk4E ADcM4nngAgAA X-CMS-MailID: 20240108091954epcas5p39f9ca04b57adf01a7c964593b7be87d2 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240108091954epcas5p39f9ca04b57adf01a7c964593b7be87d2 References: <20240108091917.1552013-1-sandeep.cs@samsung.com> The USB validation check has been moved wherever its required. Earlier Samsung driver only handles USB HID devices and returns an error if it encounters a Bluetooth type of HID device. This changes improves driver compatibility and extends its support for a wide range of devices. Signed-off-by: Sandeep C S Signed-off-by: Junwan Cho Signed-off-by: Jitender Sajwan --- drivers/hid/hid-samsung.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index cf5992e97094..885657531607 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c @@ -128,7 +128,7 @@ static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev, static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { - if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product) + if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product && hid_is_usb(hdev)) rdesc = samsung_irda_report_fixup(hdev, rdesc, rsize); return rdesc; } @@ -139,7 +139,7 @@ static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, { int ret = 0; - if (USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE == hdev->product) + if (USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE == hdev->product && hid_is_usb(hdev)) ret = samsung_kbd_mouse_input_mapping(hdev, hi, field, usage, bit, max); @@ -152,9 +152,6 @@ static int samsung_probe(struct hid_device *hdev, int ret; unsigned int cmask = HID_CONNECT_DEFAULT; - if (!hid_is_usb(hdev)) - return -EINVAL; - ret = hid_parse(hdev); if (ret) { hid_err(hdev, "parse failed\n"); @@ -162,6 +159,10 @@ static int samsung_probe(struct hid_device *hdev, } if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product) { + if (!hid_is_usb(hdev)) { + ret = -EINVAL; + goto err_free; + } if (hdev->rsize == 184) { /* disable hidinput, force hiddev */ cmask = (cmask & ~HID_CONNECT_HIDINPUT) | From patchwork Mon Jan 8 09:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "sandeep.cs" X-Patchwork-Id: 13513191 X-Patchwork-Delegate: jikos@jikos.cz Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90CD41170B for ; Mon, 8 Jan 2024 09:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="mWxyJa3K" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240108092002epoutp01cd1258ebd89f5b91855fe7885905d79d~oVLakkUvU1946519465epoutp01I for ; Mon, 8 Jan 2024 09:20:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240108092002epoutp01cd1258ebd89f5b91855fe7885905d79d~oVLakkUvU1946519465epoutp01I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1704705602; bh=CpiTAUIjCffO8FsyEJ+Hs/0pW8pQa7U6hHyxRCcPq3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mWxyJa3KneWp1vNqbvmW5ndnuIRCV8fiXqUeVdEVpXHQCwXO9FOZIDKUITWlLRxdd PrK7lKthbI+4Vx/R8xhD+/rdm1eBAWw8Ex0k8flxtihUFiklY5RKJZwlvTBINYFzJP S8LrOR6jFcXNd39pcB9khCvcUz/8G/TXdDpG0Bt4= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240108092002epcas5p36ee1c90d1bb977c054ad1d3b71f2abc3~oVLaN3d2T0530905309epcas5p3K; Mon, 8 Jan 2024 09:20:02 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.177]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4T7pS02932z4x9Q1; Mon, 8 Jan 2024 09:20:00 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 3B.3B.09634.04EBB956; Mon, 8 Jan 2024 18:20:00 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20240108091959epcas5p2559b779424e2fb7c7e268d1b24612b4f~oVLX-fuBT0997409974epcas5p26; Mon, 8 Jan 2024 09:19:59 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240108091959epsmtrp12a170f12ee8ff622724e51edbe959e71~oVLX_BxSH1893518935epsmtrp1C; Mon, 8 Jan 2024 09:19:59 +0000 (GMT) X-AuditID: b6c32a49-159fd700000025a2-d6-659bbe40e2e5 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id CE.A0.18939.F3EBB956; Mon, 8 Jan 2024 18:19:59 +0900 (KST) Received: from ws2030077324.sa.corp.samsungelectronics.net (unknown [107.99.237.91]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240108091958epsmtip2983f17ab6845702dcc42be0caef7babb~oVLWi8qvW2117321173epsmtip2r; Mon, 8 Jan 2024 09:19:57 +0000 (GMT) From: Sandeep C S To: Jiri Kosina , Benjamin Tissoires Cc: gaudium.lee@samsung.com, ih0923.kim@samsung.com, suhyun_.kim@samsung.com, jitender.s21@samsung.com, junwan.cho@samsung.com, sandeep.cs@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [HID Patchsets for Samsung driver v2 2/6] HID: Samsung : Fix the checkpatch complain. Date: Mon, 8 Jan 2024 14:49:12 +0530 Message-Id: <20240108091917.1552013-3-sandeep.cs@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108091917.1552013-1-sandeep.cs@samsung.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphk+LIzCtJLcpLzFFi42LZdlhTU9dh3+xUg+WtfBbXp2xmtbi9wNNi 65K5rBa3jrcyWrx8sIHdYvPkRywWNz99Y7W4vGsOm0X77GeMFo9WbGJy4PLYtKqTzeP9vqts Hn1bVjF6fN4kF8ASlW2TkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk 4hOg65aZA3SPkkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafApECvODG3uDQvXS8v tcTK0MDAyBSoMCE749XVG2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Y3Pz0jdXi8q45bBbts58xWjxasYnJgctj06pONo/3+66y efRtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfGq6s32ArOqFY0b1/P0sC4Sb6LkZNDQsBEYvLh TrYuRi4OIYHtjBJtU/qYIRJSEquu32OEsIUlVv57zg5iCwm0M0n8+lgNYrMJaEn0HfnOBGKL CERITPu3lhFkELPAfUaJrfuvsoEkhAXiJG6+mczaxcjBwSKgKrFwTgxImFfAVuJvwx8miPny EvsPngXbyylgJ7HtyUYmiF22Ei+mfGOHqBeUODnzCQuIzQxU37x1NvMERoFZSFKzkKQWMDKt YhRNLSjOTc9NLjDUK07MLS7NS9dLzs/dxAgOb62gHYzL1v/VO8TIxMF4iFGCg1lJhFdyxuxU Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4rzKOZ0pQgLpiSWp2ampBalFMFkmDk6pBqYZl1/a3Z28 m1Ve/BL3X4/fj6r3fwjOcyxYF6W3JZex+75WV+Isy+DFu//5etp8d97JJGzH6xuebjrjzNRj W+/dOZuUf09I/B1nyZE787aJ7qqVfGGmVa9yYl51pybj83N9L+VXTEwqPp0o90XKMOI3n4uW y+49ZrlC31KS38vvnPjt8iW5fua5Z1wWVD4wv680K6nnfNfi3zos666n7uae9N+Yx37ug+bT ewqs8lx8Ujdpecko+TF/nnHf/nHK26U/ppTOdGJhS/hb7bpP9Z/b5pnmL5pyV95eynAmhcEp 9dqj33O//uvqcPhgZ3NHmOlljo7lg1O3Fq9+GC4u0VX7a0PPjqNhTGrHI1xecN1VYinOSDTU Yi4qTgQAMs6Nyt4CAAA= X-CMS-MailID: 20240108091959epcas5p2559b779424e2fb7c7e268d1b24612b4f X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240108091959epcas5p2559b779424e2fb7c7e268d1b24612b4f References: <20240108091917.1552013-1-sandeep.cs@samsung.com> Warning found by checkpatch.pl script. Signed-off-by: Sandeep C S Signed-off-by: Junwan Cho Signed-off-by: Jitender Sajwan --- drivers/hid/hid-samsung.c | 61 +++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index 885657531607..33cc92337394 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c @@ -67,20 +67,17 @@ static __u8 *samsung_irda_report_fixup(struct hid_device *hdev, __u8 *rdesc, rdesc[178] = 0x08; rdesc[180] = 0x06; rdesc[182] = 0x42; - } else - if (*rsize == 203 && rdesc[192] == 0x15 && rdesc[193] == 0x0 && + } else if (*rsize == 203 && rdesc[192] == 0x15 && rdesc[193] == 0x0 && rdesc[194] == 0x25 && rdesc[195] == 0x12) { samsung_irda_dev_trace(hdev, 203); rdesc[193] = 0x1; rdesc[195] = 0xf; - } else - if (*rsize == 135 && rdesc[124] == 0x15 && rdesc[125] == 0x0 && + } else if (*rsize == 135 && rdesc[124] == 0x15 && rdesc[125] == 0x0 && rdesc[126] == 0x25 && rdesc[127] == 0x11) { samsung_irda_dev_trace(hdev, 135); rdesc[125] = 0x1; rdesc[127] = 0xe; - } else - if (*rsize == 171 && rdesc[160] == 0x15 && rdesc[161] == 0x0 && + } else if (*rsize == 171 && rdesc[160] == 0x15 && rdesc[161] == 0x0 && rdesc[162] == 0x25 && rdesc[163] == 0x01) { samsung_irda_dev_trace(hdev, 171); rdesc[161] = 0x1; @@ -99,7 +96,7 @@ static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev, struct usb_interface *intf = to_usb_interface(hdev->dev.parent); unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber; - if (1 != ifnum || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) + if (ifnum != 1 || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) return 0; dbg_hid("samsung wireless keyboard/mouse input mapping event [0x%x]\n", @@ -107,17 +104,39 @@ static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev, switch (usage->hid & HID_USAGE) { /* report 2 */ - case 0x183: samsung_kbd_mouse_map_key_clear(KEY_MEDIA); break; - case 0x195: samsung_kbd_mouse_map_key_clear(KEY_EMAIL); break; - case 0x196: samsung_kbd_mouse_map_key_clear(KEY_CALC); break; - case 0x197: samsung_kbd_mouse_map_key_clear(KEY_COMPUTER); break; - case 0x22b: samsung_kbd_mouse_map_key_clear(KEY_SEARCH); break; - case 0x22c: samsung_kbd_mouse_map_key_clear(KEY_WWW); break; - case 0x22d: samsung_kbd_mouse_map_key_clear(KEY_BACK); break; - case 0x22e: samsung_kbd_mouse_map_key_clear(KEY_FORWARD); break; - case 0x22f: samsung_kbd_mouse_map_key_clear(KEY_FAVORITES); break; - case 0x230: samsung_kbd_mouse_map_key_clear(KEY_REFRESH); break; - case 0x231: samsung_kbd_mouse_map_key_clear(KEY_STOP); break; + case 0x183: + samsung_kbd_mouse_map_key_clear(KEY_MEDIA); + break; + case 0x195: + samsung_kbd_mouse_map_key_clear(KEY_EMAIL); + break; + case 0x196: + samsung_kbd_mouse_map_key_clear(KEY_CALC); + break; + case 0x197: + samsung_kbd_mouse_map_key_clear(KEY_COMPUTER); + break; + case 0x22b: + samsung_kbd_mouse_map_key_clear(KEY_SEARCH); + break; + case 0x22c: + samsung_kbd_mouse_map_key_clear(KEY_WWW); + break; + case 0x22d: + samsung_kbd_mouse_map_key_clear(KEY_BACK); + break; + case 0x22e: + samsung_kbd_mouse_map_key_clear(KEY_FORWARD); + break; + case 0x22f: + samsung_kbd_mouse_map_key_clear(KEY_FAVORITES); + break; + case 0x230: + samsung_kbd_mouse_map_key_clear(KEY_REFRESH); + break; + case 0x231: + samsung_kbd_mouse_map_key_clear(KEY_STOP); + break; default: return 0; } @@ -128,7 +147,7 @@ static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev, static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { - if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product && hid_is_usb(hdev)) + if (hdev->product == USB_DEVICE_ID_SAMSUNG_IR_REMOTE && hid_is_usb(hdev)) rdesc = samsung_irda_report_fixup(hdev, rdesc, rsize); return rdesc; } @@ -139,7 +158,7 @@ static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, { int ret = 0; - if (USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE == hdev->product && hid_is_usb(hdev)) + if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE && hid_is_usb(hdev)) ret = samsung_kbd_mouse_input_mapping(hdev, hi, field, usage, bit, max); @@ -158,7 +177,7 @@ static int samsung_probe(struct hid_device *hdev, goto err_free; } - if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product) { + if (hdev->product == USB_DEVICE_ID_SAMSUNG_IR_REMOTE) { if (!hid_is_usb(hdev)) { ret = -EINVAL; goto err_free; From patchwork Mon Jan 8 09:19:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "sandeep.cs" X-Patchwork-Id: 13513193 X-Patchwork-Delegate: jikos@jikos.cz Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 829D013FEF for ; Mon, 8 Jan 2024 09:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="nbXzWqCD" Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240108092006epoutp013b120f0a3f1c72cea700904c72bb6de4~oVLe1FWvY1935019350epoutp01P for ; Mon, 8 Jan 2024 09:20:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240108092006epoutp013b120f0a3f1c72cea700904c72bb6de4~oVLe1FWvY1935019350epoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1704705606; bh=Aeh63ARlk/fKxiss469QZfuzwt6Eklhg+CnypWQMAXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nbXzWqCDvklBgBF9EjiErRY704MkQ/N9+AtzYwNjs8IsYl61U6G5BC7rDAveRwBTm wIBiRBke0OFKiYbSBsJjcqEt7IzwNbd6cNo5/HJUxoJuj/Uo+aCVc3O++XymT4L7mQ Ee2KQ7d3mWVdVCceWxfUOvX3JpL8X9MPmBhpaU94= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20240108092006epcas5p1ce12f914cf3597107ac22f3006e1d028~oVLejjQ9m1035210352epcas5p1D; Mon, 8 Jan 2024 09:20:06 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.175]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4T7pS45Rlvz4x9Pw; Mon, 8 Jan 2024 09:20:04 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 28.88.09672.44EBB956; Mon, 8 Jan 2024 18:20:04 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20240108092004epcas5p1c7069a6ede85066817d8ce5a79da75ad~oVLcSB51t1035210352epcas5p15; Mon, 8 Jan 2024 09:20:04 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240108092004epsmtrp1e4610ae69a23b1d53b37b43a3cd58bc4~oVLcROMuN1918419184epsmtrp1O; Mon, 8 Jan 2024 09:20:04 +0000 (GMT) X-AuditID: b6c32a4b-39fff700000025c8-c0-659bbe440f66 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 39.57.08755.44EBB956; Mon, 8 Jan 2024 18:20:04 +0900 (KST) Received: from ws2030077324.sa.corp.samsungelectronics.net (unknown [107.99.237.91]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240108092002epsmtip2713df726529de8070f7202c46fada4f7~oVLazhPr42072620726epsmtip2D; Mon, 8 Jan 2024 09:20:02 +0000 (GMT) From: Sandeep C S To: Jiri Kosina , Benjamin Tissoires Cc: gaudium.lee@samsung.com, ih0923.kim@samsung.com, suhyun_.kim@samsung.com, jitender.s21@samsung.com, junwan.cho@samsung.com, sandeep.cs@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [HID Patchsets for Samsung driver v2 3/6] HID: Samsung : Add Samsung wireless keyboard support. Date: Mon, 8 Jan 2024 14:49:13 +0530 Message-Id: <20240108091917.1552013-4-sandeep.cs@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108091917.1552013-1-sandeep.cs@samsung.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphk+LIzCtJLcpLzFFi42LZdlhTXddl3+xUg/V3VCyuT9nManF7gafF 1iVzWS1uHW9ltHj5YAO7xebJj1gsbn76xmpxedccNov22c8YLR6t2MTkwOWxaVUnm8f7fVfZ PPq2rGL0+LxJLoAlKtsmIzUxJbVIITUvOT8lMy/dVsk7ON453tTMwFDX0NLCXEkhLzE31VbJ xSdA1y0zB+geJYWyxJxSoFBAYnGxkr6dTVF+aUmqQkZ+cYmtUmpBSk6BSYFecWJucWleul5e aomVoYGBkSlQYUJ2xrZD01kLfqlVrL16jamBcY5CFyMnh4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Jgctj06pONo/3+66y efRtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfGtkPTWQt+qVWsvXqNqYFxjkIXIyeHhICJxPFX fxm7GLk4hAR2M0ps2XyTCSIhJbHq+j1GCFtYYuW/5+wQRe1MEgsWNLKAJNgEtCT6jnwHaxAR iJCY9m8t2CRmgfuMElv3X2UDSQgLZEg0tr5jBbFZBFQl2nY9AmvgFbCVePFpNzvEBnmJ/QfP MoPYnAJ2EtuebASrEQKpmfKNHaJeUOLkzCdgi5mB6pu3zmaewCgwC0lqFpLUAkamVYySqQXF uem5xYYFhnmp5XrFibnFpXnpesn5uZsYwaGupbmDcfuqD3qHGJk4GA8xSnAwK4nwSs6YnSrE m5JYWZValB9fVJqTWnyIUZqDRUmcV/xFb4qQQHpiSWp2ampBahFMlomDU6qBKaXl+LyrpVKt Hz+pyXvILzL8znyiZ6LDMfGEqsvzs/al5UoyiLwSm+oofparwjLr0D1Vj8vbcy8UXskL0pvM otWTwOSjM6EgjXHPQkm5vdx/atILr7I3LudU4PPbdvdx7nZ9CaHwJcnf7lrvnljW3alxh0WX a8L1kG1c1xdyfbYInXSf/cp63ch+X5UVH77sNDbbl26jXeiyI7U/+ee8pxwXn37ZVXk9k6Fx 6qXJ5if0Lc/PXVcvY5F1kvVWuldctMAac32GXgulGYbOEecqT29P/zf31br7p2frdlVm8bUt vZ7l5te7v+vowr9GpbqnWbMvT38haJH86afLdM87TxmTL5/Y+z2PQ5vve+4WJZbijERDLeai 4kQAaxF6yeQCAAA= X-CMS-MailID: 20240108092004epcas5p1c7069a6ede85066817d8ce5a79da75ad X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240108092004epcas5p1c7069a6ede85066817d8ce5a79da75ad References: <20240108091917.1552013-1-sandeep.cs@samsung.com> Add Support for samsung wireless keyboard with input mapping events. Device 7021 (Samsung wireless keyboard) Signed-off-by: Sandeep C S Signed-off-by: Junwan Cho Signed-off-by: Jitender Sajwan --- drivers/hid/hid-ids.h | 2 + drivers/hid/hid-samsung.c | 108 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 72046039d1be..2f526dc8983a 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1139,8 +1139,10 @@ #define USB_DEVICE_ID_SAITEK_X65 0x0b6a #define USB_VENDOR_ID_SAMSUNG 0x0419 +#define USB_VENDOR_ID_SAMSUNG_ELECTRONICS 0x04e8 #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 +#define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD 0x7021 #define USB_VENDOR_ID_SEMICO 0x1a2c #define USB_DEVICE_ID_SEMICO_USB_KEYKOARD 0x0023 diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index 33cc92337394..611acd7ffd6d 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c @@ -144,6 +144,110 @@ static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev, return 1; } +static int samsung_kbd_input_mapping(struct hid_device *hdev, + struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, + unsigned long **bit, int *max) +{ + if (!(HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE) || + HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE))) + return 0; + + dbg_hid("samsung wireless keyboard input mapping event [0x%x]\n", + usage->hid & HID_USAGE); + + if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { + set_bit(EV_REP, hi->input->evbit); + switch (usage->hid & HID_USAGE) { + /* Only for UK keyboard */ + /* key found */ +#ifdef CONFIG_HID_KK_UPGRADE + case 0x32: + samsung_kbd_mouse_map_key_clear(KEY_KBDILLUMTOGGLE); + break; + case 0x64: + samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); + break; +#else + case 0x32: + samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); + break; + case 0x64: + samsung_kbd_mouse_map_key_clear(KEY_102ND); + break; +#endif + /* Only for BR keyboard */ + case 0x87: + samsung_kbd_mouse_map_key_clear(KEY_RO); + break; + default: + return 0; + } + } + + if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { + switch (usage->hid & HID_USAGE) { + /* report 2 */ + /* MENU */ + case 0x040: + samsung_kbd_mouse_map_key_clear(KEY_MENU); + break; + case 0x18a: + samsung_kbd_mouse_map_key_clear(KEY_MAIL); + break; + case 0x196: + samsung_kbd_mouse_map_key_clear(KEY_WWW); + break; + case 0x19e: + samsung_kbd_mouse_map_key_clear(KEY_SCREENLOCK); + break; + case 0x221: + samsung_kbd_mouse_map_key_clear(KEY_SEARCH); + break; + case 0x223: + samsung_kbd_mouse_map_key_clear(KEY_HOMEPAGE); + break; + /* Smtart Voice Key */ + case 0x300: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY13); + break; + /* RECENTAPPS */ + case 0x301: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY1); + break; + /* APPLICATION */ + case 0x302: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY2); + break; + /* Voice search */ + case 0x305: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY4); + break; + /* QPANEL on/off */ + case 0x306: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY5); + break; + /* SIP on/off */ + case 0x307: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY3); + break; + /* LANG */ + case 0x308: + samsung_kbd_mouse_map_key_clear(KEY_LANGUAGE); + break; + case 0x30a: + samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSDOWN); + break; + case 0x30b: + samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSUP); + break; + default: + return 0; + } + } + + return 1; +} + static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -161,6 +265,9 @@ static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE && hid_is_usb(hdev)) ret = samsung_kbd_mouse_input_mapping(hdev, hi, field, usage, bit, max); + else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) + ret = samsung_kbd_input_mapping(hdev, + hi, field, usage, bit, max); return ret; } @@ -203,6 +310,7 @@ static int samsung_probe(struct hid_device *hdev, static const struct hid_device_id samsung_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) }, { } }; MODULE_DEVICE_TABLE(hid, samsung_devices); From patchwork Mon Jan 8 09:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "sandeep.cs" X-Patchwork-Id: 13513194 X-Patchwork-Delegate: jikos@jikos.cz Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2778114A8E for ; Mon, 8 Jan 2024 09:20:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="ZuFzHN7l" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240108092012epoutp0376c0493fa1c2ac09dc03790bb6670070~oVLjjRTiD2170421704epoutp030 for ; Mon, 8 Jan 2024 09:20:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240108092012epoutp0376c0493fa1c2ac09dc03790bb6670070~oVLjjRTiD2170421704epoutp030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1704705612; bh=JER64z6YgXsvP6WOJLry40zGqwaQo1yWzkXmbxq2ByQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZuFzHN7liIbCSPso378ei+JBi93dMW0EFqKrJen0mrAOgXUdVDA8Rz6MipSd/KklR ICB1ng7pzPlSm3VEvGvxVF4zJcuJ4Gyo+Mx6ZgQBE1xvTzJbysZGXA9UAnCKqss3jl ucdsqsb780l4YA8em2IF7wY0TXdqEDX+Y/T0fnnQ= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20240108092011epcas5p11a77fac6e70603822beeaa8f8eef49d3~oVLjRNr3q2667326673epcas5p1r; Mon, 8 Jan 2024 09:20:11 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.179]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4T7pS96DPkz4x9Py; Mon, 8 Jan 2024 09:20:09 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id EA.88.09672.94EBB956; Mon, 8 Jan 2024 18:20:09 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20240108092009epcas5p15c5be87fa427a5c4426c55c86c5ce3bc~oVLhFrozI2667326673epcas5p1Y; Mon, 8 Jan 2024 09:20:09 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240108092009epsmtrp2ebdbb4c3b337cef34748291db26d2d27~oVLhE_mOG2003120031epsmtrp2C; Mon, 8 Jan 2024 09:20:09 +0000 (GMT) X-AuditID: b6c32a4b-60bfd700000025c8-cd-659bbe4968e3 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 7F.57.08755.94EBB956; Mon, 8 Jan 2024 18:20:09 +0900 (KST) Received: from ws2030077324.sa.corp.samsungelectronics.net (unknown [107.99.237.91]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240108092007epsmtip254afeccaaa7d464d392151075f9d7472~oVLfbglWK2117021170epsmtip2d; Mon, 8 Jan 2024 09:20:07 +0000 (GMT) From: Sandeep C S To: Jiri Kosina , Benjamin Tissoires Cc: gaudium.lee@samsung.com, ih0923.kim@samsung.com, suhyun_.kim@samsung.com, jitender.s21@samsung.com, junwan.cho@samsung.com, sandeep.cs@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [HID Patchsets for Samsung driver v2 4/6] HID: Samsung : Add Samsung wireless gamepad support. Date: Mon, 8 Jan 2024 14:49:14 +0530 Message-Id: <20240108091917.1552013-5-sandeep.cs@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108091917.1552013-1-sandeep.cs@samsung.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplk+LIzCtJLcpLzFFi42LZdlhTU9dz3+xUg1u79C2uT9nManF7gafF 1iVzWS1uHW9ltHj5YAO7xebJj1gsbn76xmpxedccNov22c8YLR6t2MTkwOWxaVUnm8f7fVfZ PPq2rGL0+LxJLoAlKtsmIzUxJbVIITUvOT8lMy/dVsk7ON453tTMwFDX0NLCXEkhLzE31V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QAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsWy7bCSvK7nvtmpBm+28Vpcn7KZ1eL2Ak+L rUvmslrcOt7KaPHywQZ2i82TH7FY3Pz0jdXi8q45bBbts58xWjxasYnJgctj06pONo/3+66y efRtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfGnKtzWQtOKFcs3v2EtYHxuGwXIyeHhICJxNan t1m7GLk4hAR2M0q03T/LApGQklh1/R4jhC0ssfLfc3aIonYmiUkv3rCCJNgEtCT6jnxnArFF BCIkpv1bywhSxCxwn1Fi6/6rbCAJYYF0iSNb14BNYhFQlXjyYSVYnFfAVmLP9Z2sEBvkJfYf PMsMYnMK2Else7IRbKgQUM2LKd/YIeoFJU7OfAJ2HTNQffPW2cwTGAVmIUnNQpJawMi0ilEy taA4Nz232LDAMC+1XK84Mbe4NC9dLzk/dxMjONS1NHcwbl/1Qe8QIxMH4yFGCQ5mJRFeyRmz U4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzir/oTRESSE8sSc1OTS1ILYLJMnFwSjUwHQ99/6XW e8UkO1Ov2A9Xf+nI+imK7UiavGirh95JIbse9pN3djXpbmGq33JY9+2xbvlnLxuyNQ8qN5yf Zs7V1ea298uj4p6ARJ9k/Tzua5NcHhWu0BBn9JpTozDxx7rDl0rNHyjnl733fODIesmk+TW7 ZCHXwk756Rsu6aaZWi1QOssu9NBz5tdJf8Su/WX58f605Xojbn6RmSFfema/9/nUZLpuso/e ow9CZ0o3zlS9nrLX5ppAj47ctiNSO3VvNNY+3hfS9Hn//e+vGsMEXR5x6qieuLfYSGjHQaFM rbItE5u7rU4bKyRP+NRsF7P3+ruUyTxiNzo2n31TsOyMLuuTwtqOf7ZRlXcf7ZmUoMRSnJFo qMVcVJwIANp7o9LkAgAA X-CMS-MailID: 20240108092009epcas5p15c5be87fa427a5c4426c55c86c5ce3bc X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240108092009epcas5p15c5be87fa427a5c4426c55c86c5ce3bc References: <20240108091917.1552013-1-sandeep.cs@samsung.com> Add support for samsung wireless gamepad with input mapping events. Device a000 (Samsung wireless gamepad) Signed-off-by: Sandeep C S Signed-off-by: Junwan Cho Signed-off-by: Jitender Sajwan --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-samsung.c | 95 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 2f526dc8983a..2851dc25f949 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1143,6 +1143,7 @@ #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD 0x7021 +#define USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD 0xa000 #define USB_VENDOR_ID_SEMICO 0x1a2c #define USB_DEVICE_ID_SEMICO_USB_KEYKOARD 0x0023 diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index 611acd7ffd6d..6b08acd3c4fd 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c @@ -248,6 +248,97 @@ static int samsung_kbd_input_mapping(struct hid_device *hdev, return 1; } +static int samsung_gamepad_input_mapping(struct hid_device *hdev, + struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, + unsigned long **bit, int *max) +{ + if (!(HID_UP_BUTTON == (usage->hid & HID_USAGE_PAGE) || + HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE))) + return 0; + + dbg_hid("samsung wireless gamepad input mapping event [0x%x], %ld, %ld, [0x%x]\n", + usage->hid & HID_USAGE, hi->input->evbit[0], hi->input->absbit[0], usage->hid & HID_USAGE_PAGE); + + if (HID_UP_BUTTON == (usage->hid & HID_USAGE_PAGE)) { + switch (usage->hid & HID_USAGE) { + case 0x01: + samsung_kbd_mouse_map_key_clear(BTN_A); + break; + case 0x02: + samsung_kbd_mouse_map_key_clear(BTN_B); + break; + case 0x03: + samsung_kbd_mouse_map_key_clear(BTN_C); + break; + case 0x04: + samsung_kbd_mouse_map_key_clear(BTN_X); + break; + case 0x05: + samsung_kbd_mouse_map_key_clear(BTN_Y); + break; + case 0x06: + samsung_kbd_mouse_map_key_clear(BTN_Z); + break; + case 0x07: + samsung_kbd_mouse_map_key_clear(BTN_TL); + break; + case 0x08: + samsung_kbd_mouse_map_key_clear(BTN_TR); + break; + case 0x09: + samsung_kbd_mouse_map_key_clear(BTN_TL2); + break; + case 0x0a: + samsung_kbd_mouse_map_key_clear(BTN_TR2); + break; + case 0x0b: + samsung_kbd_mouse_map_key_clear(BTN_SELECT); + break; + case 0x0c: + samsung_kbd_mouse_map_key_clear(BTN_START); + break; + case 0x0d: + samsung_kbd_mouse_map_key_clear(BTN_MODE); + break; + case 0x0e: + samsung_kbd_mouse_map_key_clear(BTN_THUMBL); + break; + case 0x0f: + samsung_kbd_mouse_map_key_clear(BTN_THUMBR); + break; + case 0x10: + samsung_kbd_mouse_map_key_clear(0x13f); + break; + default: + return 0; + } + } + + if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { + switch (usage->hid & HID_USAGE) { + case 0x040: + samsung_kbd_mouse_map_key_clear(KEY_MENU); + break; + case 0x223: + samsung_kbd_mouse_map_key_clear(KEY_HOMEPAGE); + break; + case 0x224: + samsung_kbd_mouse_map_key_clear(KEY_BACK); + break; + + /* Screen Capture */ + case 0x303: + samsung_kbd_mouse_map_key_clear(KEY_SYSRQ); + break; + + default: + return 0; + } + } + + return 1; +} + static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -268,6 +359,9 @@ static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) ret = samsung_kbd_input_mapping(hdev, hi, field, usage, bit, max); + else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) + ret = samsung_gamepad_input_mapping(hdev, + hi, field, usage, bit, max); return ret; } @@ -311,6 +405,7 @@ static const struct hid_device_id samsung_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) }, { } }; MODULE_DEVICE_TABLE(hid, samsung_devices); From patchwork Mon Jan 8 09:19:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "sandeep.cs" X-Patchwork-Id: 13513195 X-Patchwork-Delegate: jikos@jikos.cz Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1646D22073 for ; Mon, 8 Jan 2024 09:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="fQ6/yQxV" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240108092020epoutp03b7a27f4a021b6a765ba090a4c89dc204~oVLrNH5Sx2237722377epoutp03g for ; Mon, 8 Jan 2024 09:20:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240108092020epoutp03b7a27f4a021b6a765ba090a4c89dc204~oVLrNH5Sx2237722377epoutp03g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1704705620; bh=n5G3LFStaWOaj8LKX+Yj5qv1FL8fnQNC3jRblVEBwZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fQ6/yQxVUBOs7TSlPU5KulIs4PrTdAlV19rLtHh6yuI7R+IHp8TTOmoHdU5yBSxsK l6JOesEqPypJLE/JqvWBwFi0+36Yu096M2UOSKWjStPnklwZjktQTcaZjogl7d6YuV yXgG2ftjV/O6raf8z+VM6hv0JRDQ/kMm/R8iWvmY= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240108092019epcas5p32bb7cedfa6eae9ccfc0871ae5fcefbc7~oVLq19bw60530905309epcas5p3B; Mon, 8 Jan 2024 09:20:19 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.181]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4T7pSL0fD6z4x9Px; Mon, 8 Jan 2024 09:20:18 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 26.32.10009.15EBB956; Mon, 8 Jan 2024 18:20:17 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20240108092017epcas5p24c1c263149a0a8bf3204c86925e3cfd9~oVLoxkwlr0637406374epcas5p2Z; Mon, 8 Jan 2024 09:20:17 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240108092017epsmtrp1ef99b2c3aa419f9c256adedbe3d85f9c~oVLow1Sqz1924619246epsmtrp1T; Mon, 8 Jan 2024 09:20:17 +0000 (GMT) X-AuditID: b6c32a4a-261fd70000002719-ef-659bbe510e22 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 98.D0.18939.15EBB956; Mon, 8 Jan 2024 18:20:17 +0900 (KST) Received: from ws2030077324.sa.corp.samsungelectronics.net (unknown [107.99.237.91]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240108092015epsmtip298468bd97585da0b265c6f4d1e4d2783~oVLnOrt3l2167221672epsmtip2B; Mon, 8 Jan 2024 09:20:15 +0000 (GMT) From: Sandeep C S To: Jiri Kosina , Benjamin Tissoires Cc: gaudium.lee@samsung.com, ih0923.kim@samsung.com, suhyun_.kim@samsung.com, jitender.s21@samsung.com, junwan.cho@samsung.com, sandeep.cs@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [HID Patchsets for Samsung driver v2 5/6] HID: Samsung : Add Samsung wireless action mouse support. Date: Mon, 8 Jan 2024 14:49:15 +0530 Message-Id: <20240108091917.1552013-6-sandeep.cs@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108091917.1552013-1-sandeep.cs@samsung.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphk+LIzCtJLcpLzFFi42LZdlhTQzdw3+xUgzOnbCyuT9nManF7gafF 1iVzWS1uHW9ltHj5YAO7xebJj1gsbn76xmpxedccNov22c8YLR6t2MTkwOWxaVUnm8f7fVfZ PPq2rGL0+LxJLoAlKtsmIzUxJbVIITUvOT8lMy/dVsk7ON453tTMwFDX0NLCXEkhLzE31VbJ xSdA1y0zB+geJYWyxJxSoFBAYnGxkr6dTVF+aUmqQkZ+cYmtUmpBSk6BSYFecWJucWleul5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rUvmslrcOt7KaPHywQZ2i82TH7FY3Pz0jdXi8q45bBbts58xWjxasYnJgctj06pONo/3+66y efRtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfG/gsrWQpWiVe8nOjQwNgo0sXIySEhYCJxZm4j YxcjF4eQwHZGiW9rr7BAJKQkVl2/xwhhC0us/PecHaKonUni6KnTYAk2AS2JviPfmUBsEYEI iWn/1oJNYha4zyixdf9VNpCEsECOxLUJ15lBbBYBVYltl9+AbeAVsJVo29oOtU1eYv/Bs2A1 nAJ2EtuebAQbKgRU82LKN3aIekGJkzOfgNUzA9U3b53NPIFRYBaS1CwkqQWMTKsYRVMLinPT c5MLDPWKE3OLS/PS9ZLzczcxggNcK2gH47L1f/UOMTJxMB5ilOBgVhLhlZwxO1WINyWxsiq1 KD++qDQntfgQozQHi5I4r3JOZ4qQQHpiSWp2ampBahFMlomDU6qByZzt/WEn355YWYZzcYc3 vTXskfm/VDO/6nifWLJP3uGvO59dWHhWpO3l+qWrhD+VHVk9T5KF43/ovY2zE763W06z0+yb 4166JHTx57kNv9ZuZL12/MU9TbYK3vPt7C6Rk6detVmoVchV9FONjTl7UceGqsevTyrf2ZwR dPWT6CldwSStpJDaZTZLVJ5xSJsX8P8/fW+KF7PfvQVr1B4pVHLwcX+8wiWn9XlilGDh1PTq ZTw3TRY9V87Jl1rRZsD74V3WwQPP3sTrrRN/mBlQvXqxo1rCzBsRAWc2Goeu9z9xKUhtXc+f pqv2d9MuSBbGc9lWGOzc/bNanePtuger/OSdjigLfbbeF2ef3FOWr8RSnJFoqMVcVJwIAPa6 amTfAgAA X-CMS-MailID: 20240108092017epcas5p24c1c263149a0a8bf3204c86925e3cfd9 X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240108092017epcas5p24c1c263149a0a8bf3204c86925e3cfd9 References: <20240108091917.1552013-1-sandeep.cs@samsung.com> Add support for samsung wireless action mouse with input mapping events. Device a004 (Samsung wireless action mouse) Signed-off-by: Sandeep C S Signed-off-by: Junwan Cho Signed-off-by: Jitender Sajwan --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-samsung.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 2851dc25f949..b1208d04712c 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1144,6 +1144,7 @@ #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD 0x7021 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD 0xa000 +#define USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE 0xa004 #define USB_VENDOR_ID_SEMICO 0x1a2c #define USB_DEVICE_ID_SEMICO_USB_KEYKOARD 0x0023 diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index 6b08acd3c4fd..36ab9540e064 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c @@ -339,6 +339,29 @@ static int samsung_gamepad_input_mapping(struct hid_device *hdev, return 1; } +static int samsung_actionmouse_input_mapping(struct hid_device *hdev, + struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, + unsigned long **bit, int *max) +{ + + dbg_hid("samsung wireless actionmouse input mapping event [0x%x], [0x%x], %ld, %ld, [0x%x]\n", + usage->hid, usage->hid & HID_USAGE, hi->input->evbit[0], hi->input->absbit[0], + usage->hid & HID_USAGE_PAGE); + + if (((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) && ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON)) + return 0; + + switch (usage->hid & HID_USAGE) { + case 0x301: + samsung_kbd_mouse_map_key_clear(254); + break; + default: + return 0; + } + + return 1; +} + static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -362,6 +385,9 @@ static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) ret = samsung_gamepad_input_mapping(hdev, hi, field, usage, bit, max); + else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE) + ret = samsung_actionmouse_input_mapping(hdev, + hi, field, usage, bit, max); return ret; } @@ -406,6 +432,7 @@ static const struct hid_device_id samsung_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE) }, { } }; MODULE_DEVICE_TABLE(hid, samsung_devices); From patchwork Mon Jan 8 09:19:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "sandeep.cs" X-Patchwork-Id: 13513196 X-Patchwork-Delegate: jikos@jikos.cz Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC9C02941E for ; Mon, 8 Jan 2024 09:20:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="jM4KlA8I" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240108092028epoutp02bc357588ada76b8a81d7cd3b2c6d401f~oVLykHZTj3252632526epoutp02Z for ; Mon, 8 Jan 2024 09:20:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240108092028epoutp02bc357588ada76b8a81d7cd3b2c6d401f~oVLykHZTj3252632526epoutp02Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1704705628; bh=f7oEAqGc3D1UQYparyVNa8WFZxoDPCcV8mgY0hQuHNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jM4KlA8IiubKgWM1FRGiyC/nW5vo7zmxWonzpz+oYpfDWprK2zNZ9awrAXsw4Qn6F Bv5sNSsMeACb31ePrO2/rFxtbZ13BOyDp/92cOeza+2MiWtZWL+vQYSGeZ98/7pq4i GSME2/PERFHkp2S0NvTid7AOJSaOPKtnqCNbCuQ0= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240108092027epcas5p392d31e572aa553e7cf907e920885c561~oVLyHPbMs0528705287epcas5p3K; Mon, 8 Jan 2024 09:20:27 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.181]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4T7pST6FkVz4x9Q4; Mon, 8 Jan 2024 09:20:25 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 6B.32.10009.95EBB956; Mon, 8 Jan 2024 18:20:25 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20240108092025epcas5p39e2ecb3b12b4fba9e41f0694f430ec1d~oVLwDr3Gl0532205322epcas5p3s; Mon, 8 Jan 2024 09:20:25 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240108092025epsmtrp2a8eab9146eecf2ff52dab07c38705603~oVLwCWUDP2017920179epsmtrp21; Mon, 8 Jan 2024 09:20:25 +0000 (GMT) X-AuditID: b6c32a4a-ff1ff70000002719-0a-659bbe599c82 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id B4.E0.18939.95EBB956; Mon, 8 Jan 2024 18:20:25 +0900 (KST) Received: from ws2030077324.sa.corp.samsungelectronics.net (unknown [107.99.237.91]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240108092023epsmtip24d4cae43eaa0bc47c78f6ad265e60e3c~oVLufuCik2133021330epsmtip24; Mon, 8 Jan 2024 09:20:23 +0000 (GMT) From: Sandeep C S To: Jiri Kosina , Benjamin Tissoires Cc: gaudium.lee@samsung.com, ih0923.kim@samsung.com, suhyun_.kim@samsung.com, jitender.s21@samsung.com, junwan.cho@samsung.com, sandeep.cs@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [HID Patchsets for Samsung driver v2 6/6] HID: Samsung : Add Samsung wireless bookcover and universal keyboard support. Date: Mon, 8 Jan 2024 14:49:16 +0530 Message-Id: <20240108091917.1552013-7-sandeep.cs@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108091917.1552013-1-sandeep.cs@samsung.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnk+LIzCtJLcpLzFFi42LZdlhTUzdy3+xUg2fP9C2uT9nManF7gafF 1iVzWS1uHW9ltHj5YAO7xebJj1gsbn76xmpxedccNov22c8YLR6t2MTkwOWxaVUnm8f7fVfZ PPq2rGL0+LxJLoAlKtsmIzUxJb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+z0a0sUdj0hQlluKMREMt5qLiRACV5EdkIgQAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsWy7bCSvG7kvtmpBi+2illcn7KZ1eL2Ak+L rUvmslrcOt7KaPHywQZ2i82TH7FY3Pz0jdXi8q45bBbts58xWjxasYnJgctj06pONo/3+66y efRtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfGv02XmAo2G1ZMapzK2MDYpdnFyMkhIWAi8Wz/ XNYuRi4OIYHtjBL/frcyQiSkJFZdvwdlC0us/PecHaKonUni1J/3LCAJNgEtib4j35lAbBGB CIlp/9YyghQxC9xnlNi6/yobSEJYoIFRYvYcKRCbRUBVou3pf6A4BwevgK3E1385EAvkJfYf PMsMYnMK2Else7IRbKYQUMmLKd/YQWxeAUGJkzOfgO1lBqpv3jqbeQKjwCwkqVlIUgsYmVYx iqYWFOem5yYXGOoVJ+YWl+al6yXn525iBAe4VtAOxmXr/+odYmTiYDzEKMHBrCTCKzljdqoQ b0piZVVqUX58UWlOavEhRmkOFiVxXuWczhQhgfTEktTs1NSC1CKYLBMHp1QDU2fv7Q1NNy+3 avBJ/Eo7t8n7wV8JQ9G8Ft/F8hs/OjBs+cv/7nvppt3ijwqmT9cKahVYc7H9TbpIyQblV1oO U6wXLk258bligvL592XTg23mmFyVOXq+NyZDVfmAeG5H96odrw+G/Pr04EqAuoD6n+sxH7fP mxZ3cXG/nPX5us0HkmxFd+aYcYcuTjm0bYMdwzmPkMcVOqUHMnS2H/lyzYVR48W2rPMFr/L1 lnGHzn4nZmD1T6PjUI/0yoC7sSmPmw7JfZq6nsm3vHaFZFCD6tf5IXer6tLOnYyQKXgRtshn Rffe/2vCllx7xWDtMHHvPnf/R0VbG+/sabqmcWcuc5TxtZrulLrIqKk6918LsyixFGckGmox FxUnAgBvZ0zF3wIAAA== X-CMS-MailID: 20240108092025epcas5p39e2ecb3b12b4fba9e41f0694f430ec1d X-Msg-Generator: CA CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240108092025epcas5p39e2ecb3b12b4fba9e41f0694f430ec1d References: <20240108091917.1552013-1-sandeep.cs@samsung.com> Add support for samsung wireless bookcover and universal keyboard with input mapping events. Device a005 (Samsung wireless bookcover keyboard) Device a006 (Samsung wireless universal keyboard) Device a064 (Samsung wireless multi hogp keyboard) Signed-off-by: Sandeep C S Signed-off-by: Junwan Cho Signed-off-by: Jitender Sajwan --- drivers/hid/hid-ids.h | 3 + drivers/hid/hid-samsung.c | 142 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index b1208d04712c..c03137ada8f5 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1145,6 +1145,9 @@ #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD 0x7021 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD 0xa000 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE 0xa004 +#define USB_DEVICE_ID_SAMSUNG_WIRELESS_BOOKCOVER 0xa005 +#define USB_DEVICE_ID_SAMSUNG_WIRELESS_UNIVERSAL_KBD 0xa006 +#define USB_DEVICE_ID_SAMSUNG_WIRELESS_MULTI_HOGP_KBD 0xa064 #define USB_VENDOR_ID_SEMICO 0x1a2c #define USB_DEVICE_ID_SEMICO_USB_KEYKOARD 0x0023 diff --git a/drivers/hid/hid-samsung.c b/drivers/hid/hid-samsung.c index 36ab9540e064..ba1c71f25d78 100644 --- a/drivers/hid/hid-samsung.c +++ b/drivers/hid/hid-samsung.c @@ -362,6 +362,140 @@ static int samsung_actionmouse_input_mapping(struct hid_device *hdev, return 1; } +static int samsung_universal_kbd_input_mapping(struct hid_device *hdev, + struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, + unsigned long **bit, int *max) +{ + if (!(HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE) || + HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE))) + return 0; + + dbg_hid("samsung wireless keyboard input mapping event [0x%x]\n", + usage->hid & HID_USAGE); + + if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { + set_bit(EV_REP, hi->input->evbit); + switch (usage->hid & HID_USAGE) { + /* Only for UK keyboard */ + /* key found */ +#ifdef CONFIG_HID_KK_UPGRADE + case 0x32: + samsung_kbd_mouse_map_key_clear(KEY_KBDILLUMTOGGLE); + break; + case 0x64: + samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); + break; +#else + case 0x32: + samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); + break; + case 0x64: + samsung_kbd_mouse_map_key_clear(KEY_102ND); + break; +#endif + /* Only for BR keyboard */ + case 0x87: + samsung_kbd_mouse_map_key_clear(KEY_RO); + break; + default: + return 0; + } + } + + if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { + switch (usage->hid & HID_USAGE) { + /* report 2 */ + /* MENU */ + case 0x040: + samsung_kbd_mouse_map_key_clear(KEY_MENU); + break; + case 0x18a: + samsung_kbd_mouse_map_key_clear(KEY_MAIL); + break; + case 0x196: + samsung_kbd_mouse_map_key_clear(KEY_WWW); + break; + case 0x19e: + samsung_kbd_mouse_map_key_clear(KEY_SCREENLOCK); + break; + case 0x221: + samsung_kbd_mouse_map_key_clear(KEY_SEARCH); + break; + case 0x223: + samsung_kbd_mouse_map_key_clear(KEY_HOMEPAGE); + break; + /* RECENTAPPS */ + case 0x301: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY1); + break; + /* APPLICATION */ + case 0x302: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY2); + break; + /* Voice search */ + case 0x305: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY4); + break; + /* QPANEL on/off */ + case 0x306: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY5); + break; + /* SIP on/off */ + case 0x307: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY3); + break; + /* LANG */ + case 0x308: + samsung_kbd_mouse_map_key_clear(KEY_LANGUAGE); + break; + case 0x30a: + samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSDOWN); + break; + case 0x070: + samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSDOWN); + break; + case 0x30b: + samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSUP); + break; + case 0x06f: + samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSUP); + break; + /* S-Finder */ + case 0x304: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY7); + break; + /* Screen Capture */ + case 0x303: + samsung_kbd_mouse_map_key_clear(KEY_SYSRQ); + break; + /* Multi Window */ + case 0x309: + samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY9); + break; + /* HotKey App 1 */ + case 0x071: + samsung_kbd_mouse_map_key_clear(0x2f5); + break; + /* HotKey App 2 */ + case 0x072: + samsung_kbd_mouse_map_key_clear(0x2f6); + break; + /* HotKey App 3 */ + case 0x073: + samsung_kbd_mouse_map_key_clear(0x2f7); + break; + /* Dex */ + case 0x06e: + samsung_kbd_mouse_map_key_clear(0x2bd); + break; + default: + return 0; + } + } + + return 1; +} + static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -388,6 +522,12 @@ static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE) ret = samsung_actionmouse_input_mapping(hdev, hi, field, usage, bit, max); + else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_UNIVERSAL_KBD) + ret = samsung_universal_kbd_input_mapping(hdev, + hi, field, usage, bit, max); + else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_MULTI_HOGP_KBD) + ret = samsung_universal_kbd_input_mapping(hdev, + hi, field, usage, bit, max); return ret; } @@ -433,6 +573,8 @@ static const struct hid_device_id samsung_devices[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_UNIVERSAL_KBD) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_MULTI_HOGP_KBD) }, { } }; MODULE_DEVICE_TABLE(hid, samsung_devices);