summaryrefslogtreecommitdiffstats
path: root/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-05-24 15:21:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-05-24 15:21:15 -0700
commitaa051d36ce4ae23b488489f6b15abad68b59ca23 (patch)
tree24056e248d202ae3d7bbf413ecfb3d4ec5490a9c /drivers/hid/amd-sfh-hid/amd_sfh_hid.c
parentd8e0f976f104a0258c0426b3805b057411cd0bd2 (diff)
parent07d17217c668d5b9974572b2d69c6736f60b9925 (diff)
downloadlinux-stable-aa051d36ce4ae23b488489f6b15abad68b59ca23.tar.gz
linux-stable-aa051d36ce4ae23b488489f6b15abad68b59ca23.tar.bz2
linux-stable-aa051d36ce4ae23b488489f6b15abad68b59ca23.zip
Merge tag 'for-linus-2022052401' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina: - support for pens with 3 buttons with Wacom driver (Joshua Dickens) - support for HID_DG_SCANTIME to report the timestamp for pen and touch events in Wacom driver (Joshua Dickens) - support for sensor discovery in amd-sfh driver (Basavaraj Natikar) - support for wider variety of Huion tablets ported from DIGImend project (José Expósito, Nikolai Kondrashov) - new device IDs and other assorted small code cleanups * tag 'for-linus-2022052401' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (44 commits) HID: apple: Properly handle function keys on Keychron keyboards HID: uclogic: Switch to Digitizer usage for styluses HID: uclogic: Add pen support for XP-PEN Star 06 HID: uclogic: Differentiate touch ring and touch strip HID: uclogic: Always shift touch reports to zero HID: uclogic: Do not focus on touch ring only HID: uclogic: Return raw parameters from v2 pen init HID: uclogic: Move param printing to a function HID: core: Display "SENSOR HUB" for sensor hub bus string in hid_info HID: amd_sfh: Move bus declaration outside of amd-sfh HID: amd_sfh: Add physical location to HID device HID: amd_sfh: Modify the hid name HID: amd_sfh: Modify the bus name HID: amd_sfh: Add sensor name by index for debug info HID: amd_sfh: Add support for sensor discovery HID: bigben: fix slab-out-of-bounds Write in bigben_probe Hid: wacom: Fix kernel test robot warning HID: uclogic: Disable pen usage for Huion keyboard interfaces HID: uclogic: Support disabling pen usage HID: uclogic: Pass keyboard reports as is ...
Diffstat (limited to 'drivers/hid/amd-sfh-hid/amd_sfh_hid.c')
-rw-r--r--drivers/hid/amd-sfh-hid/amd_sfh_hid.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
index 2bf97b6ac973..1089134030b0 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c
@@ -12,6 +12,7 @@
#include <linux/sched.h>
#include "amd_sfh_hid.h"
+#include "amd_sfh_pcie.h"
#define AMD_SFH_RESPONSE_TIMEOUT 1500
@@ -120,6 +121,8 @@ static struct hid_ll_driver amdtp_hid_ll_driver = {
int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data)
{
+ struct amd_mp2_dev *mp2 = container_of(cli_data->in_data, struct amd_mp2_dev, in_data);
+ struct device *dev = &mp2->pdev->dev;
struct hid_device *hid;
struct amdtp_hid_data *hid_data;
int rc;
@@ -141,10 +144,12 @@ int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data)
hid->driver_data = hid_data;
cli_data->hid_sensor_hubs[cur_hid_dev] = hid;
- hid->bus = BUS_AMD_AMDTP;
+ strscpy(hid->phys, dev->driver ? dev->driver->name : dev_name(dev),
+ sizeof(hid->phys));
+ hid->bus = BUS_AMD_SFH;
hid->vendor = AMD_SFH_HID_VENDOR;
hid->product = AMD_SFH_HID_PRODUCT;
- snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "hid-amdtp",
+ snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "hid-amdsfh",
hid->vendor, hid->product);
rc = hid_add_device(hid);