aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/hid-nintendo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-nintendo.c')
-rw-r--r--drivers/hid/hid-nintendo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
index 2204de889739..92ac4f605f13 100644
--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
@@ -292,6 +292,7 @@ static const struct joycon_rumble_amp_data joycon_rumble_amplitudes[] = {
};
static const u16 JC_RUMBLE_DFLT_LOW_FREQ = 160;
static const u16 JC_RUMBLE_DFLT_HIGH_FREQ = 320;
+static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
#endif /* IS_ENABLED(CONFIG_NINTENDO_FF) */
static const u16 JC_RUMBLE_PERIOD_MS = 50;
@@ -402,8 +403,6 @@ struct joycon_input_report {
#define JC_RUMBLE_DATA_SIZE 8
#define JC_RUMBLE_QUEUE_SIZE 8
-static const unsigned short JC_RUMBLE_ZERO_AMP_PKT_CNT = 5;
-
static const char * const joycon_player_led_names[] = {
LED_FUNCTION_PLAYER1,
LED_FUNCTION_PLAYER2,
@@ -1586,6 +1585,7 @@ static const unsigned int joycon_button_inputs_r[] = {
/* We report joy-con d-pad inputs as buttons and pro controller as a hat. */
static const unsigned int joycon_dpad_inputs_jc[] = {
BTN_DPAD_UP, BTN_DPAD_DOWN, BTN_DPAD_LEFT, BTN_DPAD_RIGHT,
+ 0 /* 0 signals end of array */
};
static int joycon_input_create(struct joycon_ctlr *ctlr)
@@ -1634,6 +1634,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr)
ctlr->input->id.version = hdev->version;
ctlr->input->uniq = ctlr->mac_addr_str;
ctlr->input->name = name;
+ ctlr->input->phys = hdev->phys;
input_set_drvdata(ctlr->input, ctlr);
/* set up sticks and buttons */
@@ -1713,6 +1714,7 @@ static int joycon_input_create(struct joycon_ctlr *ctlr)
ctlr->imu_input->id.version = hdev->version;
ctlr->imu_input->uniq = ctlr->mac_addr_str;
ctlr->imu_input->name = imu_name;
+ ctlr->imu_input->phys = hdev->phys;
input_set_drvdata(ctlr->imu_input, ctlr);
/* configure imu axes */