[PATCH v6 3/4] Bluetooth: Allow driver specific cmd timeout handling

2019-01-24 Thread Rajat Jain
Add a hook to allow the BT driver to do device or command specific handling in case of timeouts. This is to be used by Intel driver to reset the device after certain number of timeouts. Signed-off-by: Rajat Jain --- v6: Dropped the "sent command" parameter from cmd_timeout() v5: Drop

[PATCH v6 2/4] usb: assign ACPI companions for embedded USB devices

2019-01-24 Thread Rajat Jain
controllers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects#acpi-namespace-hierarchy-and-adr-for-embedded-usb-devices Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain (changed how we get the usb_port) Acked-by: Greg Kroah-Hartman Tested

[PATCH v6 4/4] Bluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip

2019-01-24 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the Intel BT chip, as part of cmd_timeout handling. This has been found helpful on Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH v6 1/4] usb: split code locating ACPI companion into port and device

2019-01-24 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain Acked-by: Greg Kroah-Hartman Test

Re: [PATCH v5 3/4] Bluetooth: Allow driver specific cmd timeout handling

2019-01-24 Thread Rajat Jain
of timeouts. > > > > Signed-off-by: Rajat Jain > > --- > > v5: Drop the quirk, and rename the hook function to cmd_timeout() > > v4: same as v1 > > v3: same as v1 > > v2: same as v1 > > > > include/net/bluetooth/hci_core.h | 1 + > > n

Re: [PATCH v5 4/4] Bluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip

2019-01-24 Thread Rajat Jain
are gets stuck and the only > > way out is a hard reset pin provided by the platform. > > > > Signed-off-by: Rajat Jain > > --- > > v5: Rename the hook to cmd_timeout, and wait for 5 timeouts before > >resetting the device. > > v4: Use data->flag

[PATCH v5 4/4] Bluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip

2019-01-23 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the Intel BT chip, as part of cmd_timeout handling. This has been found helpful on Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH v5 3/4] Bluetooth: Allow driver specific cmd timeout handling

2019-01-23 Thread Rajat Jain
Add a hook to allow the BT driver to do device or command specific handling in case of timeouts. This is to be used by Intel driver to reset the device after certain number of timeouts. Signed-off-by: Rajat Jain --- v5: Drop the quirk, and rename the hook function to cmd_timeout() v4: same as v1

[PATCH v5 1/4] usb: split code locating ACPI companion into port and device

2019-01-23 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain Acked-by: Greg Kroah-Hartman Test

[PATCH v5 2/4] usb: assign ACPI companions for embedded USB devices

2019-01-23 Thread Rajat Jain
controllers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects#acpi-namespace-hierarchy-and-adr-for-embedded-usb-devices Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain (changed how we get the usb_port) Acked-by: Greg Kroah-Hartman Tested

Re: [PATCH v4 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2019-01-22 Thread Rajat Jain
the firmware gets stuck and > > the only way out is a hard reset pin provided by the platform. > > > > Signed-off-by: Rajat Jain > > --- > > v4: Use data->flags instead of clearing the quirk in btusb_hw_reset() > > v3: Better error handling for gpiod_get_optional

Re: [PATCH v4 4/5] Bluetooth: btusb: Collect the common Intel assignments together

2019-01-22 Thread Rajat Jain
On Sat, Jan 19, 2019 at 11:51 AM Marcel Holtmann wrote: > > Hi Rajat, > > > The BTUSB_INTEL and BTUSB_INTEL_NEW have common functions & quirks are > > assigned to hdev structure. Lets collect them together instead of > > repeating them in different code branches. &g

Re: [PATCH v4 3/5] Bluetooth: Reset Bluetooth chip after multiple command timeouts

2019-01-22 Thread Rajat Jain
fails to respond to certain > > number of commands (currently 5) including the HCI reset commands. > > This is done based on a newly introduced quirk. This is done based > > on some initial work by Intel. > > > > Signed-off-by: Rajat Jain > > --- > > v4: same as v

Re: [PATCH v4 2/5] usb: assign ACPI companions for embedded USB devices

2019-01-22 Thread Rajat Jain
for-embedded-usb-devices > > > > Signed-off-by: Dmitry Torokhov > > Signed-off-by: Rajat Jain (changed how we get the > > usb_port) > > Acked-by: Greg Kroah-Hartman > > Tested-by: Sukumar Ghorai > > --- > > v4: Add Acked

Re: [PATCH v4 1/5] usb: split code locating ACPI companion into port and device

2019-01-22 Thread Rajat Jain
). > > > > Signed-off-by: Dmitry Torokhov > > Signed-off-by: Rajat Jain > > Acked-by: Greg Kroah-Hartman > > Tested-by: Sukumar Ghorai > > --- > > v4: Add Acked-by and Tested-by in signatures. > > v3: same as v1 > > v2: same as v1 > > &

[PATCH v4 1/5] usb: split code locating ACPI companion into port and device

2019-01-18 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain Acked-by: Greg Kroah-Hartman Test

[PATCH v4 2/5] usb: assign ACPI companions for embedded USB devices

2019-01-18 Thread Rajat Jain
controllers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects#acpi-namespace-hierarchy-and-adr-for-embedded-usb-devices Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain (changed how we get the usb_port) Acked-by: Greg Kroah-Hartman Tested

[PATCH v4 4/5] Bluetooth: btusb: Collect the common Intel assignments together

2019-01-18 Thread Rajat Jain
The BTUSB_INTEL and BTUSB_INTEL_NEW have common functions & quirks are assigned to hdev structure. Lets collect them together instead of repeating them in different code branches. Signed-off-by: Rajat Jain --- v4: same as v1 v3: same as v1 v2: same as v1 drivers/bluetooth/btusb.c

[PATCH v4 3/5] Bluetooth: Reset Bluetooth chip after multiple command timeouts

2019-01-18 Thread Rajat Jain
newly introduced quirk. This is done based on some initial work by Intel. Signed-off-by: Rajat Jain --- v4: same as v1 v3: same as v1 v2: same as v1 include/net/bluetooth/hci.h | 8 include/net/bluetooth/hci_core.h | 2 ++ net/bluetooth/hci_core.c | 15 +-- 3

[PATCH v4 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2019-01-18 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the BT chip (requested by the HCI core if needed). This has been found helpful on some of Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

Re: [PATCH v3 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2019-01-18 Thread Rajat Jain
Intel bluetooth controllers where the firmware gets stuck and > > the only way out is a hard reset pin provided by the platform. > > > > Signed-off-by: Rajat Jain > > --- > > v3: Better error handling for gpiod_get_optional() > > v2: Handl

Re: [PATCH v3 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2018-12-20 Thread Rajat Jain
On Wed, Nov 21, 2018 at 3:50 PM Rajat Jain wrote: > > If the platform provides it, use the reset gpio to reset the BT > chip (requested by the HCI core if needed). This has been found helpful > on some of Intel bluetooth controllers where the firmware gets stuck and > the only wa

[PATCH v3 2/5] usb: assign ACPI companions for embedded USB devices

2018-11-21 Thread Rajat Jain
controllers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects#acpi-namespace-hierarchy-and-adr-for-embedded-usb-devices Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain (changed how we get the usb_port) --- v3: same as v1 v2: same as v1

[PATCH v3 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2018-11-21 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the BT chip (requested by the HCI core if needed). This has been found helpful on some of Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH v3 4/5] Bluetooth: btusb: Collect the common Intel assignments together

2018-11-21 Thread Rajat Jain
The BTUSB_INTEL and BTUSB_INTEL_NEW have common functions & quirks are assigned to hdev structure. Lets collect them together instead of repeating them in different code branches. Signed-off-by: Rajat Jain --- v3: same as v1 v2: same as v1 drivers/bluetooth/btusb.c

[PATCH v3 1/5] usb: split code locating ACPI companion into port and device

2018-11-21 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain --- v3: same as v1 v2: same as v1 dr

[PATCH v3 3/5] Bluetooth: Reset Bluetooth chip after multiple command timeouts

2018-11-21 Thread Rajat Jain
newly introduced quirk. This is done based on some initial work by Intel. Signed-off-by: Rajat Jain --- v3: same as v1 v2: same as v1 include/net/bluetooth/hci.h | 8 include/net/bluetooth/hci_core.h | 2 ++ net/bluetooth/hci_core.c | 15 +-- 3 files changed

[PATCH v2 4/5] Bluetooth: btusb: Collect the common Intel assignments together

2018-11-19 Thread Rajat Jain
The BTUSB_INTEL and BTUSB_INTEL_NEW have common functions & quirks are assigned to hdev structure. Lets collect them together instead of repeating them in different code branches. Signed-off-by: Rajat Jain --- v2: same as v1 drivers/bluetooth/btusb.c | 27 --- 1

[PATCH v2 3/5] Bluetooth: Reset Bluetooth chip after multiple command timeouts

2018-11-19 Thread Rajat Jain
newly introduced quirk. This is done based on some initial work by Intel. Signed-off-by: Rajat Jain --- v2: same as v1 include/net/bluetooth/hci.h | 8 include/net/bluetooth/hci_core.h | 2 ++ net/bluetooth/hci_core.c | 15 +-- 3 files changed, 23 insertions

[PATCH v2 2/5] usb: assign ACPI companions for embedded USB devices

2018-11-19 Thread Rajat Jain
controllers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects#acpi-namespace-hierarchy-and-adr-for-embedded-usb-devices Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain (changed how we get the usb_port) --- v2: same as v1 drivers/usb/core

[PATCH v2 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2018-11-19 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the BT chip (requested by the HCI core if needed). This has been found helpful on some of Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH v2 1/5] usb: split code locating ACPI companion into port and device

2018-11-19 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain --- v2: same as v1 drivers/usb/cor

[PATCH 1/5] usb: split code locating ACPI companion into port and device

2018-11-16 Thread Rajat Jain
From: Dmitry Torokhov In preparation for handling embedded USB devices let's split usb_acpi_find_companion() into usb_acpi_find_companion_for_device() and usb_acpi_find_companion_for_port(). Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain --- drivers/usb/core/usb-acpi.c

[PATCH 0/5] Reset Intel BT controller if it gets stuck

2018-11-16 Thread Rajat Jain
companions for embedded USB devices (This basically allows ACPI nodes to be attached to the USB devices, thus useful for any onboard / embedded USB devices that wants to get some info from the ACPI). Rajat Jain (3): Bluetooth: Reset Bluetooth chip after multiple command timeouts Bluetooth

[PATCH 3/5] Bluetooth: Reset Bluetooth chip after multiple command timeouts

2018-11-16 Thread Rajat Jain
newly introduced quirk. This is done based on some initial work by Intel. Signed-off-by: Rajat Jain --- include/net/bluetooth/hci.h | 8 include/net/bluetooth/hci_core.h | 2 ++ net/bluetooth/hci_core.c | 15 +-- 3 files changed, 23 insertions(+), 2 deletions

[PATCH 2/5] usb: assign ACPI companions for embedded USB devices

2018-11-16 Thread Rajat Jain
controllers. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects#acpi-namespace-hierarchy-and-adr-for-embedded-usb-devices Signed-off-by: Dmitry Torokhov Signed-off-by: Rajat Jain (changed how we get the usb_port) --- drivers/usb/core/usb-acpi.c | 44

[PATCH 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2018-11-16 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the BT chip (requested by the HCI core if needed). This has been found helpful on some of Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH 4/5] Bluetooth: btusb: Collect the common Intel assignments together

2018-11-16 Thread Rajat Jain
The BTUSB_INTEL and BTUSB_INTEL_NEW have common functions & quirks are assigned to hdev structure. Lets collect them together instead of repeating them in different code branches. Signed-off-by: Rajat Jain --- drivers/bluetooth/btusb.c | 27 --- 1 file changed

Re: [PATCH] USB: Increment wakeup count on remote wakeup.

2018-04-19 Thread Rajat Jain
On Thu, Apr 19, 2018 at 8:01 AM, Alan Stern wrote: > On Wed, 18 Apr 2018, Ravi Chandra Sadineni wrote: > >> On chromebooks we depend on wakeup count to identify the wakeup source. >> But currently USB devices do not increment the wakeup count when they >> trigger the remote wake. This patch addres

[usbhid] identifying a particular usbhid device as wakeup reason?

2017-10-12 Thread Rajat Jain
Hi usbhid folks, I'd like to identify after a wakeup from suspend, that my USB HID keyboard was used to wake up the system. I'm trying to understand why don't I see "wakeup_count" increase for my USB keyboard or trackpad in /sys/kernel/debug/wakeup_sources, when I indeed woke up the system using