* Re: [PATCH] HID: uclogic: Fix regression of input name assignment
From: Jiri Kosina @ 2026-04-28 16:37 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Benjamin Tissoires, Henry Martin, linux-input, linux-kernel
In-Reply-To: <20260428083321.126674-1-tiwai@suse.de>
On Tue, 28 Apr 2026, Takashi Iwai wrote:
> The previous fix for adding the devm_kasprintf() return check in the
> commit bd07f751208b ("HID: uclogic: Add NULL check in
> uclogic_input_configured()") changed the condition of hi->input->name
> assignment, and it resulted in missing the proper input device name
> when no custom suffix is defined.
>
> Restore the conditional to the original content to address the
> regression.
>
> Fixes: bd07f751208b ("HID: uclogic: Add NULL check in uclogic_input_configured()")
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Applied to hid.git#for-7.1/upstream-fixes, thanks Takashi.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [PATCH 0/2] HID: appletb-kbd: fix UAF and mutex-in-atomic in inactivity timer
From: Aditya Garg @ 2026-04-28 16:44 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Sangyun Kim, bentiss, qasdev00, linux-input, linux-kernel
In-Reply-To: <s3qr2s36-n156-4srp-771s-20130s13760r@xreary.bet>
On 28 April 2026 10:03:03 pm IST, Jiri Kosina <jikos@kernel.org> wrote:
>On Mon, 20 Apr 2026, Aditya Garg wrote:
>
>> > This series addresses two defects in hid-appletb-kbd's inactivity
>> > timer subsystem. The two patches target different bugs and are
>> > logically independent; they are sent together because they touch the
>> > same tear-down code and because the same maintainer will review both.
>> >
>> > Patch 1 fixes a slab use-after-free with two related tear-down windows
>> > introduced by commit 38224c472a03 ("HID: appletb-kbd: fix slab
>> > use-after-free bug in appletb_kbd_probe"):
>> >
>> > A) Within "if (kbd->backlight_dev)" the order was
>> > put_device() then timer_delete_sync(). A concurrent
>> > hid_appletb_bl unbind between those two calls can drop the last
>> > devm reference and free the backlight_device; the still-armed
>> > inactivity timer softirq then dereferences the freed object
>> > through backlight_device_set_brightness() -> mutex_lock(&ops_lock).
>> >
>> > B) The "if (kbd->backlight_dev)" block ran before
>> > hid_hw_close()/hid_hw_stop(), so even after window A is closed a
>> > late ".event" callback from the HID core (USB URB completion on
>> > real hardware) can arrive between timer_delete_sync() and
>> > put_device(), reach reset_inactivity_timer(), re-arm the timer
>> > via mod_timer(), and reopen the same UAF.
>> >
>> > Both windows produce the same KASAN slab-use-after-free on the object
>> > allocated by devm_backlight_device_register(). Patch 1 closes them
>> > together by moving hid_hw_close()/hid_hw_stop() before the backlight
>> > cleanup and, inside that cleanup block, calling timer_delete_sync()
>> > before put_device(). Shipping both as one commit avoids leaving
>> > stable kernels in a half-fixed state where only window A is closed.
>> >
>> > Patch 2 fixes a separate "sleeping function called from invalid
>> > context" bug in the same subsystem. The inactivity timer is a
>> > struct timer_list, so the callback runs in softirq context and calls
>> > backlight_device_set_brightness() -> mutex_lock() from atomic
>> > context; reset_inactivity_timer() has the same issue on the
>> > brightness-restore path (it is called from appletb_kbd_hid_event()
>> > and appletb_kbd_inp_event(), which run in softirq/IRQ context on
>> > real USB hardware). Convert the inactivity timer to a delayed_work
>> > and defer the brightness-restore call to a dedicated work_struct so
>> > both sleeping calls run in process context.
>> >
>> > Sangyun Kim (2):
>> > HID: appletb-kbd: fix UAF in inactivity-timer cleanup path
>> > HID: appletb-kbd: run inactivity autodim from workqueues
>> >
>> > drivers/hid/hid-appletb-kbd.c | 56 ++++++++++++++++++++++-------------
>> > 1 file changed, 36 insertions(+), 20 deletions(-)
>> >
>>
>> I had a very weird bug just once. And that was when I pressed fn key, upon
>> releasing, the touchbar mode did not restore to normal.
>
>You mean with this patch applied, correct?
Yes after applying that patch.
>
^ permalink raw reply
* Re: [PATCH v4 1/6 RESEND] dt-bindings: leds: leds-cpcap: convert to DT schema
From: Rob Herring (Arm) @ 2026-04-28 17:15 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Pavel Machek, Lee Jones, Dmitry Torokhov, linux-input,
Krzysztof Kozlowski, David Lechner, Conor Dooley, devicetree,
Tony Lindgren, linux-kernel, linux-leds
In-Reply-To: <20260428153611.142816-2-clamor95@gmail.com>
On Tue, 28 Apr 2026 18:36:06 +0300, Svyatoslav Ryhel wrote:
> Convert LEDs devicetree bindings for the Motorola CPCAP MFD from TXT to
> YAML format. This patch does not change any functionality; the bindings
> remain the same.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> .../devicetree/bindings/leds/leds-cpcap.txt | 29 -------------
> .../bindings/leds/motorola,cpcap-leds.yaml | 42 +++++++++++++++++++
> 2 files changed, 42 insertions(+), 29 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/leds/leds-cpcap.txt
> create mode 100644 Documentation/devicetree/bindings/leds/motorola,cpcap-leds.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/leds/motorola,cpcap-leds.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
Warning: Documentation/devicetree/bindings/mfd/motorola-cpcap.txt references a file that doesn't exist: Documentation/devicetree/bindings/leds/leds-cpcap.txt
Documentation/devicetree/bindings/leds/motorola,cpcap-leds.yaml: Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
Documentation/devicetree/bindings/mfd/motorola-cpcap.txt: Documentation/devicetree/bindings/leds/leds-cpcap.txt
See https://patchwork.kernel.org/project/devicetree/patch/20260428153611.142816-2-clamor95@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* Re: [PATCH v4 2/6 RESEND] dt-bindings: input: cpcap-pwrbutton: convert to DT schema
From: Rob Herring (Arm) @ 2026-04-28 17:15 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Conor Dooley, linux-leds, devicetree, linux-kernel, Tony Lindgren,
Krzysztof Kozlowski, David Lechner, Lee Jones, Dmitry Torokhov,
linux-input, Pavel Machek
In-Reply-To: <20260428153611.142816-3-clamor95@gmail.com>
On Tue, 28 Apr 2026 18:36:07 +0300, Svyatoslav Ryhel wrote:
> Convert power button devicetree bindings for the Motorola CPCAP MFD from
> TXT to YAML format. This patch does not change any functionality; the
> bindings remain the same.
>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> .../bindings/input/cpcap-pwrbutton.txt | 20 ------------
> .../input/motorola,cpcap-pwrbutton.yaml | 32 +++++++++++++++++++
> 2 files changed, 32 insertions(+), 20 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
> create mode 100644 Documentation/devicetree/bindings/input/motorola,cpcap-pwrbutton.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/input/motorola,cpcap-pwrbutton.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
Warning: Documentation/devicetree/bindings/mfd/motorola-cpcap.txt references a file that doesn't exist: Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
Documentation/devicetree/bindings/input/motorola,cpcap-pwrbutton.yaml: Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
Documentation/devicetree/bindings/mfd/motorola-cpcap.txt: Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
See https://patchwork.kernel.org/project/devicetree/patch/20260428153611.142816-3-clamor95@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* Re: [PATCH v2 2/7] iio: accel: HID: Replace method accel_3d_adjust_channel_bit_mask()
From: Jonathan Cameron @ 2026-04-28 18:12 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Natália Salvino André, andy, bentiss, dlechner, jikos,
nuno.sa, srinivas.pandruvada, Pietro Di Consolo Gregorio,
linux-iio, linux-input
In-Reply-To: <ae8upGN9ILmtCzeA@ashevche-desk.local>
On Mon, 27 Apr 2026 12:38:44 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Fri, Apr 24, 2026 at 08:08:47PM +0100, Jonathan Cameron wrote:
> > On Wed, 22 Apr 2026 12:07:07 +0300
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > On Tue, Apr 21, 2026 at 07:20:34PM -0300, Natália Salvino André wrote:
>
> ...
>
> > > > - accel_3d_adjust_channel_bit_mask(channels,
> > > > - CHANNEL_SCAN_INDEX_X + i,
> > > > - st->accel[CHANNEL_SCAN_INDEX_X + i].size);
> > > > + hid_sensor_adjust_channel_bit_mask(channels,
> > > > + CHANNEL_SCAN_INDEX_X + i,
> > > > + st->accel[CHANNEL_SCAN_INDEX_X + i].size);
> > >
> > > Indentation is broken. Taking into account that the last line is too long when
> > > properly indented, perhaps
> > >
> > > hid_sensor_adjust_channel_bit_mask(channels,
> > > CHANNEL_SCAN_INDEX_X + i,
> > > st->accel[CHANNEL_SCAN_INDEX_X + i].size);
> > >
> > > Which makes it most right and under 80 limit.
>
> > Why the double tab? Maybe just go long on this one and align after the (
>
> I never know when you are strict about 80 limit :-)
>
I was meaning vs single tab really.
You are slowly wearing me down on the 80 limit by pointing out lots of
cases where going beyond it really helps! ;)
^ permalink raw reply
* Re: [PATCH] [v2] input: gpio-keys: make legacy gpiolib optional
From: Matti Vaittinen @ 2026-04-29 6:25 UTC (permalink / raw)
To: Dmitry Torokhov, Arnd Bergmann
Cc: Lee Jones, Arnd Bergmann, Gatien Chevallier, Marco Crivellari,
Fabrice Gasnier, Andreas Kemnade, Krzysztof Kozlowski,
Charles Keepax, Christophe JAILLET, linux-input, linux-kernel
In-Reply-To: <afAz-UQY0aCaThV3@google.com>
Hi deee Ho,
On 28/04/2026 07:14, Dmitry Torokhov wrote:
> On Mon, Apr 27, 2026 at 04:33:49PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> Most users of gpio-keys and gpio-keys-polled use modern gpiolib
>> interfaces, but there are still number of ancient sh, arm32 and x86
>> machines that have never been converted.
>>
>> Add an #ifdef block for the parts of the driver that are only used on
>> those legacy machines.
>>
>> The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
>> passing an IRQ number instead. In order to keep this working both with
>> and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
>> the gpio number if an IRQ is passed.
>>
>> Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> v2: skip the fake GPIO number passing from mfd
>> ---
>> drivers/input/keyboard/gpio_keys.c | 7 ++++---
>> drivers/input/keyboard/gpio_keys_polled.c | 2 ++
>> drivers/mfd/rohm-bd71828.c | 1 -
>> drivers/mfd/rohm-bd718x7.c | 1 -
>
> Let's see if my patches to rohm drivers will get accepted and then maybe
> we can remove legacy gpio API from gpio-keys altogether.
What comes to the ROHM drivers, I am ok with the "swnode stuff" proposed
by Dmitry (if it helps with cropping some legacy). Still, from the ROHM
driver POV, I sure have no problems with just simple zeroing the gpios
and providing the IRQ which in driver side is clean(ish) and simpl(ish) :)
So, in case someone opposes Dmitry's changes, for ROHM drivers:
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
^ permalink raw reply
* [PATCH resend] xpad: Add "Nova 2 Lite" from GameSir
From: Qbeliw Tanaka @ 2026-04-29 7:20 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, q.tanaka
In-Reply-To: <20260211.101707.2126959894059795107.q.tanaka@gmx.com>
Add support for the gamepad "Nova 2 Lite" from GameSir, compatible with the Xbox 360 gamepad.
Signed-off-by: Qbeliw Tanaka <q.tanaka@gmx.com>
---
drivers/input/joystick/xpad.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 363d50949..8d96349c3 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -421,6 +421,7 @@ static const struct xpad_device {
{ 0x3285, 0x0662, "Nacon Revolution5 Pro", 0, XTYPE_XBOX360 },
{ 0x3285, 0x0663, "Nacon Evol-X", 0, XTYPE_XBOXONE },
{ 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 },
+ { 0x3537, 0x100f, "GameSir Nova 2 Lite", 0, XTYPE_XBOX360 },
{ 0x3537, 0x1010, "GameSir G7 SE", 0, XTYPE_XBOXONE },
{ 0x3651, 0x1000, "CRKD SG", 0, XTYPE_XBOX360 },
{ 0x366c, 0x0005, "ByoWave Proteus Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE, FLAG_DELAY_INIT },
--
2.52.0
^ permalink raw reply related
* [PATCH 0/9] MT6365 PMIC support cleanup
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
Several Mediatek and Radxa boards, based on MT8370, MT8390 or MT8395
SoC, integrate the MT6365 PMIC, that is a MT6359P variant:
- Mediatek Genio 1200-EVK
- Mediatek Genio 700-EVK
- Mediatek Genio 510-EVK
- Radxa NIO-12L
It is compatible with the MT6359 PMIC.
But both MT6365 PMIC support and compatibility were never expressed in
the dt-bindings and there is no MT6365 include file as well.
So, since these board support was introduced, their devicetrees use the
mt6359 include file to enable this PMIC support.
The goal of this series is to clean this support by adding the missing
compatible strings for this MFD main and subdevices in the dt-bindings,
and add a include for MT6365 definitions to replace the MT6359 include
in these board devicetrees and for future ones (like Genio 520/720
EVKs).
The series is based on linux-next tree (tag: next-20260428) and has
been tested on Mediatek Genio 510, 700 and 1200-EVK boards.
---
Louis-Alexis Eyraud (9):
dt-bindings: mfd: mediatek: mt6397: Add rtc for MT6359
dt-bindings: mfd: mediatek: mt6397: Add MT6365 PMIC support
dt-bindings: input: mediatek,pmic-keys: Add MT6365 support
dt-bindings: iio: adc: mt6359: Add MT6365 PMIC AuxADC
arm64: dts: mediatek: mt6359: use proper compatible for rtc
arm64: dts: mediatek: add MT6365 PMIC include
arm64: dts: mediatek: mt8390-genio-common: use MT6365 PMIC definitions
arm64: dts: mediatek: mt8395-genio-common: use MT6365 PMIC definitions
arm64: dts: mediatek: mt8395-radxa-nio-12l: use MT6365 PMIC definitions
.../bindings/iio/adc/mediatek,mt6359-auxadc.yaml | 17 +++++++++-----
.../bindings/input/mediatek,pmic-keys.yaml | 21 ++++++++++-------
.../devicetree/bindings/mfd/mediatek,mt6397.yaml | 14 ++++++++++++
arch/arm64/boot/dts/mediatek/mt6359.dtsi | 4 ++--
arch/arm64/boot/dts/mediatek/mt6365.dtsi | 26 ++++++++++++++++++++++
.../boot/dts/mediatek/mt8390-genio-common.dtsi | 8 +++----
.../boot/dts/mediatek/mt8395-genio-common.dtsi | 8 +++----
.../boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 6 ++---
8 files changed, 77 insertions(+), 27 deletions(-)
---
base-commit: 0f3ef35b0747832b58b97171bad99011d084c6b1
change-id: 20260428-mediatek-genio-mt6365-cleanup-6cdd84c3f098
Best regards,
--
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
^ permalink raw reply
* [PATCH 1/9] dt-bindings: mfd: mediatek: mt6397: Add rtc for MT6359
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
The rtc block of MT6359 PMIC is compatible with the one found in MT6358
but this compatibility was never expressed in the dt-bindings, so add
the missing compatible string for the rtc subnode.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
index 05c121b0cb3d..dc2b38cf285d 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -70,6 +70,7 @@ properties:
- mediatek,mt6397-rtc
- items:
- enum:
+ - mediatek,mt6359-rtc
- mediatek,mt6366-rtc
- const: mediatek,mt6358-rtc
--
2.54.0
^ permalink raw reply related
* [PATCH 2/9] dt-bindings: mfd: mediatek: mt6397: Add MT6365 PMIC support
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
MT6365 PMIC is compatible with MT6359, so add the compatible strings
for the main and sub devices (regulator, rtc, audio codec).
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
index dc2b38cf285d..122aba7a54f8 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -44,6 +44,10 @@ properties:
- enum:
- mediatek,mt6366
- const: mediatek,mt6358
+ - items:
+ - enum:
+ - mediatek,mt6365
+ - const: mediatek,mt6359
interrupts:
maxItems: 1
@@ -71,6 +75,7 @@ properties:
- items:
- enum:
- mediatek,mt6359-rtc
+ - mediatek,mt6365-rtc
- mediatek,mt6366-rtc
- const: mediatek,mt6358-rtc
@@ -99,6 +104,10 @@ properties:
- enum:
- mediatek,mt6366-regulator
- const: mediatek,mt6358-regulator
+ - items:
+ - enum:
+ - mediatek,mt6365-regulator
+ - const: mediatek,mt6359-regulator
required:
- compatible
@@ -125,6 +134,10 @@ properties:
- enum:
- mediatek,mt6366-sound
- const: mediatek,mt6358-sound
+ - items:
+ - enum:
+ - mediatek,mt6365-codec
+ - const: mediatek,mt6359-codec
required:
- compatible
--
2.54.0
^ permalink raw reply related
* [PATCH 3/9] dt-bindings: input: mediatek,pmic-keys: Add MT6365 support
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
Add compatible string for the pmic keys block found on the MT6365 PMIC,
that is compatible with the one found in MT6359.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../bindings/input/mediatek,pmic-keys.yaml | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
index b95435bd6a9b..140a862ecfbe 100644
--- a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
+++ b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml
@@ -23,14 +23,19 @@ description: |
properties:
compatible:
- enum:
- - mediatek,mt6323-keys
- - mediatek,mt6328-keys
- - mediatek,mt6331-keys
- - mediatek,mt6357-keys
- - mediatek,mt6358-keys
- - mediatek,mt6359-keys
- - mediatek,mt6397-keys
+ oneOf:
+ - enum:
+ - mediatek,mt6323-keys
+ - mediatek,mt6328-keys
+ - mediatek,mt6331-keys
+ - mediatek,mt6357-keys
+ - mediatek,mt6358-keys
+ - mediatek,mt6359-keys
+ - mediatek,mt6397-keys
+ - items:
+ - enum:
+ - mediatek,mt6365-keys
+ - const: mediatek,mt6359-keys
power-off-time-sec: true
--
2.54.0
^ permalink raw reply related
* [PATCH 4/9] dt-bindings: iio: adc: mt6359: Add MT6365 PMIC AuxADC
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
Add compatible string for the AuxADC block found on the MT6365 PMIC,
that is compatible with the one found in MT6359.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../bindings/iio/adc/mediatek,mt6359-auxadc.yaml | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
index 5d4ab701f51a..9936aa605c7b 100644
--- a/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
@@ -18,12 +18,17 @@ description:
properties:
compatible:
- enum:
- - mediatek,mt6357-auxadc
- - mediatek,mt6358-auxadc
- - mediatek,mt6359-auxadc
- - mediatek,mt6363-auxadc
- - mediatek,mt6373-auxadc
+ oneOf:
+ - enum:
+ - mediatek,mt6357-auxadc
+ - mediatek,mt6358-auxadc
+ - mediatek,mt6359-auxadc
+ - mediatek,mt6363-auxadc
+ - mediatek,mt6373-auxadc
+ - items:
+ - enum:
+ - mediatek,mt6365-auxadc
+ - const: mediatek,mt6359-auxadc
"#io-channel-cells":
const: 1
--
2.54.0
^ permalink raw reply related
* [PATCH 5/9] arm64: dts: mediatek: mt6359: use proper compatible for rtc
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
The MT6359 PMIC include file uses directly "mediatek,mt6358-rtc"
compatible string for the rtc subnode, but not its own compatible
string.
Now that the "mediatek,mt6359-rtc" compatible is properly declared in
the dt-bindings, use it with "mediatek,mt6358-rtc" as fallback.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6359.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
index 45ad69ee49ed..c279b3372eda 100644
--- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi
@@ -19,7 +19,7 @@ mt6359codec: audio-codec {
compatible = "mediatek,mt6359-codec";
};
- regulators {
+ mt6359regulators: regulators {
compatible = "mediatek,mt6359-regulator";
mt6359_vs1_buck_reg: buck_vs1 {
@@ -301,7 +301,7 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub {
};
mt6359rtc: rtc {
- compatible = "mediatek,mt6358-rtc";
+ compatible = "mediatek,mt6359-rtc", "mediatek,mt6358-rtc";
};
};
};
--
2.54.0
^ permalink raw reply related
* [PATCH 6/9] arm64: dts: mediatek: add MT6365 PMIC include
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
The MT6365 PMIC, compatible with MT6359 PMIC, never had its own include
file so the boards that integrates this PMIC used mt6359.dtsi in their
devicetree to enable its support.
So, add the mt6365 include file for the MT6365 definitions and labels.
In order not to duplicate all of them, make it include mt6359.dtsi and
override the compatible strings for the MFD main and sub devices with
the MT6365 ones.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt6365.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt6365.dtsi b/arch/arm64/boot/dts/mediatek/mt6365.dtsi
new file mode 100644
index 000000000000..ed4e349f63c9
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6365.dtsi
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2026 MediaTek Inc.
+ */
+
+#include "mt6359.dtsi"
+
+&pmic {
+ compatible = "mediatek,mt6365", "mediatek,mt6359";
+};
+
+&pmic_adc {
+ compatible = "mediatek,mt6365-auxadc", "mediatek,mt6359-auxadc";
+};
+
+mt6365codec: &mt6359codec {
+ compatible = "mediatek,mt6365-codec", "mediatek,mt6359-codec";
+};
+
+mt6365regulators: &mt6359regulators {
+ compatible = "mediatek,mt6365-regulator", "mediatek,mt6359-regulator";
+};
+
+mt6365rtc: &mt6359rtc{
+ compatible = "mediatek,mt6365-rtc", "mediatek,mt6358-rtc";
+};
--
2.54.0
^ permalink raw reply related
* [PATCH 7/9] arm64: dts: mediatek: mt8390-genio-common: use MT6365 PMIC definitions
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
Mediatek Genio 510 and 700 EVK boards integrate a MT6365 PMIC,
compatible with MT6359, but the board common definition include file
used the mt6359.dtsi to enable its support since the board support was
introduced.
Now that mt6365.dtsi has been created, include it instead of mt6359.dtsi
and use MT6365 labels and pmic key compatible too.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
index 2062506f6cc5..5303add717bf 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
@@ -10,7 +10,7 @@
* AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
*/
-#include "mt6359.dtsi"
+#include "mt6365.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -695,7 +695,7 @@ &mt6359_vufs_ldo_reg {
regulator-always-on;
};
-&mt6359codec {
+&mt6365codec {
mediatek,mic-type-0 = <1>; /* ACC */
mediatek,mic-type-1 = <3>; /* DCC */
};
@@ -1281,8 +1281,8 @@ &pmic {
interrupt-parent = <&pio>;
interrupts = <222 IRQ_TYPE_LEVEL_HIGH>;
- mt6359keys: keys {
- compatible = "mediatek,mt6359-keys";
+ mt6365keys: keys {
+ compatible = "mediatek,mt6365-keys", "mediatek,mt6359-keys";
mediatek,long-press-mode = <1>;
power-off-time-sec = <0>;
--
2.54.0
^ permalink raw reply related
* [PATCH 8/9] arm64: dts: mediatek: mt8395-genio-common: use MT6365 PMIC definitions
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
Mediatek Genio 1200 EVK board integrates a MT6365 PMIC, compatible
with MT6359, but the board common definition include file (for the eMMC
and UFS configurations) used the mt6359.dtsi to enable its support
since the board support was introduced.
Now that mt6365.dtsi has been created, include it instead of mt6359.dtsi
and use MT6365 labels and pmic key compatible too.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt8395-genio-common.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8395-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8395-genio-common.dtsi
index 62c336e21500..6df614c471fc 100644
--- a/arch/arm64/boot/dts/mediatek/mt8395-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8395-genio-common.dtsi
@@ -7,7 +7,7 @@
/dts-v1/;
#include "mt8195.dtsi"
-#include "mt6359.dtsi"
+#include "mt6365.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -728,7 +728,7 @@ &mt6359_vsram_others_ldo_reg {
regulator-max-microvolt = <750000>;
};
-&mt6359codec {
+&mt6365codec {
mediatek,mic-type-0 = <1>; /* ACC */
mediatek,mic-type-1 = <3>; /* DCC */
mediatek,mic-type-2 = <1>; /* ACC */
@@ -1151,8 +1151,8 @@ pins {
&pmic {
interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
- mt6359keys: keys {
- compatible = "mediatek,mt6359-keys";
+ mt6365keys: keys {
+ compatible = "mediatek,mt6365-keys", "mediatek,mt6359-keys";
mediatek,long-press-mode = <1>;
power-off-time-sec = <0>;
--
2.54.0
^ permalink raw reply related
* [PATCH 9/9] arm64: dts: mediatek: mt8395-radxa-nio-12l: use MT6365 PMIC definitions
From: Louis-Alexis Eyraud @ 2026-04-29 9:44 UTC (permalink / raw)
To: Sen Chu, Sean Wang, Macpaul Lin, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Dmitry Torokhov, Chen Zhong,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: kernel, linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-input, linux-iio, Louis-Alexis Eyraud
In-Reply-To: <20260429-mediatek-genio-mt6365-cleanup-v1-0-6f43838be92f@collabora.com>
Radxa NIO-12L EVK board integrates a MT6365 PMIC, compatible with
MT6359, but its devicetree used mt6359.dtsi to enable its support since
the board support was introduced.
Now that mt6365.dtsi has been created, include it instead of mt6359.dtsi
and use MT6365 labels and pmic key compatible too.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
index bf91305e8e4a..8bd3b3250b87 100644
--- a/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts
@@ -6,7 +6,7 @@
*/
#include "mt8195.dtsi"
-#include "mt6359.dtsi"
+#include "mt6365.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
@@ -1034,8 +1034,8 @@ &pciephy {
&pmic {
interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
- mt6359keys: keys {
- compatible = "mediatek,mt6359-keys";
+ mt6365keys: keys {
+ compatible = "mediatek,mt6365-keys", "mediatek,mt6359-keys";
mediatek,long-press-mode = <1>;
power-off-time-sec = <0>;
--
2.54.0
^ permalink raw reply related
* [PATCH v2 0/4] iio: introduce devm_ API for hid sensro setup and cleanup
From: Sanjay Chitroda @ 2026-04-29 17:59 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada
Cc: dlechner, nuno.sa, andy, sanjayembeddedse, sakari.ailus,
linux-input, linux-iio, linux-kernel
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Key highlights:
- Prepare change as pre-requisite for devm conversion for HID IIO
drivers by removing redundant argument
- Add devm API to setup trigger and clenaup resource using
devm_add_action_or_reset()
- few sample driver update using devm conversion to auto release resource
changes in v2:
- Following input from Jonathan and Andy, squash initial patch v1
series in single change as individual change should not break anything
- Add devm API support and two driver using the same
- v1 series -> https://lore.kernel.org/all/20260428071613.1134053-1-sanjayembedded@gmail.com/
Testing:
- Compiled with W=1
- Build-tested on QEMU x86_64
Based on further feedback and reviews, I would extend this series to convert all HID IIO driver to use devm_* API.
Thanks,
Sanjay Chitroda
Sanjay Chitroda (4):
iio: hid-sensors: drop redundant iio_dev argument
iio: hid-sensors: introduce device managed API
iio: gyro: drop hid_sensor_remove_trigger() using devm API
iio: humidity: drop hid_sensor_remove_trigger() using devm API
drivers/iio/accel/hid-sensor-accel-3d.c | 4 +--
.../common/hid-sensors/hid-sensor-trigger.c | 27 +++++++++++++++++--
.../common/hid-sensors/hid-sensor-trigger.h | 5 ++--
drivers/iio/gyro/hid-sensor-gyro-3d.c | 10 +++----
drivers/iio/humidity/hid-sensor-humidity.c | 10 +++----
drivers/iio/light/hid-sensor-als.c | 4 +--
drivers/iio/light/hid-sensor-prox.c | 4 +--
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 4 +--
drivers/iio/orientation/hid-sensor-incl-3d.c | 4 +--
drivers/iio/orientation/hid-sensor-rotation.c | 4 +--
.../position/hid-sensor-custom-intel-hinge.c | 4 +--
drivers/iio/pressure/hid-sensor-press.c | 4 +--
.../iio/temperature/hid-sensor-temperature.c | 4 +--
13 files changed, 52 insertions(+), 36 deletions(-)
base-commit: eade2b843d9b1f668fc1775f15611bb0a1999cd9
--
2.34.1
^ permalink raw reply
* [PATCH v2 1/4] iio: hid-sensors: drop redundant iio_dev argument
From: Sanjay Chitroda @ 2026-04-29 17:59 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada
Cc: dlechner, nuno.sa, andy, sanjayembeddedse, sakari.ailus,
linux-input, linux-iio, linux-kernel
In-Reply-To: <20260429175918.2541914-1-sanjayembedded@gmail.com>
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
hid_sensor_remove_trigger() uses struct hid_sensor_common to release
resources acquired during trigger setup.
Earlier implementations required struct iio_dev to clean up buffers,
but with the current code this argument is no longer used and is
redundant.
Adapt to hid_sensor_remove_trigger() API change across all HID IIO
drivers to match updated prototype.
Removing it simplifies the API and is a preparatory step toward
converting the trigger handling to a devm-based API.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
drivers/iio/accel/hid-sensor-accel-3d.c | 4 ++--
drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 3 +--
drivers/iio/common/hid-sensors/hid-sensor-trigger.h | 3 +--
drivers/iio/gyro/hid-sensor-gyro-3d.c | 4 ++--
drivers/iio/humidity/hid-sensor-humidity.c | 4 ++--
drivers/iio/light/hid-sensor-als.c | 4 ++--
drivers/iio/light/hid-sensor-prox.c | 4 ++--
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 4 ++--
drivers/iio/orientation/hid-sensor-incl-3d.c | 4 ++--
drivers/iio/orientation/hid-sensor-rotation.c | 4 ++--
drivers/iio/position/hid-sensor-custom-intel-hinge.c | 4 ++--
drivers/iio/pressure/hid-sensor-press.c | 4 ++--
drivers/iio/temperature/hid-sensor-temperature.c | 4 ++--
13 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index 2ff591b3458f..a63dae90dadc 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -416,7 +416,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &accel_state->common_attributes);
+ hid_sensor_remove_trigger(&accel_state->common_attributes);
return ret;
}
@@ -429,7 +429,7 @@ static void hid_accel_3d_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, hsdev->usage);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &accel_state->common_attributes);
+ hid_sensor_remove_trigger(&accel_state->common_attributes);
}
static const struct platform_device_id hid_accel_3d_ids[] = {
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 417c4ab8c1b2..28d050b45c74 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -218,8 +218,7 @@ static const struct iio_buffer_setup_ops hid_sensor_buffer_ops = {
.predisable = buffer_predisable,
};
-void hid_sensor_remove_trigger(struct iio_dev *indio_dev,
- struct hid_sensor_common *attrb)
+void hid_sensor_remove_trigger(struct hid_sensor_common *attrb)
{
if (atomic_read(&attrb->runtime_pm_enable))
pm_runtime_disable(&attrb->pdev->dev);
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
index f94fca4f1edf..afec46ecbe71 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
@@ -16,8 +16,7 @@ extern const struct dev_pm_ops hid_sensor_pm_ops;
int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
struct hid_sensor_common *attrb);
-void hid_sensor_remove_trigger(struct iio_dev *indio_dev,
- struct hid_sensor_common *attrb);
+void hid_sensor_remove_trigger(struct hid_sensor_common *attrb);
int hid_sensor_power_state(struct hid_sensor_common *st, bool state);
#endif
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index c340cc899a7c..fe663b19e902 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -354,7 +354,7 @@ static int hid_gyro_3d_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &gyro_state->common_attributes);
+ hid_sensor_remove_trigger(&gyro_state->common_attributes);
return ret;
}
@@ -367,7 +367,7 @@ static void hid_gyro_3d_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_GYRO_3D);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &gyro_state->common_attributes);
+ hid_sensor_remove_trigger(&gyro_state->common_attributes);
}
static const struct platform_device_id hid_gyro_3d_ids[] = {
diff --git a/drivers/iio/humidity/hid-sensor-humidity.c b/drivers/iio/humidity/hid-sensor-humidity.c
index be2338d5f407..e580a2af9562 100644
--- a/drivers/iio/humidity/hid-sensor-humidity.c
+++ b/drivers/iio/humidity/hid-sensor-humidity.c
@@ -255,7 +255,7 @@ static int hid_humidity_probe(struct platform_device *pdev)
error_remove_callback:
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_HUMIDITY);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &humid_st->common_attributes);
+ hid_sensor_remove_trigger(&humid_st->common_attributes);
return ret;
}
@@ -268,7 +268,7 @@ static void hid_humidity_remove(struct platform_device *pdev)
iio_device_unregister(indio_dev);
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_HUMIDITY);
- hid_sensor_remove_trigger(indio_dev, &humid_st->common_attributes);
+ hid_sensor_remove_trigger(&humid_st->common_attributes);
}
static const struct platform_device_id hid_humidity_ids[] = {
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index 384572844162..9b57cdced18a 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -432,7 +432,7 @@ static int hid_als_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &als_state->common_attributes);
+ hid_sensor_remove_trigger(&als_state->common_attributes);
return ret;
}
@@ -445,7 +445,7 @@ static void hid_als_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, hsdev->usage);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &als_state->common_attributes);
+ hid_sensor_remove_trigger(&als_state->common_attributes);
}
static const struct platform_device_id hid_als_ids[] = {
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
index efa904a70d0e..473c45626487 100644
--- a/drivers/iio/light/hid-sensor-prox.c
+++ b/drivers/iio/light/hid-sensor-prox.c
@@ -340,7 +340,7 @@ static int hid_prox_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &prox_state->common_attributes);
+ hid_sensor_remove_trigger(&prox_state->common_attributes);
return ret;
}
@@ -353,7 +353,7 @@ static void hid_prox_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, hsdev->usage);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &prox_state->common_attributes);
+ hid_sensor_remove_trigger(&prox_state->common_attributes);
}
static const struct platform_device_id hid_prox_ids[] = {
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index b01dd53eb100..8be3dfe4dd58 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -542,7 +542,7 @@ static int hid_magn_3d_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &magn_state->magn_flux_attributes);
+ hid_sensor_remove_trigger(&magn_state->magn_flux_attributes);
return ret;
}
@@ -555,7 +555,7 @@ static void hid_magn_3d_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_COMPASS_3D);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &magn_state->magn_flux_attributes);
+ hid_sensor_remove_trigger(&magn_state->magn_flux_attributes);
}
static const struct platform_device_id hid_magn_3d_ids[] = {
diff --git a/drivers/iio/orientation/hid-sensor-incl-3d.c b/drivers/iio/orientation/hid-sensor-incl-3d.c
index 4e23a598a3fb..56fd9c53dfc2 100644
--- a/drivers/iio/orientation/hid-sensor-incl-3d.c
+++ b/drivers/iio/orientation/hid-sensor-incl-3d.c
@@ -378,7 +378,7 @@ static int hid_incl_3d_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &incl_state->common_attributes);
+ hid_sensor_remove_trigger(&incl_state->common_attributes);
return ret;
}
@@ -391,7 +391,7 @@ static void hid_incl_3d_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_INCLINOMETER_3D);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &incl_state->common_attributes);
+ hid_sensor_remove_trigger(&incl_state->common_attributes);
}
static const struct platform_device_id hid_incl_3d_ids[] = {
diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c
index 4a11e4555099..56fdb3412fe3 100644
--- a/drivers/iio/orientation/hid-sensor-rotation.c
+++ b/drivers/iio/orientation/hid-sensor-rotation.c
@@ -353,7 +353,7 @@ static int hid_dev_rot_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &rot_state->common_attributes);
+ hid_sensor_remove_trigger(&rot_state->common_attributes);
return ret;
}
@@ -366,7 +366,7 @@ static void hid_dev_rot_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, hsdev->usage);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &rot_state->common_attributes);
+ hid_sensor_remove_trigger(&rot_state->common_attributes);
}
static const struct platform_device_id hid_dev_rot_ids[] = {
diff --git a/drivers/iio/position/hid-sensor-custom-intel-hinge.c b/drivers/iio/position/hid-sensor-custom-intel-hinge.c
index a26d391661fd..5288b63f4e21 100644
--- a/drivers/iio/position/hid-sensor-custom-intel-hinge.c
+++ b/drivers/iio/position/hid-sensor-custom-intel-hinge.c
@@ -337,7 +337,7 @@ static int hid_hinge_probe(struct platform_device *pdev)
error_remove_callback:
sensor_hub_remove_callback(hsdev, hsdev->usage);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &st->common_attributes);
+ hid_sensor_remove_trigger(&st->common_attributes);
return ret;
}
@@ -350,7 +350,7 @@ static void hid_hinge_remove(struct platform_device *pdev)
iio_device_unregister(indio_dev);
sensor_hub_remove_callback(hsdev, hsdev->usage);
- hid_sensor_remove_trigger(indio_dev, &st->common_attributes);
+ hid_sensor_remove_trigger(&st->common_attributes);
}
static const struct platform_device_id hid_hinge_ids[] = {
diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c
index 5f1d6abda3e4..2bf5d055e175 100644
--- a/drivers/iio/pressure/hid-sensor-press.c
+++ b/drivers/iio/pressure/hid-sensor-press.c
@@ -319,7 +319,7 @@ static int hid_press_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &press_state->common_attributes);
+ hid_sensor_remove_trigger(&press_state->common_attributes);
return ret;
}
@@ -332,7 +332,7 @@ static void hid_press_remove(struct platform_device *pdev)
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_PRESSURE);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(indio_dev, &press_state->common_attributes);
+ hid_sensor_remove_trigger(&press_state->common_attributes);
}
static const struct platform_device_id hid_press_ids[] = {
diff --git a/drivers/iio/temperature/hid-sensor-temperature.c b/drivers/iio/temperature/hid-sensor-temperature.c
index 9f628a8e5cfb..60d4fcc8043b 100644
--- a/drivers/iio/temperature/hid-sensor-temperature.c
+++ b/drivers/iio/temperature/hid-sensor-temperature.c
@@ -253,7 +253,7 @@ static int hid_temperature_probe(struct platform_device *pdev)
error_remove_callback:
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_TEMPERATURE);
error_remove_trigger:
- hid_sensor_remove_trigger(indio_dev, &temp_st->common_attributes);
+ hid_sensor_remove_trigger(&temp_st->common_attributes);
return ret;
}
@@ -265,7 +265,7 @@ static void hid_temperature_remove(struct platform_device *pdev)
struct temperature_state *temp_st = iio_priv(indio_dev);
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_TEMPERATURE);
- hid_sensor_remove_trigger(indio_dev, &temp_st->common_attributes);
+ hid_sensor_remove_trigger(&temp_st->common_attributes);
}
static const struct platform_device_id hid_temperature_ids[] = {
--
2.34.1
^ permalink raw reply related
* [PATCH v2 2/4] iio: hid-sensors: introduce device managed API
From: Sanjay Chitroda @ 2026-04-29 17:59 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada
Cc: dlechner, nuno.sa, andy, sanjayembeddedse, sakari.ailus,
linux-input, linux-iio, linux-kernel
In-Reply-To: <20260429175918.2541914-1-sanjayembedded@gmail.com>
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
hid_sensor_setup_trigger() is common API used for the HID IIO drivers,
prepare devm API devm_hid_sensor_setup_trigger() to acquire resource
during setup and release using device managed framework during drivers
fail, unbind or remove path.
Register action with devm_add_action_or_reset() to release resource with
devres framework.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
.../common/hid-sensors/hid-sensor-trigger.c | 24 +++++++++++++++++++
.../common/hid-sensors/hid-sensor-trigger.h | 2 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 28d050b45c74..6692f403c8ec 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -301,6 +301,30 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
}
EXPORT_SYMBOL_NS(hid_sensor_setup_trigger, "IIO_HID");
+static void hid_sensor_remove_trigger_action(void *ptr)
+{
+ struct hid_sensor_common *attrb = ptr;
+
+ hid_sensor_remove_trigger(attrb);
+}
+
+int devm_hid_sensor_setup_trigger(struct device *dev, struct iio_dev *indio_dev,
+ const char *name, struct hid_sensor_common *attrb)
+{
+ int ret;
+
+ ret = hid_sensor_setup_trigger(indio_dev, name, attrb);
+ if (ret)
+ return ret;
+
+ ret = devm_add_action_or_reset(dev, hid_sensor_remove_trigger_action, attrb);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+EXPORT_SYMBOL_NS(devm_hid_sensor_setup_trigger, "IIO_HID");
+
static int __maybe_unused hid_sensor_suspend(struct device *dev)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev);
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
index afec46ecbe71..6fd7c39a240d 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h
@@ -17,6 +17,8 @@ extern const struct dev_pm_ops hid_sensor_pm_ops;
int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
struct hid_sensor_common *attrb);
void hid_sensor_remove_trigger(struct hid_sensor_common *attrb);
+int devm_hid_sensor_setup_trigger(struct device *dev, struct iio_dev *indio_dev,
+ const char *name, struct hid_sensor_common *attrb);
int hid_sensor_power_state(struct hid_sensor_common *st, bool state);
#endif
--
2.34.1
^ permalink raw reply related
* [PATCH v2 3/4] iio: gyro: drop hid_sensor_remove_trigger() using devm API
From: Sanjay Chitroda @ 2026-04-29 17:59 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada
Cc: dlechner, nuno.sa, andy, sanjayembeddedse, sakari.ailus,
linux-input, linux-iio, linux-kernel
In-Reply-To: <20260429175918.2541914-1-sanjayembedded@gmail.com>
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Use devm_hid_sensor_setup_trigger() to automatically release resource
during fail, unbind or removal of driver using devres framework.
This simplify the setup, remove goto, avoid manual resource cleanup in
teardown path.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
drivers/iio/gyro/hid-sensor-gyro-3d.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index fe663b19e902..86c281f2a367 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -326,8 +326,8 @@ static int hid_gyro_3d_probe(struct platform_device *pdev)
atomic_set(&gyro_state->common_attributes.data_ready, 0);
- ret = hid_sensor_setup_trigger(indio_dev, name,
- &gyro_state->common_attributes);
+ ret = devm_hid_sensor_setup_trigger(&pdev->dev, indio_dev, name,
+ &gyro_state->common_attributes);
if (ret < 0) {
dev_err(&pdev->dev, "trigger setup failed\n");
return ret;
@@ -336,7 +336,7 @@ static int hid_gyro_3d_probe(struct platform_device *pdev)
ret = iio_device_register(indio_dev);
if (ret) {
dev_err(&pdev->dev, "device register failed\n");
- goto error_remove_trigger;
+ return ret;
}
gyro_state->callbacks.send_event = gyro_3d_proc_event;
@@ -353,8 +353,6 @@ static int hid_gyro_3d_probe(struct platform_device *pdev)
error_iio_unreg:
iio_device_unregister(indio_dev);
-error_remove_trigger:
- hid_sensor_remove_trigger(&gyro_state->common_attributes);
return ret;
}
@@ -363,11 +361,9 @@ static void hid_gyro_3d_remove(struct platform_device *pdev)
{
struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev);
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
- struct gyro_3d_state *gyro_state = iio_priv(indio_dev);
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_GYRO_3D);
iio_device_unregister(indio_dev);
- hid_sensor_remove_trigger(&gyro_state->common_attributes);
}
static const struct platform_device_id hid_gyro_3d_ids[] = {
--
2.34.1
^ permalink raw reply related
* [PATCH v2 4/4] iio: humidity: drop hid_sensor_remove_trigger() using devm API
From: Sanjay Chitroda @ 2026-04-29 17:59 UTC (permalink / raw)
To: jikos, jic23, srinivas.pandruvada
Cc: dlechner, nuno.sa, andy, sanjayembeddedse, sakari.ailus,
linux-input, linux-iio, linux-kernel
In-Reply-To: <20260429175918.2541914-1-sanjayembedded@gmail.com>
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Use devm_hid_sensor_setup_trigger() to automatically release resource
during fail, unbind or removal of driver using devres framework.
This simplify the setup, remove goto, avoid manual resource cleanup in
teardown path.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
drivers/iio/humidity/hid-sensor-humidity.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/iio/humidity/hid-sensor-humidity.c b/drivers/iio/humidity/hid-sensor-humidity.c
index e580a2af9562..7ec8a8ba2b38 100644
--- a/drivers/iio/humidity/hid-sensor-humidity.c
+++ b/drivers/iio/humidity/hid-sensor-humidity.c
@@ -233,8 +233,8 @@ static int hid_humidity_probe(struct platform_device *pdev)
atomic_set(&humid_st->common_attributes.data_ready, 0);
- ret = hid_sensor_setup_trigger(indio_dev, name,
- &humid_st->common_attributes);
+ ret = devm_hid_sensor_setup_trigger(&indio_dev->dev, indio_dev, name,
+ &humid_st->common_attributes);
if (ret)
return ret;
@@ -244,7 +244,7 @@ static int hid_humidity_probe(struct platform_device *pdev)
ret = sensor_hub_register_callback(hsdev, HID_USAGE_SENSOR_HUMIDITY,
&humidity_callbacks);
if (ret)
- goto error_remove_trigger;
+ return ret;
ret = iio_device_register(indio_dev);
if (ret)
@@ -254,8 +254,6 @@ static int hid_humidity_probe(struct platform_device *pdev)
error_remove_callback:
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_HUMIDITY);
-error_remove_trigger:
- hid_sensor_remove_trigger(&humid_st->common_attributes);
return ret;
}
@@ -264,11 +262,9 @@ static void hid_humidity_remove(struct platform_device *pdev)
{
struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev);
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
- struct hid_humidity_state *humid_st = iio_priv(indio_dev);
iio_device_unregister(indio_dev);
sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_HUMIDITY);
- hid_sensor_remove_trigger(&humid_st->common_attributes);
}
static const struct platform_device_id hid_humidity_ids[] = {
--
2.34.1
^ permalink raw reply related
* Re: [PATCH] [v2] input: gpio-keys: make legacy gpiolib optional
From: Dmitry Torokhov @ 2026-04-29 19:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Matti Vaittinen, Lee Jones, Gatien Chevallier,
Marco Crivellari, Fabrice GASNIER, Andreas Kemnade,
Krzysztof Kozlowski, Charles Keepax, Christophe JAILLET,
linux-input, linux-kernel
In-Reply-To: <7f64a929-c879-4839-a7ee-1da2e423b156@app.fastmail.com>
On Tue, Apr 28, 2026 at 08:12:36AM +0200, Arnd Bergmann wrote:
> On Tue, Apr 28, 2026, at 06:14, Dmitry Torokhov wrote:
> > On Mon, Apr 27, 2026 at 04:33:49PM +0200, Arnd Bergmann wrote:
> >>
> >> The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
> >> passing an IRQ number instead. In order to keep this working both with
> >> and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
> >> the gpio number if an IRQ is passed.
> >>
> >> Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >> ---
> >> v2: skip the fake GPIO number passing from mfd
> >> ---
> >> drivers/input/keyboard/gpio_keys.c | 7 ++++---
> >> drivers/input/keyboard/gpio_keys_polled.c | 2 ++
> >> drivers/mfd/rohm-bd71828.c | 1 -
> >> drivers/mfd/rohm-bd718x7.c | 1 -
> >
> > Let's see if my patches to rohm drivers will get accepted and then maybe
> > we can remove legacy gpio API from gpio-keys altogether.
>
> I think it would be good to still merge the drivers/input
> parts of my patch. Since CONFIG_GPIOLIB_LEGACY is still set
> unconditionally at the moment, that should work fine as long
> as your patches for the rohm drivers get merged before
> we turn off CONFIG_GPIOLIB_LEGACY for modern platforms.
>
> In linux-next, I see these users of the legacy gpio-keys platform
> data remaining:
>
> arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
> arch/arm/mach-orion5x/dns323-setup.c
> arch/arm/mach-orion5x/mv2120-setup.c
> arch/arm/mach-orion5x/net2big-setup.c
> arch/arm/mach-orion5x/ts209-setup.c
> arch/arm/mach-orion5x/ts409-setup.c
> arch/arm/mach-s3c/mach-crag6410.c
> arch/arm/mach-sa1100/assabet.c
> arch/arm/mach-sa1100/collie.c
> arch/arm/mach-sa1100/h3xxx.c
> arch/mips/alchemy/devboards/db1300.c
> arch/mips/bcm47xx/buttons.c
> arch/sh/boards/mach-rsk/devices-rsk7203.c
> arch/sh/boards/mach-x3proto/setup.c
> drivers/input/misc/soc_button_array.c
> drivers/mfd/ucb1x00-assabet.c
>
Ah, yes :) I forgot about these...
> Do you already have patches for more of these? I would like to
> kill off mv78xx0, orion5x and sa1100 board files (including
> the ucb1x00-assabet mfd driver) soon, but that still leaves s3c,
> alchemy, bcm47xx, rsk and x3proto. These platforms are in
> varying states of disrepair, maybe a few more of those
> can be removed instead of converted. I know that Mark
> Brown is still using the s3c board, and Waldemar Brodkorb
> was recently working on restoring bcm47xx into a usable
> state.
I have a bunch of patches for alchemyi (posted), rsk and x3proto. If we
could kill sa1100 and assabet that would be really nice.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2] Input: ads7846 - don't use scratch for tx_buf when clearing register
From: Dmitry Torokhov @ 2026-04-29 19:19 UTC (permalink / raw)
To: Kris Bahnsen
Cc: Marek Vasut, stable, Mark Featherston, linux-input, linux-kernel
In-Reply-To: <20260427174657.691272-1-kris@embeddedTS.com>
On Mon, Apr 27, 2026 at 05:46:57PM +0000, Kris Bahnsen wrote:
> The workaround for XPT2046 clears the command register, giving the
> touchscreen controller a NOP. The change incorrectly re-uses the
> req->scratch variable which is used as rx_buf for xfer[5], so by
> the time xfer[6] occurs, the contents of req->scratch may not be
> 0. It was found that the touchscreen controller can end up in
> a completely unresponsive state due to it being given a command
> the driver does not expect.
>
> Instead, rely on the spi_transfer behavior of tx_buf being NULL to
> transmit all 0 bits. Also set rx_buf to NULL because the value
> returned does not matter. Thus moving the 3 byte pattern to clear
> the command register to a single message.
Unfortunately my suggestion was flawed: I think this will flood the logs
with "Bufferless transfer has length %3". We need to have either tx or
rx buffer :(
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2 2/4] iio: hid-sensors: introduce device managed API
From: Andy Shevchenko @ 2026-04-29 19:31 UTC (permalink / raw)
To: Sanjay Chitroda
Cc: jikos, jic23, srinivas.pandruvada, dlechner, nuno.sa, andy,
sakari.ailus, linux-input, linux-iio, linux-kernel
In-Reply-To: <20260429175918.2541914-3-sanjayembedded@gmail.com>
On Wed, Apr 29, 2026 at 11:29:16PM +0530, Sanjay Chitroda wrote:
> hid_sensor_setup_trigger() is common API used for the HID IIO drivers,
> prepare devm API devm_hid_sensor_setup_trigger() to acquire resource
> during setup and release using device managed framework during drivers
> fail, unbind or remove path.
>
> Register action with devm_add_action_or_reset() to release resource with
> devres framework.
...
> +static void hid_sensor_remove_trigger_action(void *ptr)
> +{
> + struct hid_sensor_common *attrb = ptr;
> +
> + hid_sensor_remove_trigger(attrb);
> +}
Casting is not needed here.
static void hid_sensor_remove_trigger_action(void *attrb)
{
hid_sensor_remove_trigger(attrb);
}
...
> +int devm_hid_sensor_setup_trigger(struct device *dev, struct iio_dev *indio_dev,
> + const char *name, struct hid_sensor_common *attrb)
> +{
> + int ret;
> +
> + ret = hid_sensor_setup_trigger(indio_dev, name, attrb);
> + if (ret)
> + return ret;
> + ret = devm_add_action_or_reset(dev, hid_sensor_remove_trigger_action, attrb);
> + if (ret)
> + return ret;
> +
> + return 0;
return devm_add_action_or_reset(dev, hid_sensor_remove_trigger_action, attrb);
> +}
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox