mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/10] Touch Bar support for T2 Macs
@ 2024-08-17 11:42 Aditya Garg
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Garg @ 2024-08-17 11:42 UTC (permalink / raw)
  To: tzimmermann, maarten.lankhorst, mripard, airlied, daniel,
	Jiri Kosina, bentiss, Thomas Weißschuh
  Cc: Orlando Chamberlain, Kerem Karabay, Linux Kernel Mailing List,
	linux-input, dri-devel

Hi Maintainers

The Touch Bars found on x86 Macs support two USB configurations: one
where the device presents itself as a HID keyboard and can display
predefined sets of keys, and one where the operating system has full
control over what is displayed.

This patch series adds support for both the configurations.

The hid-appletb-bl driver adds support for the backlight of the Touch Bar.
This enables the user to control the brightness of the Touch Bar from
userspace. The Touch Bar supports 3 modes here: Max brightness, Dim and Off.
So, daemons, used to manage Touch Bar can easily manage these modes by writing
to /sys/class/backlight/appletb_backlight/brightness. It is needed by both the
configurations of the Touch Bar.

The hid-appletb-kbd adds support for the first (predefined keys) configuration.
There are 4 modes here: Esc key only, Fn mode, Media keys and No keys.
Mode can be changed by writing to /sys/bus/hid/drivers/hid-appletb-kbd/<dev>/mode
This configuration is what Windows uses with the official Apple Bootcamp drivers.

Rest patches support the second configuration, where the OS has full control
on what's displayed on the Touch Bar. It is achieved by the patching the
hid-multitouch driver to add support for touch feedback from the Touch Bar
and the appletbdrm driver, that displays what we want to on the Touch Bar.
This configuration is what macOS uses.

The appletbdrm driver is based on the similar driver made for Windows by
imbushuo [1].

Currently, a daemon named tiny-dfr [2] is being used to display function keys
and media controls using the second configuration for both Apple Silicon and
T2 Macs.

A daemon for the first configuration is being developed, but that's a userspace
thing.

[1]: https://github.com/imbushuo/DFRDisplayKm
[2]: https://github.com/WhatAmISupposedToPutHere/tiny-dfr

v2:
  1. Cleaned up some code in the hid-appletb-kbd driver.
  2. Fixed wrong subject in drm/format-helper patch.
  3. Fixed Co-developed-by wrongly added to hid-multitouch patch.

v3:
  1. Fixed key mapping for Function keys in hid-appletb-kbd driver.

v4:
  1. Added support for fn key toggle in the hid-appletb-kbd driver.

v5:
  1. Do required changes to hid-appletb-bl as requested by upstream.

Aditya Garg (1):
  HID: hid-appletb-kbd: add support for fn toggle between media and
    function mode

Kerem Karabay (9):
  HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars
  HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch
    Bars
  HID: multitouch: support getting the contact ID from
    HID_DG_TRANSDUCER_INDEX fields
  HID: multitouch: support getting the tip state from HID_DG_TOUCH
    fields
  HID: multitouch: take cls->maxcontacts into account for devices
    without a HID_DG_CONTACTMAX field too
  HID: multitouch: allow specifying if a device is direct in a class
  HID: multitouch: add device ID for Apple Touch Bars
  drm/format-helper: Add conversion from XRGB8888 to BGR888 conversion
  drm/tiny: add driver for Apple Touch Bars in x86 Macs

 .../ABI/testing/sysfs-driver-hid-appletb-kbd  |  13 +
 MAINTAINERS                                   |   6 +
 drivers/gpu/drm/drm_format_helper.c           |  54 ++
 .../gpu/drm/tests/drm_format_helper_test.c    |  81 +++
 drivers/gpu/drm/tiny/Kconfig                  |  12 +
 drivers/gpu/drm/tiny/Makefile                 |   1 +
 drivers/gpu/drm/tiny/appletbdrm.c             | 624 ++++++++++++++++++
 drivers/hid/Kconfig                           |  22 +
 drivers/hid/Makefile                          |   2 +
 drivers/hid/hid-appletb-bl.c                  | 207 ++++++
 drivers/hid/hid-appletb-kbd.c                 | 432 ++++++++++++
 drivers/hid/hid-multitouch.c                  |  60 +-
 drivers/hid/hid-quirks.c                      |   8 +-
 include/drm/drm_format_helper.h               |   3 +
 14 files changed, 1509 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-appletb-kbd
 create mode 100644 drivers/gpu/drm/tiny/appletbdrm.c
 create mode 100644 drivers/hid/hid-appletb-bl.c
 create mode 100644 drivers/hid/hid-appletb-kbd.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v5 0/10] Touch Bar support for T2 Macs
  2024-08-31 12:37 ` Aditya Garg
@ 2024-09-11 12:21   ` Jiri Kosina
  0 siblings, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2024-09-11 12:21 UTC (permalink / raw)
  To: Aditya Garg
  Cc: tzimmermann, maarten.lankhorst, mripard, airlied, daniel,
	bentiss, Thomas Weißschuh, Orlando Chamberlain,
	Kerem Karabay, Linux Kernel Mailing List, linux-input, dri-devel,
	torvalds

On Sat, 31 Aug 2024, Aditya Garg wrote:

> Hi Maintainers
> 
> It has been 2 weeks but I still haven't received a single reply on this 
> version of the patch series. Consider this email as a friendly reminder.

I think it makes most sense to take this whole set through hid.git, but 
for that, I'd like to get Acked-by/Reviewed-by for patches 9 and 10 (drm 
bits).

Dave, Daniel, .. ?

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v5 0/10] Touch Bar support for T2 Macs
  2024-08-17 11:44 Aditya Garg
@ 2024-08-31 12:37 ` Aditya Garg
  2024-09-11 12:21   ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Garg @ 2024-08-31 12:37 UTC (permalink / raw)
  To: tzimmermann, maarten.lankhorst, mripard, airlied, daniel,
	Jiri Kosina, bentiss, Thomas Weißschuh
  Cc: Orlando Chamberlain, Kerem Karabay, Linux Kernel Mailing List,
	linux-input, dri-devel, torvalds

Hi Maintainers

It has been 2 weeks but I still haven't received a single reply on this version of the patch series. Consider this email as a friendly reminder.

> On 17 Aug 2024, at 5:15 PM, Aditya Garg <gargaditya08@live.com> wrote:
> 
> Hi Maintainers
> 
> The Touch Bars found on x86 Macs support two USB configurations: one
> where the device presents itself as a HID keyboard and can display
> predefined sets of keys, and one where the operating system has full
> control over what is displayed.
> 
> This patch series adds support for both the configurations.
> 
> The hid-appletb-bl driver adds support for the backlight of the Touch Bar.
> This enables the user to control the brightness of the Touch Bar from
> userspace. The Touch Bar supports 3 modes here: Max brightness, Dim and Off.
> So, daemons, used to manage Touch Bar can easily manage these modes by writing
> to /sys/class/backlight/appletb_backlight/brightness. It is needed by both the
> configurations of the Touch Bar.
> 
> The hid-appletb-kbd adds support for the first (predefined keys) configuration.
> There are 4 modes here: Esc key only, Fn mode, Media keys and No keys.
> Mode can be changed by writing to /sys/bus/hid/drivers/hid-appletb-kbd/<dev>/mode
> This configuration is what Windows uses with the official Apple Bootcamp drivers.
> 
> Rest patches support the second configuration, where the OS has full control
> on what's displayed on the Touch Bar. It is achieved by the patching the
> hid-multitouch driver to add support for touch feedback from the Touch Bar
> and the appletbdrm driver, that displays what we want to on the Touch Bar.
> This configuration is what macOS uses.
> 
> The appletbdrm driver is based on the similar driver made for Windows by
> imbushuo [1].
> 
> Currently, a daemon named tiny-dfr [2] is being used to display function keys
> and media controls using the second configuration for both Apple Silicon and
> T2 Macs.
> 
> A daemon for the first configuration is being developed, but that's a userspace
> thing.
> 
> [1]: https://github.com/imbushuo/DFRDisplayKm
> [2]: https://github.com/WhatAmISupposedToPutHere/tiny-dfr
> 
> v2:
> 1. Cleaned up some code in the hid-appletb-kbd driver.
> 2. Fixed wrong subject in drm/format-helper patch.
> 3. Fixed Co-developed-by wrongly added to hid-multitouch patch.
> 
> v3:
> 1. Fixed key mapping for Function keys in hid-appletb-kbd driver.
> 
> v4:
> 1. Added support for fn key toggle in the hid-appletb-kbd driver.
> 
> v5:
> 1. Do required changes to hid-appletb-bl as requested by upstream.
> 
> Aditya Garg (1):
> HID: hid-appletb-kbd: add support for fn toggle between media and
>  function mode
> 
> Kerem Karabay (9):
> HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars
> HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch
>  Bars
> HID: multitouch: support getting the contact ID from
>  HID_DG_TRANSDUCER_INDEX fields
> HID: multitouch: support getting the tip state from HID_DG_TOUCH
>  fields
> HID: multitouch: take cls->maxcontacts into account for devices
>  without a HID_DG_CONTACTMAX field too
> HID: multitouch: allow specifying if a device is direct in a class
> HID: multitouch: add device ID for Apple Touch Bars
> drm/format-helper: Add conversion from XRGB8888 to BGR888 conversion
> drm/tiny: add driver for Apple Touch Bars in x86 Macs
> 
> .../ABI/testing/sysfs-driver-hid-appletb-kbd  |  13 +
> MAINTAINERS                                   |   6 +
> drivers/gpu/drm/drm_format_helper.c           |  54 ++
> .../gpu/drm/tests/drm_format_helper_test.c    |  81 +++
> drivers/gpu/drm/tiny/Kconfig                  |  12 +
> drivers/gpu/drm/tiny/Makefile                 |   1 +
> drivers/gpu/drm/tiny/appletbdrm.c             | 624 ++++++++++++++++++
> drivers/hid/Kconfig                           |  22 +
> drivers/hid/Makefile                          |   2 +
> drivers/hid/hid-appletb-bl.c                  | 207 ++++++
> drivers/hid/hid-appletb-kbd.c                 | 432 ++++++++++++
> drivers/hid/hid-multitouch.c                  |  60 +-
> drivers/hid/hid-quirks.c                      |   8 +-
> include/drm/drm_format_helper.h               |   3 +
> 14 files changed, 1509 insertions(+), 16 deletions(-)
> create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-appletb-kbd
> create mode 100644 drivers/gpu/drm/tiny/appletbdrm.c
> create mode 100644 drivers/hid/hid-appletb-bl.c
> create mode 100644 drivers/hid/hid-appletb-kbd.c
> 
> --
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v5 0/10] Touch Bar support for T2 Macs
@ 2024-08-17 11:44 Aditya Garg
  2024-08-31 12:37 ` Aditya Garg
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Garg @ 2024-08-17 11:44 UTC (permalink / raw)
  To: tzimmermann, maarten.lankhorst, mripard, airlied, daniel,
	Jiri Kosina, bentiss, Thomas Weißschuh
  Cc: Orlando Chamberlain, Kerem Karabay, Linux Kernel Mailing List,
	linux-input, dri-devel

Hi Maintainers

The Touch Bars found on x86 Macs support two USB configurations: one
where the device presents itself as a HID keyboard and can display
predefined sets of keys, and one where the operating system has full
control over what is displayed.

This patch series adds support for both the configurations.

The hid-appletb-bl driver adds support for the backlight of the Touch Bar.
This enables the user to control the brightness of the Touch Bar from
userspace. The Touch Bar supports 3 modes here: Max brightness, Dim and Off.
So, daemons, used to manage Touch Bar can easily manage these modes by writing
to /sys/class/backlight/appletb_backlight/brightness. It is needed by both the
configurations of the Touch Bar.

The hid-appletb-kbd adds support for the first (predefined keys) configuration.
There are 4 modes here: Esc key only, Fn mode, Media keys and No keys.
Mode can be changed by writing to /sys/bus/hid/drivers/hid-appletb-kbd/<dev>/mode
This configuration is what Windows uses with the official Apple Bootcamp drivers.

Rest patches support the second configuration, where the OS has full control
on what's displayed on the Touch Bar. It is achieved by the patching the
hid-multitouch driver to add support for touch feedback from the Touch Bar
and the appletbdrm driver, that displays what we want to on the Touch Bar.
This configuration is what macOS uses.

The appletbdrm driver is based on the similar driver made for Windows by
imbushuo [1].

Currently, a daemon named tiny-dfr [2] is being used to display function keys
and media controls using the second configuration for both Apple Silicon and
T2 Macs.

A daemon for the first configuration is being developed, but that's a userspace
thing.

[1]: https://github.com/imbushuo/DFRDisplayKm
[2]: https://github.com/WhatAmISupposedToPutHere/tiny-dfr

v2:
1. Cleaned up some code in the hid-appletb-kbd driver.
2. Fixed wrong subject in drm/format-helper patch.
3. Fixed Co-developed-by wrongly added to hid-multitouch patch.

v3:
1. Fixed key mapping for Function keys in hid-appletb-kbd driver.

v4:
1. Added support for fn key toggle in the hid-appletb-kbd driver.

v5:
1. Do required changes to hid-appletb-bl as requested by upstream.

Aditya Garg (1):
HID: hid-appletb-kbd: add support for fn toggle between media and
  function mode

Kerem Karabay (9):
HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars
HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch
  Bars
HID: multitouch: support getting the contact ID from
  HID_DG_TRANSDUCER_INDEX fields
HID: multitouch: support getting the tip state from HID_DG_TOUCH
  fields
HID: multitouch: take cls->maxcontacts into account for devices
  without a HID_DG_CONTACTMAX field too
HID: multitouch: allow specifying if a device is direct in a class
HID: multitouch: add device ID for Apple Touch Bars
drm/format-helper: Add conversion from XRGB8888 to BGR888 conversion
drm/tiny: add driver for Apple Touch Bars in x86 Macs

.../ABI/testing/sysfs-driver-hid-appletb-kbd  |  13 +
MAINTAINERS                                   |   6 +
drivers/gpu/drm/drm_format_helper.c           |  54 ++
.../gpu/drm/tests/drm_format_helper_test.c    |  81 +++
drivers/gpu/drm/tiny/Kconfig                  |  12 +
drivers/gpu/drm/tiny/Makefile                 |   1 +
drivers/gpu/drm/tiny/appletbdrm.c             | 624 ++++++++++++++++++
drivers/hid/Kconfig                           |  22 +
drivers/hid/Makefile                          |   2 +
drivers/hid/hid-appletb-bl.c                  | 207 ++++++
drivers/hid/hid-appletb-kbd.c                 | 432 ++++++++++++
drivers/hid/hid-multitouch.c                  |  60 +-
drivers/hid/hid-quirks.c                      |   8 +-
include/drm/drm_format_helper.h               |   3 +
14 files changed, 1509 insertions(+), 16 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-appletb-kbd
create mode 100644 drivers/gpu/drm/tiny/appletbdrm.c
create mode 100644 drivers/hid/hid-appletb-bl.c
create mode 100644 drivers/hid/hid-appletb-kbd.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v5 0/10] Touch Bar support for T2 Macs
@ 2024-08-17 11:42 Aditya Garg
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Garg @ 2024-08-17 11:42 UTC (permalink / raw)
  To: tzimmermann, maarten.lankhorst, mripard, airlied, daniel,
	Jiri Kosina, bentiss, Thomas Weißschuh
  Cc: Orlando Chamberlain, Kerem Karabay, Linux Kernel Mailing List,
	linux-input, dri-devel

Hi Maintainers

The Touch Bars found on x86 Macs support two USB configurations: one
where the device presents itself as a HID keyboard and can display
predefined sets of keys, and one where the operating system has full
control over what is displayed.

This patch series adds support for both the configurations.

The hid-appletb-bl driver adds support for the backlight of the Touch Bar.
This enables the user to control the brightness of the Touch Bar from
userspace. The Touch Bar supports 3 modes here: Max brightness, Dim and Off.
So, daemons, used to manage Touch Bar can easily manage these modes by writing
to /sys/class/backlight/appletb_backlight/brightness. It is needed by both the
configurations of the Touch Bar.

The hid-appletb-kbd adds support for the first (predefined keys) configuration.
There are 4 modes here: Esc key only, Fn mode, Media keys and No keys.
Mode can be changed by writing to /sys/bus/hid/drivers/hid-appletb-kbd/<dev>/mode
This configuration is what Windows uses with the official Apple Bootcamp drivers.

Rest patches support the second configuration, where the OS has full control
on what's displayed on the Touch Bar. It is achieved by the patching the
hid-multitouch driver to add support for touch feedback from the Touch Bar
and the appletbdrm driver, that displays what we want to on the Touch Bar.
This configuration is what macOS uses.

The appletbdrm driver is based on the similar driver made for Windows by
imbushuo [1].

Currently, a daemon named tiny-dfr [2] is being used to display function keys
and media controls using the second configuration for both Apple Silicon and
T2 Macs.

A daemon for the first configuration is being developed, but that's a userspace
thing.

[1]: https://github.com/imbushuo/DFRDisplayKm
[2]: https://github.com/WhatAmISupposedToPutHere/tiny-dfr

v2:
 1. Cleaned up some code in the hid-appletb-kbd driver.
 2. Fixed wrong subject in drm/format-helper patch.
 3. Fixed Co-developed-by wrongly added to hid-multitouch patch.

v3:
 1. Fixed key mapping for Function keys in hid-appletb-kbd driver.

v4:
 1. Added support for fn key toggle in the hid-appletb-kbd driver.

v5:
 1. Do required changes to hid-appletb-bl as requested by upstream.

Aditya Garg (1):
 HID: hid-appletb-kbd: add support for fn toggle between media and
   function mode

Kerem Karabay (9):
 HID: hid-appletb-bl: add driver for the backlight of Apple Touch Bars
 HID: hid-appletb-kbd: add driver for the keyboard mode of Apple Touch
   Bars
 HID: multitouch: support getting the contact ID from
   HID_DG_TRANSDUCER_INDEX fields
 HID: multitouch: support getting the tip state from HID_DG_TOUCH
   fields
 HID: multitouch: take cls->maxcontacts into account for devices
   without a HID_DG_CONTACTMAX field too
 HID: multitouch: allow specifying if a device is direct in a class
 HID: multitouch: add device ID for Apple Touch Bars
 drm/format-helper: Add conversion from XRGB8888 to BGR888 conversion
 drm/tiny: add driver for Apple Touch Bars in x86 Macs

.../ABI/testing/sysfs-driver-hid-appletb-kbd  |  13 +
MAINTAINERS                                   |   6 +
drivers/gpu/drm/drm_format_helper.c           |  54 ++
.../gpu/drm/tests/drm_format_helper_test.c    |  81 +++
drivers/gpu/drm/tiny/Kconfig                  |  12 +
drivers/gpu/drm/tiny/Makefile                 |   1 +
drivers/gpu/drm/tiny/appletbdrm.c             | 624 ++++++++++++++++++
drivers/hid/Kconfig                           |  22 +
drivers/hid/Makefile                          |   2 +
drivers/hid/hid-appletb-bl.c                  | 207 ++++++
drivers/hid/hid-appletb-kbd.c                 | 432 ++++++++++++
drivers/hid/hid-multitouch.c                  |  60 +-
drivers/hid/hid-quirks.c                      |   8 +-
include/drm/drm_format_helper.h               |   3 +
14 files changed, 1509 insertions(+), 16 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-appletb-kbd
create mode 100644 drivers/gpu/drm/tiny/appletbdrm.c
create mode 100644 drivers/hid/hid-appletb-bl.c
create mode 100644 drivers/hid/hid-appletb-kbd.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-11 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-17 11:42 [PATCH v5 0/10] Touch Bar support for T2 Macs Aditya Garg
2024-08-17 11:42 Aditya Garg
2024-08-17 11:44 Aditya Garg
2024-08-31 12:37 ` Aditya Garg
2024-09-11 12:21   ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®