mbox series

[0/3] Touch Bar and Keyboard backlight driver for Intel Macs

Message ID E5D8BEBA-3C5B-460F-BD2C-39470A793CC3@live.com (mailing list archive)
Headers show
Series Touch Bar and Keyboard backlight driver for Intel Macs | expand

Message

Aditya Garg Feb. 10, 2023, 3:41 a.m. UTC
Greetings from t2linux!

2 years ago an attempt was made to send the driver for the Touch Bar on
MacBook Pros by Ronald Tschalär [1].

Due to some issues pointed out by the maintainers upstream, unfortunately
it didn't make it upstream. Now we at t2linux [2] have addressed those
issues in this patchset and also improved the touchbar driver for the T2
Macs. We also have added a new driver for keyboard backlight support on
T2 MacBooks with Magic Keyboard.

The first 2 patches of this patchset are the ones sent by Ronald before,
with the issues addressed as pointed out in [1].

The third patch introduces a new driver, apple-magic-backlight, which adds
support for keyboard backlight on T2 MacBooks with the Magic Keyboard.

Note: Apart from these drivers, for the T2 Macs, an additional driver
shall be required to communicate with the T2 Security Chip, as the Touch
Bar, the internal keyboard, trackpad, camera, ambient light sensor,
headphone controls, and NCM Ethernet are accessed through a USB VHCI
created with DMA channels to the "T2 Bridge Controller" 106b:1801 PCI
device. A work in progress linux driver called apple-bce [3], or USB
device passthrough to a Linux VM guest on a Windows host with Apple
Bootcamp drivers can be used to get Linux these USB devices working and
test these patches.

[1] https://lore.kernel.org/lkml/20210228012643.69944-1-ronald@innovation.ch/
[2] https://t2linux.org/
[3] https://github.com/t2linux/apple-bce-drv

Orlando Chamberlain (1):
  HID: apple-magic-backlight: Add driver for keyboard backlight on
    internal Magic Keyboards

Ronald Tschalär (2):
  HID: apple-ibridge: Add Apple iBridge HID driver for T1 chip
  HID: apple-touchbar: Add driver for the Touch Bar on MacBook Pros

 MAINTAINERS                         |    6 +
 drivers/hid/Kconfig                 |   39 +
 drivers/hid/Makefile                |    3 +
 drivers/hid/apple-ibridge.c         |  610 +++++++++++
 drivers/hid/apple-ibridge.h         |   15 +
 drivers/hid/apple-magic-backlight.c |  143 +++
 drivers/hid/apple-touchbar.c        | 1500 +++++++++++++++++++++++++++
 drivers/hid/hid-ids.h               |    1 +
 drivers/hid/hid-quirks.c            |    5 +
 9 files changed, 2322 insertions(+)
 create mode 100644 drivers/hid/apple-ibridge.c
 create mode 100644 drivers/hid/apple-ibridge.h
 create mode 100644 drivers/hid/apple-magic-backlight.c
 create mode 100644 drivers/hid/apple-touchbar.c

Comments

Andy Shevchenko Feb. 10, 2023, 10:18 a.m. UTC | #1
On Fri, Feb 10, 2023 at 5:41 AM Aditya Garg <gargaditya08@live.com> wrote:
>
> Greetings from t2linux!
>
> 2 years ago an attempt was made to send the driver for the Touch Bar on
> MacBook Pros by Ronald Tschalär [1].
>
> Due to some issues pointed out by the maintainers upstream, unfortunately
> it didn't make it upstream. Now we at t2linux [2] have addressed those
> issues in this patchset and also improved the touchbar driver for the T2
> Macs. We also have added a new driver for keyboard backlight support on
> T2 MacBooks with Magic Keyboard.
>
> The first 2 patches of this patchset are the ones sent by Ronald before,
> with the issues addressed as pointed out in [1].
>
> The third patch introduces a new driver, apple-magic-backlight, which adds
> support for keyboard backlight on T2 MacBooks with the Magic Keyboard.
>
> Note: Apart from these drivers, for the T2 Macs, an additional driver
> shall be required to communicate with the T2 Security Chip, as the Touch
> Bar, the internal keyboard, trackpad, camera, ambient light sensor,
> headphone controls, and NCM Ethernet are accessed through a USB VHCI
> created with DMA channels to the "T2 Bridge Controller" 106b:1801 PCI
> device. A work in progress linux driver called apple-bce [3], or USB
> device passthrough to a Linux VM guest on a Windows host with Apple
> Bootcamp drivers can be used to get Linux these USB devices working and
> test these patches.
>
> [1] https://lore.kernel.org/lkml/20210228012643.69944-1-ronald@innovation.ch/
> [2] https://t2linux.org/
> [3] https://github.com/t2linux/apple-bce-drv

Quick observation. Do you miss the Co-developed-by: tags in the patches?
Aditya Garg Feb. 10, 2023, 10:41 a.m. UTC | #2
> 
> Quick observation. Do you miss the Co-developed-by: tags in the patches?

Most of the changes are minor in the 1st and 2nd patch, we haven't changed
most of the code. The changes were written as per the documentation given
in https://www.kernel.org/doc/html/latest/maintainer/modifying-patches.html

Do you think a Co-developed-by is still required?

The third patch was actually written by 2 people, so there is a Co-developed-by there.

> 
> -- 
> With Best Regards,
> Andy Shevchenko
Orlando Chamberlain Feb. 10, 2023, 10:47 a.m. UTC | #3
On Fri, 10 Feb 2023 10:41:07 +0000
Aditya Garg <gargaditya08@live.com> wrote:

> > 
> > Quick observation. Do you miss the Co-developed-by: tags in the
> > patches?  
> 
> Most of the changes are minor in the 1st and 2nd patch, we haven't
> changed most of the code. The changes were written as per the
> documentation given in
> https://www.kernel.org/doc/html/latest/maintainer/modifying-patches.html
> 
> Do you think a Co-developed-by is still required?
> 
> The third patch was actually written by 2 people, so there is a
> Co-developed-by there.
> 

To add onto this, for patches 1 and 2, as we haven't been able to
contact the original author (Ronald), I think the only ways we are
allowed to make changes are either doing them in separate patches, or
with the [name <email>: changes] tags. For the latter I thought you had
to do a Signed-off-by after it, but given the changes aren't just to
make the patch apply on a newer version, do you think the
Co-developed-by tag is also needed?

> > 
> > -- 
> > With Best Regards,
> > Andy Shevchenko  
>
Andy Shevchenko Feb. 10, 2023, 11:12 a.m. UTC | #4
On Fri, Feb 10, 2023 at 12:47 PM Orlando Chamberlain
<orlandoch.dev@gmail.com> wrote:
> On Fri, 10 Feb 2023 10:41:07 +0000
> Aditya Garg <gargaditya08@live.com> wrote:

...

> > > Quick observation. Do you miss the Co-developed-by: tags in the
> > > patches?
> >
> > Most of the changes are minor in the 1st and 2nd patch, we haven't
> > changed most of the code. The changes were written as per the
> > documentation given in
> > https://www.kernel.org/doc/html/latest/maintainer/modifying-patches.html
> >
> > Do you think a Co-developed-by is still required?
> >
> > The third patch was actually written by 2 people, so there is a
> > Co-developed-by there.
> >
>
> To add onto this, for patches 1 and 2, as we haven't been able to
> contact the original author (Ronald), I think the only ways we are
> allowed to make changes are either doing them in separate patches, or
> with the [name <email>: changes] tags. For the latter I thought you had
> to do a Signed-off-by after it, but given the changes aren't just to
> make the patch apply on a newer version, do you think the
> Co-developed-by tag is also needed?

I'm not insisting, just asking :-) So, if you think it's not needed, fine to me!