Inter-revision diff: patch 6

Comparing v11 (message) to v14 (message)

--- v11
+++ v14
@@ -18,10 +18,10 @@
  1 file changed, 42 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
-index 50242a0b6296..2421ce10f234 100644
+index a05211c48bf47..11f489c40678d 100644
 --- a/drivers/hid/hid-nintendo.c
 +++ b/drivers/hid/hid-nintendo.c
-@@ -370,27 +370,45 @@ static int __joycon_hid_send(struct hid_device *hdev, u8 *data, size_t len)
+@@ -377,27 +377,45 @@ static int __joycon_hid_send(struct hid_device *hdev, u8 *data, size_t len)
  	return ret;
  }
  
@@ -79,7 +79,7 @@
  {
  	int ret;
  	u8 buf[2] = {JC_OUTPUT_USB_CMD};
-@@ -398,7 +416,7 @@ static int joycon_send_usb(struct joycon_ctlr *ctlr, u8 cmd)
+@@ -405,7 +423,7 @@ static int joycon_send_usb(struct joycon_ctlr *ctlr, u8 cmd)
  	buf[1] = cmd;
  	ctlr->usb_ack_match = cmd;
  	ctlr->msg_type = JOYCON_MSG_TYPE_USB;
@@ -88,7 +88,7 @@
  	if (ret)
  		hid_dbg(ctlr->hdev, "send usb command failed; ret=%d\n", ret);
  	return ret;
-@@ -406,7 +424,7 @@ static int joycon_send_usb(struct joycon_ctlr *ctlr, u8 cmd)
+@@ -413,7 +431,7 @@ static int joycon_send_usb(struct joycon_ctlr *ctlr, u8 cmd)
  
  static int joycon_send_subcmd(struct joycon_ctlr *ctlr,
  			      struct joycon_subcmd_request *subcmd,
@@ -97,7 +97,7 @@
  {
  	int ret;
  	unsigned long flags;
-@@ -424,7 +442,7 @@ static int joycon_send_subcmd(struct joycon_ctlr *ctlr,
+@@ -431,7 +449,7 @@ static int joycon_send_subcmd(struct joycon_ctlr *ctlr,
  	ctlr->msg_type = JOYCON_MSG_TYPE_SUBCMD;
  
  	ret = joycon_hid_send_sync(ctlr, (u8 *)subcmd,
@@ -106,7 +106,7 @@
  	if (ret < 0)
  		hid_dbg(ctlr->hdev, "send subcommand failed; ret=%d\n", ret);
  	else
-@@ -443,7 +461,7 @@ static int joycon_set_player_leds(struct joycon_ctlr *ctlr, u8 flash, u8 on)
+@@ -450,7 +468,7 @@ static int joycon_set_player_leds(struct joycon_ctlr *ctlr, u8 flash, u8 on)
  	req->data[0] = (flash << 4) | on;
  
  	hid_dbg(ctlr->hdev, "setting player leds\n");
@@ -115,7 +115,7 @@
  }
  
  static const u16 DFLT_STICK_CAL_CEN = 2000;
-@@ -474,7 +492,7 @@ static int joycon_request_calibration(struct joycon_ctlr *ctlr)
+@@ -481,7 +499,7 @@ static int joycon_request_calibration(struct joycon_ctlr *ctlr)
  	data[4] = JC_CAL_DATA_SIZE;
  
  	hid_dbg(ctlr->hdev, "requesting cal data\n");
@@ -124,7 +124,7 @@
  	if (ret) {
  		hid_warn(ctlr->hdev,
  			 "Failed to read stick cal, using defaults; ret=%d\n",
-@@ -564,7 +582,7 @@ static int joycon_set_report_mode(struct joycon_ctlr *ctlr)
+@@ -571,7 +589,7 @@ static int joycon_set_report_mode(struct joycon_ctlr *ctlr)
  	req->data[0] = 0x30; /* standard, full report mode */
  
  	hid_dbg(ctlr->hdev, "setting controller report mode\n");
@@ -132,17 +132,17 @@
 +	return joycon_send_subcmd(ctlr, req, 1, HZ);
  }
  
- static int joycon_enable_rumble(struct joycon_ctlr *ctlr, bool enable)
-@@ -577,7 +595,7 @@ static int joycon_enable_rumble(struct joycon_ctlr *ctlr, bool enable)
- 	req->data[0] = enable ? 0x01 : 0x00;
+ static int joycon_enable_rumble(struct joycon_ctlr *ctlr)
+@@ -584,7 +602,7 @@ static int joycon_enable_rumble(struct joycon_ctlr *ctlr)
+ 	req->data[0] = 0x01; /* note: 0x00 would disable */
  
- 	hid_dbg(ctlr->hdev, "%s rumble\n", enable ? "enabling" : "disabling");
+ 	hid_dbg(ctlr->hdev, "enabling rumble\n");
 -	return joycon_send_subcmd(ctlr, req, 1);
 +	return joycon_send_subcmd(ctlr, req, 1, HZ/4);
  }
  
  static s32 joycon_map_stick_val(struct joycon_stick_cal *cal, s32 val)
-@@ -1081,7 +1099,7 @@ static int joycon_home_led_brightness_set(struct led_classdev *led,
+@@ -1088,7 +1106,7 @@ static int joycon_home_led_brightness_set(struct led_classdev *led,
  
  	hid_dbg(hdev, "setting home led brightness\n");
  	mutex_lock(&ctlr->output_mutex);
@@ -151,7 +151,7 @@
  	mutex_unlock(&ctlr->output_mutex);
  
  	return ret;
-@@ -1377,16 +1395,16 @@ static int nintendo_hid_probe(struct hid_device *hdev,
+@@ -1381,16 +1399,16 @@ static int nintendo_hid_probe(struct hid_device *hdev,
  	mutex_lock(&ctlr->output_mutex);
  	/* if handshake command fails, assume ble pro controller */
  	if (hdev->product == USB_DEVICE_ID_NINTENDO_PROCON &&
@@ -171,7 +171,7 @@
  		if (ret) {
  			hid_err(hdev, "Failed handshake; ret=%d\n", ret);
  			goto err_mutex;
-@@ -1395,7 +1413,7 @@ static int nintendo_hid_probe(struct hid_device *hdev,
+@@ -1399,7 +1417,7 @@ static int nintendo_hid_probe(struct hid_device *hdev,
  		 * Set no timeout (to keep controller in USB mode).
  		 * This doesn't send a response, so ignore the timeout.
  		 */
@@ -181,5 +181,5 @@
  
  	/* get controller calibration data, and parse it */
 -- 
-2.25.1
+2.32.0
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help