[PATCH 1/5] HID: Recognize sensors with application collections too.

2021-02-27 Thread Ronald Tschalär
MacBook Pro's which define the ALS in a top-level application collection. Signed-off-by: Ronald Tschalär --- drivers/hid/hid-core.c | 3 ++- drivers/hid/hid-sensor-hub.c | 6 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid

[PATCH 4/5] HID: apple-ibridge: Add Apple iBridge HID driver for T1 chip.

2021-02-27 Thread Ronald Tschalär
with the T2 chip that don't need this driver. Signed-off-by: Ronald Tschalär --- drivers/hid/Kconfig | 16 + drivers/hid/Makefile| 1 + drivers/hid/apple-ibridge.c | 682 drivers/hid/apple-ibridge.h | 15 + drivers/hid/hid-ids.h | 1

[PATCH 5/5] HID: apple-touchbar - Add driver for the Touch Bar on MacBook Pro's.

2021-02-27 Thread Ronald Tschalär
This driver enables basic touch bar functionality: enabling it, switching between modes on FN key press, and dimming and turning the display off/on when idle/active. Signed-off-by: Ronald Tschalär --- drivers/hid/Kconfig | 10 + drivers/hid/Makefile |1 + drivers/hid

[PATCH 3/5] HID: core: Export some report item parsing functions.

2021-02-27 Thread Ronald Tschalär
These are useful to drivers that need to scan or parse reports themselves. Signed-off-by: Ronald Tschalär --- drivers/hid/hid-core.c | 54 +- include/linux/hid.h| 4 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/drivers/hid

[PATCH 2/5] iio: hid-sensor-als: Support change sensitivity in illuminance too.

2021-02-27 Thread Ronald Tschalär
Recent MacBook Pro's specify the usage of the change sensitivity field as illuminance (with a change sensitivity modifier) rather than as light. Signed-off-by: Ronald Tschalär --- drivers/iio/light/hid-sensor-als.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/iio/light

[PATCH 0/5] Touch Bar and ALS support for MacBook Pro's

2021-02-27 Thread Ronald Tschalär
the 15,* models are implemented, so that the ibridge driver is only needed for the pre-15,* models and the ALS and Touch Bar drivers work unchanged for all models. Ronald Tschalär (5): HID: Recognize sensors with application collections too. iio: hid-sensor-als: Support change sensitivity

[PATCH 1/3] Input: applespi: Don't wait for responses to commands indefinitely.

2021-02-17 Thread Ronald Tschalär
this puts a time limit (1 sec) on how long we're willing to wait for a response, after which we assume it got lost. Signed-off-by: Ronald Tschalär --- drivers/input/keyboard/applespi.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/input/keyboard

[PATCH 2/3] Input: applespi: Fix occasional crc errors under load.

2021-02-17 Thread Ronald Tschalär
-by: Ronald Tschalär --- drivers/input/keyboard/applespi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index 8494bf610fd70..f0a0067c48ff6 100644 --- a/drivers/input/keyboard/applespi.c +++ b/drivers/input/keyboard

[PATCH 3/3] Input: applespi: Add trace_event module param for early tracing.

2021-02-17 Thread Ronald Tschalär
and received during module probing. It takes comma-separated list of events, e.g. trace_event=applespi_tp_ini_cmd,applespi_bad_crc Signed-off-by: Ronald Tschalär --- drivers/input/keyboard/applespi.c | 32 +++ 1 file changed, 32 insertions(+) diff --git a/drivers/input

[PATCH v2] Input: applespi: fix warnings detected by sparse

2019-07-21 Thread Ronald Tschalär
Reported-by: kbuild test robot Signed-off-by: Ronald Tschalär --- Changes in v2: replaced min_t/max_t with plain min/max since both arguments are now int's and don't need further casting drivers/input/keyboard/applespi.c | 18 +++--- 1 file changed, 11 insertions(+), 7

[PATCH 2/2] Input: applespi: fix warnings detected by sparse

2019-07-21 Thread Ronald Tschalär
Reported-by: kbuild test robot Signed-off-by: Ronald Tschalär --- drivers/input/keyboard/applespi.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index d5defdefbc34..00cd8dccd4f5

[PATCH v2] Input: applespi - register touchpad device synchronously in probe

2019-07-21 Thread Ronald Tschalär
adds 3 second timeouts to the drain functions to avoid the potential for suspend or remove hanging forever. Signed-off-by: Ronald Tschalär --- Changes in v2: merged the two wait-queue's into one drivers/input/keyboard/applespi.c | 132 +++--- 1 file changed, 103

[PATCH v2 1/3] HID: apple-ibridge: Add Apple iBridge HID driver.

2019-06-12 Thread Ronald Tschalär
to managed differently. Signed-off-by: Ronald Tschalär --- drivers/hid/Kconfig | 14 + drivers/hid/Makefile | 1 + drivers/hid/apple-ibridge.c | 585 ++ drivers/hid/hid-ids.h | 1 + include/linux/apple-ibridge.h | 23 ++ 5 files

[PATCH v2 3/3] iio: light: apple-ib-als: Add driver for ALS on iBridge chip.

2019-06-12 Thread Ronald Tschalär
On 2016/2017 MacBook Pro's with a Touch Bar the ALS is attached to, and exposed via the iBridge device. This provides the driver for that sensor. Signed-off-by: Ronald Tschalär --- drivers/iio/light/Kconfig| 12 + drivers/iio/light/Makefile | 1 + drivers/iio/light/apple-ib

[PATCH v2 2/3] HID: apple-ib-tb: Add driver for the Touch Bar on MacBook Pro's.

2019-06-12 Thread Ronald Tschalär
This driver enables basic touch bar functionality: enabling it, switching between modes on FN key press, and dimming and turning the display off/on when idle/active. Signed-off-by: Ronald Tschalär --- drivers/hid/Kconfig | 10 + drivers/hid/Makefile |1 + drivers/hid/apple-ib

[PATCH v2 0/3] Apple iBridge support

2019-06-12 Thread Ronald Tschalär
driver from Jonathan Cameron - Applied all feedback on Touch Bar driver from Jonathan Cameron and Peter Meerwald-Stadler - various smaller cleanups Ronald Tschalär (3): HID: apple-ibridge: Add Apple iBridge HID driver. HID: apple-ib-tb: Add driver for the Touch Bar on MacBook Pro's. iio

[PATCH 1/3] mfd: apple-ibridge: Add Apple iBridge MFD driver.

2019-04-21 Thread Ronald Tschalär
out into their own modules. Signed-off-by: Ronald Tschalär --- drivers/mfd/Kconfig | 15 + drivers/mfd/Makefile | 1 + drivers/mfd/apple-ibridge.c | 883 ++ include/linux/mfd/apple-ibridge.h | 39 ++ 4 files changed, 938 insertions

[PATCH 3/3] iio: light: apple-ib-als: Add driver for ALS on iBridge chip.

2019-04-21 Thread Ronald Tschalär
On 2016/2017 MacBook Pro's with a Touch Bar the ALS is attached to, and exposed via the iBridge device. This provides the driver for that sensor. Signed-off-by: Ronald Tschalär --- drivers/iio/light/Kconfig| 12 + drivers/iio/light/Makefile | 1 + drivers/iio/light/apple-ib

[PATCH 0/3] Apple iBridge support

2019-04-21 Thread Ronald Tschalär
interface (and hence same hid_device), so both drivers need to share this device. This necessitated creating a demux hid driver in the mfd driver to which multiple hid devices can be attached, and implied not being able to make use of the existing hid-sensor-als driver. Ronald Tschalär (3): mfd: apple

[PATCH 2/3] HID: apple-ib-tb: Add driver for the Touch Bar on MacBook Pro's.

2019-04-21 Thread Ronald Tschalär
This driver enables basic touch bar functionality: enabling it, switching between modes on FN key press, and dimming and turning the display off/on when idle/active. Signed-off-by: Ronald Tschalär --- drivers/hid/Kconfig | 10 + drivers/hid/Makefile |1 + drivers/hid/apple-ib

[PATCH v7 0/2] Add Apple SPI keyboard and trackpad driver

2019-04-19 Thread Ronald Tschalär
to be taken via the input tree because the second patch here depends on it. The second patch contains the new applespi driver. Changes in v7: - Fixed unused variable warning introduced in previous patch series and accidently overlooked Ronald Tschalär (2): drm/bridge: sil_sii8620: make remote

[PATCH v4 2/2] Input: add Apple SPI keyboard and trackpad driver.

2019-04-06 Thread Ronald Tschalär
renzi + * Copyright (c) 2017-2018 Ronald Tschalär + */ + +/* + * The keyboard and touchpad controller on the MacBookAir6, MacBookPro12, + * MacBook8 and newer can be driven either by USB or SPI. However the USB + * pins are only connected on the MacBookAir6 and 7 and the MacBookPro12. + *

[PATCH v4 0/2] Add Apple SPI keyboard and trackpad driver

2019-04-06 Thread Ronald Tschalär
in the upstreaming-review branch. Ronald Tschalär (2): drm/bridge: sil_sii8620: make remote control optional. Input: add Apple SPI keyboard and trackpad driver. drivers/gpu/drm/bridge/Kconfig |3 +- drivers/gpu/drm/bridge/sil-sii8620.c| 21 + drivers/input/keyboard/Kconfig

[PATCH v4 1/2] drm/bridge: sil_sii8620: make remote control optional.

2019-04-06 Thread Ronald Tschalär
on INPUT). CC: Inki Dae CC: Andrzej Hajda CC: Laurent Pinchart CC: Dmitry Torokhov Signed-off-by: Ronald Tschalär --- drivers/gpu/drm/bridge/Kconfig | 3 +-- drivers/gpu/drm/bridge/sil-sii8620.c | 21 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v3 4/4] Input: add Apple SPI keyboard and trackpad driver.

2019-03-26 Thread Ronald Tschalär
keyboard and touchpad driver + * + * Copyright (c) 2015-2018 Federico Lorenzi + * Copyright (c) 2017-2018 Ronald Tschalär + */ + +/* + * The keyboard and touchpad controller on the MacBookAir6, MacBookPro12, + * MacBook8 and newer can be driven either by USB or SPI. However the USB

[PATCH v3 1/4] drm/bridge: sil_sii8620: depend on INPUT instead of selecting it.

2019-03-26 Thread Ronald Tschalär
. Hence this change. CC: Inki Dae CC: Andrzej Hajda Signed-off-by: Ronald Tschalär --- drivers/gpu/drm/bridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 2fee47b0d50b..eabedc83f25c 100644

[PATCH v3 3/4] driver core: add dev_print_hex_dump() logging function.

2019-03-26 Thread Ronald Tschalär
This is the dev_xxx() analog to print_hex_dump(), using dev_printk() instead of straight printk() to match other dev_xxx() logging functions. --- drivers/base/core.c| 43 ++ include/linux/device.h | 15 +++ 2 files changed, 58 insertions(+)

[PATCH v3 2/4] lib/hexdump.c: factor out generic hexdump formatting for reuse.

2019-03-26 Thread Ronald Tschalär
This introduces print_hex_dump_to_cb() which contains all the hexdump formatting minus the actual printk() call, allowing an arbitrary print function to be supplied instead. And print_hex_dump() is re-implemented using print_hex_dump_to_cb(). This allows other hex-dump logging functions to be

[PATCH v3 0/4] Add Apple SPI keyboard and trackpad driver

2019-03-26 Thread Ronald Tschalär
- minor style issues The full set of changes to applespi can be viewed at https://github.com/roadrunner2/macbook12-spi-driver/ as individual commits f832caa..3a6262e in the upstreaming-review branch. Ronald Tschalär (4): drm/bridge: sil_sii8620: depend on INPUT instead of selecting

[PATCH v2 1/2] drm/bridge: sil_sii8620: depend on INPUT instead of selecting it.

2019-02-21 Thread Ronald Tschalär
. Hence this change. CC: Inki Dae CC: Andrzej Hajda Signed-off-by: Ronald Tschalär --- drivers/gpu/drm/bridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 9eeb8ef0b174..bc838e7bb7c8 100644

[PATCH v2 0/2] Add Apple SPI keyboard and trackpad driver

2019-02-21 Thread Ronald Tschalär
be viewed at https://github.com/roadrunner2/macbook12-spi-driver/ as individual commits a651bb9..f832caa in the upstreaming-review branch. Ronald Tschalär (2): drm/bridge: sil_sii8620: depend on INPUT instead of selecting it. Input: add Apple SPI keyboard and trackpad driver. drivers/gpu

[PATCH v2 2/2] Input: add Apple SPI keyboard and trackpad driver.

2019-02-21 Thread Ronald Tschalär
ro) SPI keyboard and touchpad driver + * + * Copyright (c) 2015-2018 Federico Lorenzi + * Copyright (c) 2017-2018 Ronald Tschalär + */ + +/* + * The keyboard and touchpad controller on the MacBookAir6, MacBookPro12, + * MacBook8 and newer can be driven either by USB or SPI. However the USB + * pins are onl

[PATCH 2/2] Input: add Apple SPI keyboard and trackpad driver.

2019-02-04 Thread Ronald Tschalär
iver + * + * Copyright (c) 2015-2018 Federico Lorenzi + * Copyright (c) 2017-2018 Ronald Tschalär + */ + +/** + * The keyboard and touchpad controller on the MacBookAir6, MacBookPro12, + * MacBook8 and newer can be driven either by USB or SPI. However the USB + * pins are only connected on the Ma

[PATCH 1/2] drm/bridge: sil_sii8620: depend on INPUT instead of selecting it.

2019-02-04 Thread Ronald Tschalär
. Hence this change. CC: Inki Dae CC: Andrzej Hajda Signed-off-by: Ronald Tschalär --- drivers/gpu/drm/bridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 2fee47b0d50b..eabedc83f25c 100644

[PATCH 0/2] Add Apple SPI keyboard and trackpad driver

2019-02-04 Thread Ronald Tschalär
reviewed here; the real patch has been submitted to dri-devel and is being discussed there, with the intent/hope that I can get an Ack and permission to merge it through the input subsystem tree here as part of this patch series. Ronald Tschalär (2): drm/bridge: sil_sii8620: depend on INPUT instead

[PATCH v2] drm/bridge: sil_sii8620: make remote control optional.

2019-01-24 Thread Ronald Tschalär
on INPUT). CC: Inki Dae CC: Andrzej Hajda CC: Laurent Pinchart CC: Dmitry Torokhov Signed-off-by: Ronald Tschalär --- Resending this, as I somehow managed to forget to cc dri-devel. Apologies for the duplication. Changes in v2: - completely remove dependencies on both RC_CORE and INPUT

[PATCH v2] drm/bridge: sil_sii8620: make remote control optional.

2019-01-24 Thread Ronald Tschalär
on INPUT). CC: Inki Dae CC: Andrzej Hajda CC: Laurent Pinchart CC: Dmitry Torokhov Signed-off-by: Ronald Tschalär --- Changes in v2: - completely remove dependencies on both RC_CORE and INPUT in Kconfig, - make remote control functionality in driver contingent on RC_CORE being defined

[PATCH] drm/bridge: sil_sii8620: depend on INPUT instead of selecting it.

2019-01-22 Thread Ronald Tschalär
. Hence this change. CC: Inki Dae CC: Andrzej Hajda Signed-off-by: Ronald Tschalär --- drivers/gpu/drm/bridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 2fee47b0d50b..eabedc83f25c 100644

[PATCH] ACPI/sbs: Fix GPE storm on recent MacBookPro's.

2018-09-30 Thread Ronald Tschalär
SBS charger), except that on the above machines a status of all 1's is returned. And like there, we just want ignore the charger here. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198169 CC: Zhang Rui Signed-off-by: Ronald Tschalär --- drivers/acpi/sbs.c | 8 ++-- 1 file changed, 6 inserti

[PATCH] ACPI/sbshc: Fix rare oops when removing modules.

2018-09-30 Thread Ronald Tschalär
removing the sbs module with regards to acpi_sbs_callback() (which is called from acpi_smbus_callback()). We therefore need to ensure no callbacks are pending or executing before the cleanups are done and the modules are removed. Signed-off-by: Ronald Tschalär --- drivers/acpi/osl.c | 1 + drivers

[PATCH] ACPI/sbs: Fix GPE storm on recent MacBookPro's.

2018-09-30 Thread Ronald Tschalär
SBS charger), except that on the above machines a status of all 1's is returned. And like there, we just want ignore the charger here. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198169 CC: Zhang Rui Signed-off-by: Ronald Tschalär --- drivers/acpi/sbs.c | 8 ++-- 1 file changed, 6 inserti

[PATCH] ACPI/sbshc: Fix rare oops when removing modules.

2018-09-30 Thread Ronald Tschalär
removing the sbs module with regards to acpi_sbs_callback() (which is called from acpi_smbus_callback()). We therefore need to ensure no callbacks are pending or executing before the cleanups are done and the modules are removed. Signed-off-by: Ronald Tschalär --- drivers/acpi/osl.c | 1 + drivers