mbox series

[v3,0/2] USB: Simplify running code on shutdown for USB devices

Message ID 58227E2C-1886-40AD-8F80-7C618EF2D8F2@live.com
Headers show
Series USB: Simplify running code on shutdown for USB devices | expand

Message

Aditya Garg July 6, 2024, 12:02 p.m. UTC
Currently there is no standardized method for USB drivers to handle
shutdown events.

The first patch in this series fixes this by simplifying running code
on shutdown for USB devices by adding a shutdown callback to usb_driver.

The second patch implements this new callback to the UAS driver

Kerem Karabay (2):
  USB: core: add 'shutdown' callback to usb_driver
  USB: uas: Implement the new shutdown callback

 drivers/usb/core/driver.c | 14 ++++++++++++++
 drivers/usb/storage/uas.c |  5 ++---
 include/linux/usb.h       |  3 +++
 3 files changed, 19 insertions(+), 3 deletions(-)

Comments

Aditya Garg July 6, 2024, 12:46 p.m. UTC | #1
> On 6 Jul 2024, at 6:06 PM, gregkh@linuxfoundation.org wrote:
> 
> On Sat, Jul 06, 2024 at 12:03:23PM +0000, Aditya Garg wrote:
>> From: Kerem Karabay <kekrby@gmail.com>
>> 
>> Currently there is no standardized method for USB drivers to handle
>> shutdown events. This patch simplifies running code on shutdown for USB
>> devices by adding a shutdown callback to usb_driver.
>> 
>> Signed-off-by: Kerem Karabay <kekrby@gmail.com>
> 
> Where did Kerem do this work?  Any reason why they aren't submitting
> these themselves?  Not that this is a problem, just trying to figure out
> what went wrong with the development process here.

I work at https://t2linux.org/, a project aimed to bring Linux to T2 Macs.

Kerem helped in developing the driver for the Touch Bar on these Macs.
During development, he did some improvements to the HID core, USB core
and DRM, which are not specific to the Macs, but are used in the driver.

As to why he didn't submit himself, unfortunately Kerem seems to have left
the project and is not contactable at all. Fortunately, the patches he contributed
were signed off by him. Since we have his Signed-off-by and the code is GPL2,
IMO, I can legally submit this.

Link to our patchset: https://github.com/t2linux/linux-t2-patches
> 
> thanks,
> 
> greg k-h
Aditya Garg July 6, 2024, 12:56 p.m. UTC | #2
> On 6 Jul 2024, at 6:15 PM, Aditya Garg <gargaditya08@live.com> wrote:
> 
> 
> 
>> On 6 Jul 2024, at 6:06 PM, gregkh@linuxfoundation.org wrote:
>> 
>> On Sat, Jul 06, 2024 at 12:03:23PM +0000, Aditya Garg wrote:
>>> From: Kerem Karabay <kekrby@gmail.com>
>>> 
>>> Currently there is no standardized method for USB drivers to handle
>>> shutdown events. This patch simplifies running code on shutdown for USB
>>> devices by adding a shutdown callback to usb_driver.
>>> 
>>> Signed-off-by: Kerem Karabay <kekrby@gmail.com>
>> 
>> Where did Kerem do this work?  Any reason why they aren't submitting
>> these themselves?  Not that this is a problem, just trying to figure out
>> what went wrong with the development process here.
> 
> I work at https://t2linux.org/, a project aimed to bring Linux to T2 Macs.
> 
> Kerem helped in developing the driver for the Touch Bar on these Macs.
> During development, he did some improvements to the HID core, USB core
> and DRM, which are not specific to the Macs, but are used in the driver.
> 
> As to why he didn't submit himself, unfortunately Kerem seems to have left
> the project and is not contactable at all. Fortunately, the patches he contributed
> were signed off by him. Since we have his Signed-off-by and the code is GPL2,
> IMO, I can legally submit this.
> 
> Link to our patchset: https://github.com/t2linux/linux-t2-patches

You can also find his linux tree with the driver over here:
https://github.com/kekrby/linux-t2/tree/touchbar

>> 
>> thanks,
>> 
>> greg k-h