Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH 07/34] Input: stmpe-ts - mark OF related data as maybe unused
From: Krzysztof Kozlowski @ 2024-04-03 10:10 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Arnd Bergmann, linux-kernel, Dmitry Torokhov, Maxime Coquelin,
	Alexandre Torgue, Arnd Bergmann, Uwe Kleine-König,
	linux-input, linux-stm32, linux-arm-kernel
In-Reply-To: <Zg0pei7ut5lC9yVC@smile.fi.intel.com>

On 03/04/2024 12:03, Andy Shevchenko wrote:
> On Wed, Apr 03, 2024 at 11:52:12AM +0200, Krzysztof Kozlowski wrote:
>> On 03/04/2024 11:40, Andy Shevchenko wrote:
>>> On Wed, Apr 03, 2024 at 10:06:25AM +0200, Arnd Bergmann wrote:
> 
> ...
> 
>>>> -static const struct of_device_id stmpe_ts_ids[] = {
>>>> +static const struct of_device_id stmpe_ts_ids[] __maybe_unused = {
>>>
>>> __maybe_unused? 
>>>
>>> Why not adding it into .driver as you have done in another patch in this series?
>>
>> Because there is no benefit in this. This is instantiated by MFD, so the
>> only thing you need is entry for module loading.
> 
> Hmm... Seems to me rather a good candidate for MODULE_ALIAS in this case. No?

No, I do not think module alias is for that purpose. This is a valid
compatible, documented and provided by DT so it is expected to be in
of_device_id.

Best regards,
Krzysztof


^ permalink raw reply

* Re: [PATCH] HID: nintendo: Fix N64 controller being identified as mouse
From: Jiri Kosina @ 2024-04-03 11:19 UTC (permalink / raw)
  To: Nuno Pereira
  Cc: linux-input@vger.kernel.org, Daniel Ogorchock, Ryan McClelland,
	benjamin.tissoires@redhat.com
In-Reply-To: <DU0P189MB2044EAF345CB76578D8C1A5CFD5A2@DU0P189MB2044.EURP189.PROD.OUTLOOK.COM>

On Mon, 26 Feb 2024, Nuno Pereira wrote:

> This patch is regarding the recent addition of support for the NSO
> controllers to hid-nintendo. All controllers are working correctly with the
> exception of the N64 controller, which is being identified as a mouse by
> udev. This results in the joystick controlling the mouse cursor and the
> controller not being detected by games.
> 
> The reason for this is because the N64's C buttons have been attributed to
> BTN_FORWARD, BTN_BACK, BTN_LEFT, BTN_RIGHT, which are buttons typically
> attributed to mice.
> 
> This patch changes those buttons to controller buttons, making the
> controller be correctly identified as such.
> 
> Signed-off-by: Nuno Pereira <nf.pereira@outlook.pt>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH 0/2] HID: intel-ish-hid: ipc: Use PCI_VDEVICE() and add Lunar Lake-M PCI device ID
From: Jiri Kosina @ 2024-04-03 11:21 UTC (permalink / raw)
  To: Zhang, Lixu; +Cc: linux-input, srinivas.pandruvada, benjamin.tissoires
In-Reply-To: <20240306005638.2781839-1-lixu.zhang@intel.com>

On Wed, 6 Mar 2024, Zhang, Lixu wrote:

> This patch series consists of two patches. The first patch simplifies
> the device table by using the PCI_VDEVICE() macro and renames the device
> ID macros to follow the pattern PCI_DEVICE_ID_INTEL_*. The second patch
> adds the device ID of Lunar Lake-M to the ISHTP support list.

Applied, thanks and sorry for the delay.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH 0/3] HID: Convert to platform remove callback returning void
From: Jiri Kosina @ 2024-04-03 11:23 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Benjamin Tissoires, linux-input, kernel, Jonathan Cameron,
	Srinivas Pandruvada, linux-iio, Maximilian Luz,
	platform-driver-x86
In-Reply-To: <cover.1709747164.git.u.kleine-koenig@pengutronix.de>

On Wed, 6 Mar 2024, Uwe Kleine-König wrote:

> Hello,
> 
> this series converts all platform drivers below drivers/hid to use
> struct platform_driver::remove_new(). See commit 5c5a7680e67b
> ("platform: Provide a remove callback that returns no value") for an
> extended explanation and the eventual goal.
> 
> All conversations are trivial, because their .remove() callbacks
> returned zero unconditionally.
> 
> There are no interdependencies between these patches, so they could be
> picked up individually. But I'd hope that they get picked up all
> together.

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v3 RESEND] HID: nintendo: use ida for LED player id
From: Jiri Kosina @ 2024-04-03 11:26 UTC (permalink / raw)
  To: Martino Fontana
  Cc: djogorchock, benjamin.tissoires, linux-input, linux-kernel,
	Ryan McClelland
In-Reply-To: <20240318110145.18490-1-tinozzo123@gmail.com>

On Mon, 18 Mar 2024, Martino Fontana wrote:

> Previously, the leds pattern would just increment with every controller
> connected. This wouldn't take into consideration when controllers are
> disconnected. The same controller could be connected and disconnected
> with the pattern increasing player count each time.
> 
> This patch changes it by using an ID allocator in order to assign the
> player id, the same way hid-playstation does.
> 
> Signed-off-by: Martino Fontana <tinozzo123@gmail.com>
> Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
> ---
> Changes for v2:
> 
> ida_free now frees the correct id, instead of an id that got moduloed.
> 
> Changes for v3:
> 
> Destroy allocator when removing driver.

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v5] hid-ft260: Add serial driver
From: Jiri Kosina @ 2024-04-03 11:34 UTC (permalink / raw)
  To: Christina Quast
  Cc: Benjamin Tissoires, linux-i2c, linux-input, linux-kernel, equinox,
	Daniel Beer, Michael Zaidman
In-Reply-To: <20240216-ft260_review5-v5-1-36db44673ac7@christina-quast.de>

On Fri, 16 Feb 2024, Christina Quast wrote:

> Adds the serial driver for FT260 USB HID devices, providing direct and
> simplified access to UART functionality without the need for FT260 HID
> report format knowledge.
> 
> This chip implements an UART and I2C interface, but only the latter was
> previously supported with a kernel driver. For the UART interface, only
> FTDI example code using hidraw from userspace was available.
> 
> This commit adds a serial interface /dev/ttyFTx (FT as in FT260), which
> implements tty serial driver ops, facilitating baudrate configuration,
> data transmission and reception, termios settings.

I don't see a dependency on CONFIG_TTY being added, and I believe it 
should be there (even though !CONFIG_TTY configurations are likely 
super-rare).

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v3] Input: WinWing Orion2 throttle support
From: Jiri Kosina @ 2024-04-03 11:36 UTC (permalink / raw)
  To: Ivan Gorinov; +Cc: linux-input, linux-kernel
In-Reply-To: <20240216215447.426ca3e7@lxl-9drxzh3.na.joby.aero>

On Fri, 16 Feb 2024, Ivan Gorinov wrote:

> WinWing Orion2 throttle works with Linux out of box,
> but the kernel sees only 16 of 47 buttons on the throttle base.
> 
> This module enables all buttons, and also adds LED controls.
> 
> Button numbers 0 .. 63 on Orion2 are reserved for throttle grip;
> the throttle base buttons have numbers 64 .. 110.
> 
> Linux kernel HID subsystem only supports up to 80 buttons.
> 
> Remap throttle base buttons to numbers 32 .. 78,
> reserving only numbers 0 .. 31 for buttons on the grip handle.
> 
> Changes since v2:
>    - Fixed automatic line wraps added by mail client
> 
> Changes since v1:
>    - Fixed formatting of descriptor byte array;
>    - Using product codes of Winwing grips in config.
> 
> Signed-off-by: Ivan Gorinov <ivan.gorinov@jobyaviation.com>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v2] HID: logitech-dj: allow mice to report multimedia keycodes
From: Jiri Kosina @ 2024-04-03 11:38 UTC (permalink / raw)
  To: Yaraslau Furman
  Cc: Benjamin Tissoires, Lucas Zampieri, Filipe Laíns,
	open list:HID LOGITECH DRIVERS, open list, Hans de Goede
In-Reply-To: <20240222101811.18921-1-yaro330@gmail.com>

On Thu, 22 Feb 2024, Yaraslau Furman wrote:

> Multimedia buttons can be bound to the mouse's extra keys in Windows application.
> Let Linux receive those keycodes.
> 
> Signed-off-by: Yaraslau Furman <yaro330@gmail.com>
> ---
>  drivers/hid/hid-logitech-dj.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index e6a8b6d8eab7..3c3c497b6b91 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
>  		}
>  		break;
>  	case REPORT_TYPE_MOUSE:
> -		workitem->reports_supported |= STD_MOUSE | HIDPP;
> -		if (djrcv_dev->type == recvr_type_mouse_only)
> -			workitem->reports_supported |= MULTIMEDIA;
> +		workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
>  		break;

CCing Hans who introduced this explicit check back in 3ed224e273ac 
("HID: logitech-dj: Fix 064d:c52f receiver support").
Should it be made device-specific?

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v2] HID: nintendo: Don't fail on setting baud rate
From: Jiri Kosina @ 2024-04-03 11:39 UTC (permalink / raw)
  To: Max Staudt
  Cc: Daniel J . Ogorchock, Benjamin Tissoires, linux-input,
	linux-kernel
In-Reply-To: <20240315165729.17817-1-max@enpas.org>

On Sat, 16 Mar 2024, Max Staudt wrote:

> Some third-party controllers can't change the baud rate.
> 
> We can still use the gamepad as-is, so let's do that.
> 
> Signed-off-by: Max Staudt <max@enpas.org>
> ---
> Changes in v2:
>  - Made hid_err() a hid_warn() since it's not a fatal failure.
> ---
>  drivers/hid/hid-nintendo.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
> index 997c3a1adaca..395ed6b5ef59 100644
> --- a/drivers/hid/hid-nintendo.c
> +++ b/drivers/hid/hid-nintendo.c
> @@ -2164,8 +2164,11 @@ static int joycon_init(struct hid_device *hdev)
>  		/* set baudrate for improved latency */
>  		ret = joycon_send_usb(ctlr, JC_USB_CMD_BAUDRATE_3M, HZ);
>  		if (ret) {
> -			hid_err(hdev, "Failed to set baudrate; ret=%d\n", ret);
> -			goto out_unlock;
> +			/*
> +			 * We can function with the default baudrate.
> +			 * Provide a warning, and continue on.
> +			 */
> +			hid_warn(hdev, "Failed to set baudrate (ret=%d), continuing anyway\n", ret);

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v4 1/4] HID: hid-picolcd*: Convert sprintf() family to sysfs_emit() family
From: Jiri Kosina @ 2024-04-03 11:43 UTC (permalink / raw)
  To: Li Zhijian
  Cc: linux-kernel, Christophe JAILLET, Bruno Prémont,
	Benjamin Tissoires, linux-input
In-Reply-To: <20240319054527.1581299-1-lizhijian@fujitsu.com>

I have now applied the series, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v2 1/1] HID: hid-debug: add missing evdev and HID codes
From: Jiri Kosina @ 2024-04-03 11:46 UTC (permalink / raw)
  To: Thomas Kuehne; +Cc: linux-input, benjamin.tissoires
In-Reply-To: <ZgDSAzsYVzgnjyao@black>

On Mon, 25 Mar 2024, Thomas Kuehne wrote:

> Hid-debug's rdesc output for a game controller contained a few question
> marks and numeric IDs instead of the expected descriptive names.
> 
> This happens because:
> 1) the mapping data is missing event codes defined in input-event-codes.h
> 2) HID usages aren't up to date
> 3) hid_resolv_usage fails to account for the sensor pages' modifiers
> 
> Add missing event codes and update HID to HUT 1.5.
> 
> Signed-off-by: Thomas Kuehne <thomas.kuehne@gmx.li>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v2 0/4] HID: Add support for Himax HX83102j touchscreen
From: Jiri Kosina @ 2024-04-03 11:48 UTC (permalink / raw)
  To: Allen_Lin
  Cc: dmitry.torokhov, robh, krzysztof.kozlowski+dt, conor,
	benjamin.tissoires, linux-input, devicetree, linux-kernel
In-Reply-To: <TY0PR06MB561132DF147C037093A1B94D9E3E2@TY0PR06MB5611.apcprd06.prod.outlook.com>

On Tue, 2 Apr 2024, Allen_Lin wrote:

> Hi,
> This driver implements for Himax HID touchscreen HX83102j.
> 
> Using SPI interface to receive/send HID packets.
> 
> Changes in v2 :
> -Added power description in YAML document. 
> -Added ddreset-gpios property in YAML document.
> -Added firmware-name property in YAML document.
> -Modified the description of pid.
> -Modified the example.
> 
> Allen_Lin (4):
>   dt-bindings: input: Add Himax HX83102J touchscreen
>   HID: Add Himax HX83102J touchscreen driver
>   HID: Add DRM panel follower function
>   HID: Load firmware directly from file to IC
> 
>  .../input/touchscreen/himax,hx83102j.yaml     |  100 +
>  MAINTAINERS                                   |    7 +
>  drivers/hid/Kconfig                           |    7 +
>  drivers/hid/Makefile                          |    2 +
>  drivers/hid/hid-himax-83102j.c                | 3071 +++++++++++++++++
>  drivers/hid/hid-himax-83102j.h                |  460 +++

My only nit here -- could we please call the driver just hid-himax, to 
follow the pattern we generally use in this subsystem (drivers named after 
vendors).

Please add Ack from Rob, rename the driver, resend, and I'll apply it. 
Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v2 1/1] HID: uclogic: Expose firmware name
From: Jiri Kosina @ 2024-04-03 11:51 UTC (permalink / raw)
  To: José Expósito; +Cc: benjamin.tissoires, linux-input, linux-kernel
In-Reply-To: <20240322100210.107152-2-jose.exposito89@gmail.com>

On Fri, 22 Mar 2024, José Expósito wrote:

> Some vendors reuse the same product ID for different tablets, making it
> difficult for userspace to figure out which table is connected.
> While matching the device name has been used in the past by userspace to
> workaround this limitation, some devices have shown that this is not
> always a valid approach [1].
> 
> However, if userspace could access the firmware version name, it would
> be possible to know which tablet is actually connected by matching it
> against a list of known firmware names [2].
> 
> This patch exposes the firmware version name in the hid->uniq field.
> 
> Link: https://github.com/linuxwacom/libwacom/issues/609  [1]
> Link: https://github.com/linuxwacom/libwacom/issues/610  [2]
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH v3] HID: i2c-hid: Revert to await reset ACK before reading report descriptor
From: Jiri Kosina @ 2024-04-03 12:02 UTC (permalink / raw)
  To: Mark Pearson
  Cc: Hans de Goede, Benjamin Tissoires, Kenny Levinsen,
	Philip Müller, Douglas Anderson, Julian Sax, ahormann,
	Bruno Jesus, Dietrich, kloxdami, Tim Aldridge, Rene Wagner,
	Federico Ricchiuto, linux-input, stable
In-Reply-To: <e941980b-5efb-4ba7-aaf9-f0ed694fb39d@app.fastmail.com>

On Tue, 2 Apr 2024, Mark Pearson wrote:

> On Tue, Apr 2, 2024, at 7:10 AM, Hans de Goede wrote:
> > From: Kenny Levinsen <kl@kl.wtf>
> >
> > In af93a167eda9, i2c_hid_parse was changed to continue with reading the
> > report descriptor before waiting for reset to be acknowledged.
> >
> > This has lead to two regressions:
> >
> > 1. We fail to handle reset acknowledgment if it happens while reading
> >    the report descriptor. The transfer sets I2C_HID_READ_PENDING, which
> >    causes the IRQ handler to return without doing anything.
> >
> >    This affects both a Wacom touchscreen and a Sensel touchpad.
> >
> > 2. On a Sensel touchpad, reading the report descriptor this quickly
> >    after reset results in all zeroes or partial zeroes.
> >
> > The issues were observed on the Lenovo Thinkpad Z16 Gen 2.
> >
> > The change in question was made based on a Microsoft article[0] stating
> > that Windows 8 *may* read the report descriptor in parallel with
> > awaiting reset acknowledgment, intended as a slight reset performance
> > optimization. Perhaps they only do this if reset is not completing
> > quickly enough for their tastes?
> >
> > As the code is not currently ready to read registers in parallel with a
> > pending reset acknowledgment, and as reading quickly breaks the report
> > descriptor on the Sensel touchpad, revert to waiting for reset
> > acknowledgment before proceeding to read the report descriptor.
> >
> > [0]: 
> > https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/plug-and-play-support-and-power-management
> >
> > Fixes: af93a167eda9 ("HID: i2c-hid: Move i2c_hid_finish_hwreset() to 
> > after reading the report-descriptor")
> > Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2271136
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Kenny Levinsen <kl@kl.wtf>
> > Link: https://lore.kernel.org/r/20240331182440.14477-1-kl@kl.wtf
> > [hdegoede@redhat.com Drop no longer necessary abort_reset error exit 
> > path]
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[ .. snip .. ]
> Tested on my Z13 G2 system and confirmed this fixes the issue.
> 
> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>

Applied to hid.git#for-6.9/upstream-fixes. Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply

* Re: [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations
From: Corey Minyard @ 2024-04-03 12:47 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Peter Huewe, Jarkko Sakkinen, Vinod Koul,
	Moritz Fischer, Wu Hao, Xu Yilun, Jiri Kosina, Benjamin Tissoires,
	Michael Hennerich, Peter Rosin, Dmitry Torokhov,
	Iyappan Subramanian, Keyur Chudgar, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Yisen Zhuang, Salil Mehta,
	Tony Lindgren, Liam Girdwood, Mark Brown, Alexandre Belloni,
	Xiang Chen, James E.J. Bottomley, Martin K. Petersen,
	Greg Kroah-Hartman, Russell King, Jiri Slaby, Jacky Huang,
	Shan-Chun Hung, Arnd Bergmann, Jason Gunthorpe, Tom Rix,
	Uwe Kleine-König, Randy Dunlap, Rob Herring, Linus Walleij,
	openipmi-developer, linux-integrity, dmaengine, linux-fpga,
	linux-input, linux-i2c, netdev, linux-omap, linux-rtc, linux-scsi,
	linux-staging, linux-serial, linux-arm-kernel
In-Reply-To: <20240403080702.3509288-34-arnd@kernel.org>

On Wed, Apr 03, 2024 at 10:06:51AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When building with CONFIG_OF and/or CONFIG_ACPI disabled but W=1 extra
> warnings enabled, a lot of driver cause a warning about an unused
> ID table:
> 
> drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable]
> drivers/dma/img-mdc-dma.c:863:34: error: unused variable 'mdc_dma_of_match' [-Werror,-Wunused-const-variable]
> drivers/fpga/versal-fpga.c:62:34: error: unused variable 'versal_fpga_of_match' [-Werror,-Wunused-const-variable]
> drivers/i2c/muxes/i2c-mux-ltc4306.c:200:34: error: unused variable 'ltc4306_of_match' [-Werror,-Wunused-const-variable]
> drivers/i2c/muxes/i2c-mux-reg.c:242:34: error: unused variable 'i2c_mux_reg_of_match' [-Werror,-Wunused-const-variable]
> drivers/memory/pl353-smc.c:62:34: error: unused variable 'pl353_smc_supported_children' [-Werror,-Wunused-const-variable]
> drivers/regulator/pbias-regulator.c:136:34: error: unused variable 'pbias_of_match' [-Werror,-Wunused-const-variable]
> drivers/regulator/twl-regulator.c:552:34: error: unused variable 'twl_of_match' [-Werror,-Wunused-const-variable]
> drivers/regulator/twl6030-regulator.c:645:34: error: unused variable 'twl_of_match' [-Werror,-Wunused-const-variable]
> drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:3635:36: error: unused variable 'sas_v2_acpi_match' [-Werror,-Wunused-const-variable]
> drivers/staging/pi433/pi433_if.c:1359:34: error: unused variable 'pi433_dt_ids' [-Werror,-Wunused-const-variable]
> drivers/tty/serial/amba-pl011.c:2945:34: error: unused variable 'sbsa_uart_of_match' [-Werror,-Wunused-const-variable]
> 
> The fix is always to just remove the of_match_ptr() and ACPI_PTR() wrappers
> that remove the reference, rather than adding another #ifdef just for build
> testing for a configuration that doesn't matter in practice.
> 
> I considered splitting up the large patch into per subsystem patches, but since
> it's really just the same thing everywhere it feels better to do it all at once.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

For the IPMI part:

Acked-by: Corey Minyard <minyard@acm.org>

> ---
>  drivers/char/ipmi/ipmb_dev_int.c          | 2 +-
>  drivers/char/tpm/tpm_ftpm_tee.c           | 2 +-
>  drivers/dma/img-mdc-dma.c                 | 2 +-
>  drivers/fpga/versal-fpga.c                | 2 +-
>  drivers/hid/hid-google-hammer.c           | 6 ++----
>  drivers/i2c/muxes/i2c-mux-ltc4306.c       | 2 +-
>  drivers/i2c/muxes/i2c-mux-reg.c           | 2 +-
>  drivers/input/touchscreen/wdt87xx_i2c.c   | 2 +-
>  drivers/mux/adg792a.c                     | 2 +-
>  drivers/net/ethernet/apm/xgene-v2/main.c  | 2 +-
>  drivers/net/ethernet/hisilicon/hns_mdio.c | 2 +-
>  drivers/regulator/pbias-regulator.c       | 2 +-
>  drivers/regulator/twl-regulator.c         | 2 +-
>  drivers/regulator/twl6030-regulator.c     | 2 +-
>  drivers/rtc/rtc-fsl-ftm-alarm.c           | 2 +-
>  drivers/scsi/hisi_sas/hisi_sas_v1_hw.c    | 2 +-
>  drivers/scsi/hisi_sas/hisi_sas_v2_hw.c    | 2 +-
>  drivers/staging/pi433/pi433_if.c          | 2 +-
>  drivers/tty/serial/amba-pl011.c           | 6 +++---
>  drivers/tty/serial/ma35d1_serial.c        | 2 +-
>  20 files changed, 23 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c
> index 49100845fcb7..5e7bfc7c26e2 100644
> --- a/drivers/char/ipmi/ipmb_dev_int.c
> +++ b/drivers/char/ipmi/ipmb_dev_int.c
> @@ -364,7 +364,7 @@ MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id);
>  static struct i2c_driver ipmb_driver = {
>  	.driver = {
>  		.name = "ipmb-dev",
> -		.acpi_match_table = ACPI_PTR(acpi_ipmb_id),
> +		.acpi_match_table = acpi_ipmb_id,
>  	},
>  	.probe = ipmb_probe,
>  	.remove = ipmb_remove,
> diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c
> index 2ea4882251cf..0c453f3f928d 100644
> --- a/drivers/char/tpm/tpm_ftpm_tee.c
> +++ b/drivers/char/tpm/tpm_ftpm_tee.c
> @@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids);
>  static struct platform_driver ftpm_tee_plat_driver = {
>  	.driver = {
>  		.name = "ftpm-tee",
> -		.of_match_table = of_match_ptr(of_ftpm_tee_ids),
> +		.of_match_table = of_ftpm_tee_ids,
>  	},
>  	.shutdown = ftpm_plat_tee_shutdown,
>  	.probe = ftpm_plat_tee_probe,
> diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c
> index 0532dd2640dc..6931c8a65415 100644
> --- a/drivers/dma/img-mdc-dma.c
> +++ b/drivers/dma/img-mdc-dma.c
> @@ -1073,7 +1073,7 @@ static struct platform_driver mdc_dma_driver = {
>  	.driver = {
>  		.name = "img-mdc-dma",
>  		.pm = &img_mdc_pm_ops,
> -		.of_match_table = of_match_ptr(mdc_dma_of_match),
> +		.of_match_table = mdc_dma_of_match,
>  	},
>  	.probe = mdc_dma_probe,
>  	.remove_new = mdc_dma_remove,
> diff --git a/drivers/fpga/versal-fpga.c b/drivers/fpga/versal-fpga.c
> index 3710e8f01be2..e6189106c468 100644
> --- a/drivers/fpga/versal-fpga.c
> +++ b/drivers/fpga/versal-fpga.c
> @@ -69,7 +69,7 @@ static struct platform_driver versal_fpga_driver = {
>  	.probe = versal_fpga_probe,
>  	.driver = {
>  		.name = "versal_fpga_manager",
> -		.of_match_table = of_match_ptr(versal_fpga_of_match),
> +		.of_match_table = versal_fpga_of_match,
>  	},
>  };
>  module_platform_driver(versal_fpga_driver);
> diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c
> index c6bdb9c4ef3e..886cc5748b7d 100644
> --- a/drivers/hid/hid-google-hammer.c
> +++ b/drivers/hid/hid-google-hammer.c
> @@ -275,21 +275,19 @@ static const struct acpi_device_id cbas_ec_acpi_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids);
>  
> -#ifdef CONFIG_OF
>  static const struct of_device_id cbas_ec_of_match[] = {
>  	{ .compatible = "google,cros-cbas" },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(of, cbas_ec_of_match);
> -#endif
>  
>  static struct platform_driver cbas_ec_driver = {
>  	.probe = cbas_ec_probe,
>  	.remove = cbas_ec_remove,
>  	.driver = {
>  		.name = "cbas_ec",
> -		.acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids),
> -		.of_match_table = of_match_ptr(cbas_ec_of_match),
> +		.acpi_match_table = cbas_ec_acpi_ids,
> +		.of_match_table = cbas_ec_of_match,
>  		.pm = &cbas_ec_pm_ops,
>  	},
>  };
> diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c
> index 23766d853e76..c6d70788161a 100644
> --- a/drivers/i2c/muxes/i2c-mux-ltc4306.c
> +++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c
> @@ -303,7 +303,7 @@ static void ltc4306_remove(struct i2c_client *client)
>  static struct i2c_driver ltc4306_driver = {
>  	.driver		= {
>  		.name	= "ltc4306",
> -		.of_match_table = of_match_ptr(ltc4306_of_match),
> +		.of_match_table = ltc4306_of_match,
>  	},
>  	.probe		= ltc4306_probe,
>  	.remove		= ltc4306_remove,
> diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c
> index 8489971babd3..0f1b39964743 100644
> --- a/drivers/i2c/muxes/i2c-mux-reg.c
> +++ b/drivers/i2c/muxes/i2c-mux-reg.c
> @@ -250,7 +250,7 @@ static struct platform_driver i2c_mux_reg_driver = {
>  	.remove_new = i2c_mux_reg_remove,
>  	.driver	= {
>  		.name	= "i2c-mux-reg",
> -		.of_match_table = of_match_ptr(i2c_mux_reg_of_match),
> +		.of_match_table = i2c_mux_reg_of_match,
>  	},
>  };
>  
> diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c
> index 32c7be54434c..9f3a4092e47c 100644
> --- a/drivers/input/touchscreen/wdt87xx_i2c.c
> +++ b/drivers/input/touchscreen/wdt87xx_i2c.c
> @@ -1166,7 +1166,7 @@ static struct i2c_driver wdt87xx_driver = {
>  		.name = WDT87XX_NAME,
>  		.dev_groups = wdt87xx_groups,
>  		.pm = pm_sleep_ptr(&wdt87xx_pm_ops),
> -		.acpi_match_table = ACPI_PTR(wdt87xx_acpi_id),
> +		.acpi_match_table = wdt87xx_acpi_id,
>  	},
>  };
>  module_i2c_driver(wdt87xx_driver);
> diff --git a/drivers/mux/adg792a.c b/drivers/mux/adg792a.c
> index 4da5aecb9fc6..a5afe29e3cf1 100644
> --- a/drivers/mux/adg792a.c
> +++ b/drivers/mux/adg792a.c
> @@ -141,7 +141,7 @@ MODULE_DEVICE_TABLE(of, adg792a_of_match);
>  static struct i2c_driver adg792a_driver = {
>  	.driver		= {
>  		.name		= "adg792a",
> -		.of_match_table = of_match_ptr(adg792a_of_match),
> +		.of_match_table = adg792a_of_match,
>  	},
>  	.probe		= adg792a_probe,
>  	.id_table	= adg792a_id,
> diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
> index 9e90c2381491..64370057ba3d 100644
> --- a/drivers/net/ethernet/apm/xgene-v2/main.c
> +++ b/drivers/net/ethernet/apm/xgene-v2/main.c
> @@ -731,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
>  static struct platform_driver xge_driver = {
>  	.driver = {
>  		   .name = "xgene-enet-v2",
> -		   .acpi_match_table = ACPI_PTR(xge_acpi_match),
> +		   .acpi_match_table = xge_acpi_match,
>  	},
>  	.probe = xge_probe,
>  	.remove_new = xge_remove,
> diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c
> index ed73707176c1..f8caf59bd759 100644
> --- a/drivers/net/ethernet/hisilicon/hns_mdio.c
> +++ b/drivers/net/ethernet/hisilicon/hns_mdio.c
> @@ -639,7 +639,7 @@ static struct platform_driver hns_mdio_driver = {
>  	.driver = {
>  		   .name = MDIO_DRV_NAME,
>  		   .of_match_table = hns_mdio_match,
> -		   .acpi_match_table = ACPI_PTR(hns_mdio_acpi_match),
> +		   .acpi_match_table = hns_mdio_acpi_match,
>  		   },
>  };
>  
> diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c
> index cd5a0d7e4455..2eeb99e7b850 100644
> --- a/drivers/regulator/pbias-regulator.c
> +++ b/drivers/regulator/pbias-regulator.c
> @@ -231,7 +231,7 @@ static struct platform_driver pbias_regulator_driver = {
>  	.driver		= {
>  		.name		= "pbias-regulator",
>  		.probe_type	= PROBE_PREFER_ASYNCHRONOUS,
> -		.of_match_table = of_match_ptr(pbias_of_match),
> +		.of_match_table = pbias_of_match,
>  	},
>  };
>  
> diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
> index 5bacfcebf59a..4ed91e88e1eb 100644
> --- a/drivers/regulator/twl-regulator.c
> +++ b/drivers/regulator/twl-regulator.c
> @@ -656,7 +656,7 @@ static struct platform_driver twlreg_driver = {
>  	.driver  = {
>  		.name  = "twl4030_reg",
>  		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
> -		.of_match_table = of_match_ptr(twl_of_match),
> +		.of_match_table = twl_of_match,
>  	},
>  };
>  
> diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
> index 6eed0f6e0adb..8a84048a66d7 100644
> --- a/drivers/regulator/twl6030-regulator.c
> +++ b/drivers/regulator/twl6030-regulator.c
> @@ -765,7 +765,7 @@ static struct platform_driver twlreg_driver = {
>  	.driver  = {
>  		.name  = "twl6030_reg",
>  		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
> -		.of_match_table = of_match_ptr(twl_of_match),
> +		.of_match_table = twl_of_match,
>  	},
>  };
>  
> diff --git a/drivers/rtc/rtc-fsl-ftm-alarm.c b/drivers/rtc/rtc-fsl-ftm-alarm.c
> index a72c4ad0cec6..12da7d36e520 100644
> --- a/drivers/rtc/rtc-fsl-ftm-alarm.c
> +++ b/drivers/rtc/rtc-fsl-ftm-alarm.c
> @@ -320,7 +320,7 @@ static struct platform_driver ftm_rtc_driver = {
>  	.driver		= {
>  		.name	= "ftm-alarm",
>  		.of_match_table = ftm_rtc_match,
> -		.acpi_match_table = ACPI_PTR(ftm_imx_acpi_ids),
> +		.acpi_match_table = ftm_imx_acpi_ids,
>  	},
>  };
>  
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> index 161feae3acab..c6f313c9605b 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> @@ -1788,7 +1788,7 @@ static struct platform_driver hisi_sas_v1_driver = {
>  	.driver = {
>  		.name = DRV_NAME,
>  		.of_match_table = sas_v1_of_match,
> -		.acpi_match_table = ACPI_PTR(sas_v1_acpi_match),
> +		.acpi_match_table = sas_v1_acpi_match,
>  	},
>  };
>  
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
> index d89e97e8f5c2..ce3b5e1680f5 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
> @@ -3635,7 +3635,7 @@ static struct platform_driver hisi_sas_v2_driver = {
>  	.driver = {
>  		.name = DRV_NAME,
>  		.of_match_table = sas_v2_of_match,
> -		.acpi_match_table = ACPI_PTR(sas_v2_acpi_match),
> +		.acpi_match_table = sas_v2_acpi_match,
>  	},
>  };
>  
> diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
> index 81de98c0245a..30fd6da3e8d8 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -1367,7 +1367,7 @@ static struct spi_driver pi433_spi_driver = {
>  	.driver = {
>  		.name =		"pi433",
>  		.owner =	THIS_MODULE,
> -		.of_match_table = of_match_ptr(pi433_dt_ids),
> +		.of_match_table = pi433_dt_ids,
>  	},
>  	.probe =	pi433_probe,
>  	.remove =	pi433_remove,
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 2fa3fb30dc6c..dd1d1a2cc5f5 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2948,7 +2948,7 @@ static const struct of_device_id sbsa_uart_of_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, sbsa_uart_of_match);
>  
> -static const struct acpi_device_id __maybe_unused sbsa_uart_acpi_match[] = {
> +static const struct acpi_device_id sbsa_uart_acpi_match[] = {
>  	{ "ARMH0011", 0 },
>  	{ "ARMHB000", 0 },
>  	{},
> @@ -2961,8 +2961,8 @@ static struct platform_driver arm_sbsa_uart_platform_driver = {
>  	.driver	= {
>  		.name	= "sbsa-uart",
>  		.pm	= &pl011_dev_pm_ops,
> -		.of_match_table = of_match_ptr(sbsa_uart_of_match),
> -		.acpi_match_table = ACPI_PTR(sbsa_uart_acpi_match),
> +		.of_match_table = sbsa_uart_of_match,
> +		.acpi_match_table = sbsa_uart_acpi_match,
>  		.suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011),
>  	},
>  };
> diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c
> index 19f0a305cc43..e326d0fb06b2 100644
> --- a/drivers/tty/serial/ma35d1_serial.c
> +++ b/drivers/tty/serial/ma35d1_serial.c
> @@ -798,7 +798,7 @@ static struct platform_driver ma35d1serial_driver = {
>  	.resume     = ma35d1serial_resume,
>  	.driver     = {
>  		.name   = "ma35d1-uart",
> -		.of_match_table = of_match_ptr(ma35d1_serial_of_match),
> +		.of_match_table = ma35d1_serial_of_match,
>  	},
>  };
>  
> -- 
> 2.39.2
> 

^ permalink raw reply

* Re: [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations
From: Corey Minyard @ 2024-04-03 12:47 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Arnd Bergmann, linux-kernel, Peter Huewe, Jarkko Sakkinen,
	Vinod Koul, Moritz Fischer, Wu Hao, Xu Yilun, Jiri Kosina,
	Benjamin Tissoires, Michael Hennerich, Peter Rosin,
	Dmitry Torokhov, Iyappan Subramanian, Keyur Chudgar,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Yisen Zhuang, Salil Mehta, Tony Lindgren, Liam Girdwood,
	Mark Brown, Alexandre Belloni, Xiang Chen, James E.J. Bottomley,
	Martin K. Petersen, Greg Kroah-Hartman, Russell King, Jiri Slaby,
	Jacky Huang, Shan-Chun Hung, Arnd Bergmann, Jason Gunthorpe,
	Tom Rix, Uwe Kleine-König, Randy Dunlap, Rob Herring,
	Linus Walleij, openipmi-developer, linux-integrity, dmaengine,
	linux-fpga, linux-input, linux-i2c, netdev, linux-omap, linux-rtc,
	linux-scsi, linux-staging, linux-serial, linux-arm-kernel
In-Reply-To: <Zg0hxMZGlwfXV2RA@smile.fi.intel.com>

On Wed, Apr 03, 2024 at 12:30:44PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 03, 2024 at 10:06:51AM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > When building with CONFIG_OF and/or CONFIG_ACPI disabled but W=1 extra
> > warnings enabled, a lot of driver cause a warning about an unused
> > ID table:
> > 
> > drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable]
> > drivers/dma/img-mdc-dma.c:863:34: error: unused variable 'mdc_dma_of_match' [-Werror,-Wunused-const-variable]
> > drivers/fpga/versal-fpga.c:62:34: error: unused variable 'versal_fpga_of_match' [-Werror,-Wunused-const-variable]
> > drivers/i2c/muxes/i2c-mux-ltc4306.c:200:34: error: unused variable 'ltc4306_of_match' [-Werror,-Wunused-const-variable]
> > drivers/i2c/muxes/i2c-mux-reg.c:242:34: error: unused variable 'i2c_mux_reg_of_match' [-Werror,-Wunused-const-variable]
> > drivers/memory/pl353-smc.c:62:34: error: unused variable 'pl353_smc_supported_children' [-Werror,-Wunused-const-variable]
> > drivers/regulator/pbias-regulator.c:136:34: error: unused variable 'pbias_of_match' [-Werror,-Wunused-const-variable]
> > drivers/regulator/twl-regulator.c:552:34: error: unused variable 'twl_of_match' [-Werror,-Wunused-const-variable]
> > drivers/regulator/twl6030-regulator.c:645:34: error: unused variable 'twl_of_match' [-Werror,-Wunused-const-variable]
> > drivers/scsi/hisi_sas/hisi_sas_v2_hw.c:3635:36: error: unused variable 'sas_v2_acpi_match' [-Werror,-Wunused-const-variable]
> > drivers/staging/pi433/pi433_if.c:1359:34: error: unused variable 'pi433_dt_ids' [-Werror,-Wunused-const-variable]
> > drivers/tty/serial/amba-pl011.c:2945:34: error: unused variable 'sbsa_uart_of_match' [-Werror,-Wunused-const-variable]
> > 
> > The fix is always to just remove the of_match_ptr() and ACPI_PTR() wrappers
> > that remove the reference, rather than adding another #ifdef just for build
> > testing for a configuration that doesn't matter in practice.
> 
> > I considered splitting up the large patch into per subsystem patches, but since
> > it's really just the same thing everywhere it feels better to do it all at once.
> 
> Can we split to three groups:
> - Dropping ACPI_PTR()
> - Dropping of_match_ptr() (which I won't review in depth, for example)
> - Dropping both
> ?

Why?

-corey

> 
> ...
> 
> > --- a/drivers/char/ipmi/ipmb_dev_int.c
> > +++ b/drivers/char/ipmi/ipmb_dev_int.c
> > @@ -364,7 +364,7 @@ MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id);
> >  static struct i2c_driver ipmb_driver = {
> >  	.driver = {
> >  		.name = "ipmb-dev",
> > -		.acpi_match_table = ACPI_PTR(acpi_ipmb_id),
> > +		.acpi_match_table = acpi_ipmb_id,
> >  	},
> >  	.probe = ipmb_probe,
> >  	.remove = ipmb_remove,
> 
> acpi.h --> mod_devicetable.h.
> 
> ...
> 
> > --- a/drivers/hid/hid-google-hammer.c
> > +++ b/drivers/hid/hid-google-hammer.c
> > @@ -275,21 +275,19 @@ static const struct acpi_device_id cbas_ec_acpi_ids[] = {
> >  };
> >  MODULE_DEVICE_TABLE(acpi, cbas_ec_acpi_ids);
> >  
> > -#ifdef CONFIG_OF
> >  static const struct of_device_id cbas_ec_of_match[] = {
> >  	{ .compatible = "google,cros-cbas" },
> >  	{ },
> >  };
> >  MODULE_DEVICE_TABLE(of, cbas_ec_of_match);
> > -#endif
> >  
> >  static struct platform_driver cbas_ec_driver = {
> >  	.probe = cbas_ec_probe,
> >  	.remove = cbas_ec_remove,
> >  	.driver = {
> >  		.name = "cbas_ec",
> > -		.acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids),
> > -		.of_match_table = of_match_ptr(cbas_ec_of_match),
> > +		.acpi_match_table = cbas_ec_acpi_ids,
> > +		.of_match_table = cbas_ec_of_match,
> >  		.pm = &cbas_ec_pm_ops,
> >  	},
> >  };
> 
> Ditto, and likely of.h can be also dropped.
> 
> ...
> 
> > --- a/drivers/input/touchscreen/wdt87xx_i2c.c
> > +++ b/drivers/input/touchscreen/wdt87xx_i2c.c
> > @@ -1166,7 +1166,7 @@ static struct i2c_driver wdt87xx_driver = {
> >  		.name = WDT87XX_NAME,
> >  		.dev_groups = wdt87xx_groups,
> >  		.pm = pm_sleep_ptr(&wdt87xx_pm_ops),
> > -		.acpi_match_table = ACPI_PTR(wdt87xx_acpi_id),
> > +		.acpi_match_table = wdt87xx_acpi_id,
> >  	},
> >  };
> >  module_i2c_driver(wdt87xx_driver);
> 
> Ditto.
> 
> ...
> 
> > --- a/drivers/net/ethernet/apm/xgene-v2/main.c
> > +++ b/drivers/net/ethernet/apm/xgene-v2/main.c
> > @@ -731,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
> >  static struct platform_driver xge_driver = {
> >  	.driver = {
> >  		   .name = "xgene-enet-v2",
> > -		   .acpi_match_table = ACPI_PTR(xge_acpi_match),
> > +		   .acpi_match_table = xge_acpi_match,
> >  	},
> >  	.probe = xge_probe,
> >  	.remove_new = xge_remove,
> 
> Ditto. And remove forward declaration of the variable as well.
> 
> ...
> 
> > --- a/drivers/rtc/rtc-fsl-ftm-alarm.c
> > +++ b/drivers/rtc/rtc-fsl-ftm-alarm.c
> > @@ -320,7 +320,7 @@ static struct platform_driver ftm_rtc_driver = {
> >  	.driver		= {
> >  		.name	= "ftm-alarm",
> >  		.of_match_table = ftm_rtc_match,
> > -		.acpi_match_table = ACPI_PTR(ftm_imx_acpi_ids),
> > +		.acpi_match_table = ftm_imx_acpi_ids,
> >  	},
> >  };
> 
> Ditto.
> 
> ...
> 
> >  	.driver = {
> >  		.name =		"pi433",
> >  		.owner =	THIS_MODULE,
> 
> Oh-oh.
> 
> > -		.of_match_table = of_match_ptr(pi433_dt_ids),
> > +		.of_match_table = pi433_dt_ids,
> >  	},
> 
> ...
> 
> > --- a/drivers/tty/serial/amba-pl011.c
> > +++ b/drivers/tty/serial/amba-pl011.c
> > @@ -2948,7 +2948,7 @@ static const struct of_device_id sbsa_uart_of_match[] = {
> >  };
> >  MODULE_DEVICE_TABLE(of, sbsa_uart_of_match);
> >  
> > -static const struct acpi_device_id __maybe_unused sbsa_uart_acpi_match[] = {
> > +static const struct acpi_device_id sbsa_uart_acpi_match[] = {
> >  	{ "ARMH0011", 0 },
> >  	{ "ARMHB000", 0 },
> >  	{},
> > @@ -2961,8 +2961,8 @@ static struct platform_driver arm_sbsa_uart_platform_driver = {
> >  	.driver	= {
> >  		.name	= "sbsa-uart",
> >  		.pm	= &pl011_dev_pm_ops,
> > -		.of_match_table = of_match_ptr(sbsa_uart_of_match),
> > -		.acpi_match_table = ACPI_PTR(sbsa_uart_acpi_match),
> > +		.of_match_table = sbsa_uart_of_match,
> > +		.acpi_match_table = sbsa_uart_acpi_match,
> >  		.suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011),
> >  	},
> >  };
> 
> Ditto.
> 
> ...
> 
> As mentioned above, I haven't and won't look into of_match_ptr() cases, but you
> got the idea.
> 
> For the above, if addressed as suggested,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

^ permalink raw reply

* Re: [PATCH 07/34] Input: stmpe-ts - mark OF related data as maybe unused
From: Uwe Kleine-König @ 2024-04-03 13:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Dmitry Torokhov, Maxime Coquelin, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, linux-input, linux-stm32,
	linux-arm-kernel
In-Reply-To: <20240403080702.3509288-8-arnd@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2521 bytes --]

Hello,

On Wed, Apr 03, 2024 at 10:06:25AM +0200, Arnd Bergmann wrote:
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> When compile tested with W=1 on x86_64 with driver as built-in:
> 
>   stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/input/touchscreen/stmpe-ts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
> index b204fdb2d22c..022b3e94266d 100644
> --- a/drivers/input/touchscreen/stmpe-ts.c
> +++ b/drivers/input/touchscreen/stmpe-ts.c
> @@ -366,7 +366,7 @@ static struct platform_driver stmpe_ts_driver = {
>  };
>  module_platform_driver(stmpe_ts_driver);
>  
> -static const struct of_device_id stmpe_ts_ids[] = {
> +static const struct of_device_id stmpe_ts_ids[] __maybe_unused = {
>  	{ .compatible = "st,stmpe-ts", },
>  	{ },
>  };

I'd suggest the following instead:

diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
index b204fdb2d22c..e1afebc641ec 100644
--- a/drivers/input/touchscreen/stmpe-ts.c
+++ b/drivers/input/touchscreen/stmpe-ts.c
@@ -357,21 +357,22 @@ static void stmpe_ts_remove(struct platform_device *pdev)
 	stmpe_disable(ts->stmpe, STMPE_BLOCK_TOUCHSCREEN);
 }
 
-static struct platform_driver stmpe_ts_driver = {
-	.driver = {
-		.name = STMPE_TS_NAME,
-	},
-	.probe = stmpe_input_probe,
-	.remove_new = stmpe_ts_remove,
-};
-module_platform_driver(stmpe_ts_driver);
-
 static const struct of_device_id stmpe_ts_ids[] = {
 	{ .compatible = "st,stmpe-ts", },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, stmpe_ts_ids);
 
+static struct platform_driver stmpe_ts_driver = {
+	.driver = {
+		.name = STMPE_TS_NAME,
+		.of_match_table = stmpe_ts_ids,
+	},
+	.probe = stmpe_input_probe,
+	.remove_new = stmpe_ts_remove,
+};
+module_platform_driver(stmpe_ts_driver);
+
 MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>");
 MODULE_DESCRIPTION("STMPEXXX touchscreen driver");
 MODULE_LICENSE("GPL");

I wonder if with the status quo binding via dt works at all with
stmpe_ts_driver.driver.of_match_table unset?!

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related

* Re: [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations
From: Andy Shevchenko @ 2024-04-03 13:23 UTC (permalink / raw)
  To: Corey Minyard
  Cc: Arnd Bergmann, linux-kernel, Peter Huewe, Jarkko Sakkinen,
	Vinod Koul, Moritz Fischer, Wu Hao, Xu Yilun, Jiri Kosina,
	Benjamin Tissoires, Michael Hennerich, Peter Rosin,
	Dmitry Torokhov, Iyappan Subramanian, Keyur Chudgar,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Yisen Zhuang, Salil Mehta, Tony Lindgren, Liam Girdwood,
	Mark Brown, Alexandre Belloni, Xiang Chen, James E.J. Bottomley,
	Martin K. Petersen, Greg Kroah-Hartman, Russell King, Jiri Slaby,
	Jacky Huang, Shan-Chun Hung, Arnd Bergmann, Jason Gunthorpe,
	Tom Rix, Uwe Kleine-König, Randy Dunlap, Rob Herring,
	Linus Walleij, openipmi-developer, linux-integrity, dmaengine,
	linux-fpga, linux-input, linux-i2c, netdev, linux-omap, linux-rtc,
	linux-scsi, linux-staging, linux-serial, linux-arm-kernel
In-Reply-To: <Zg1P9fpdwPot3Dxj@mail.minyard.net>

On Wed, Apr 03, 2024 at 07:47:49AM -0500, Corey Minyard wrote:
> On Wed, Apr 03, 2024 at 12:30:44PM +0300, Andy Shevchenko wrote:
> > On Wed, Apr 03, 2024 at 10:06:51AM +0200, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>

...

> > > I considered splitting up the large patch into per subsystem patches, but since
> > > it's really just the same thing everywhere it feels better to do it all at once.
> > 
> > Can we split to three groups:
> > - Dropping ACPI_PTR()
> > - Dropping of_match_ptr() (which I won't review in depth, for example)
> > - Dropping both
> > ?
> 
> Why?

Easy to review ACPI parts independently on the rest. I think I explained that
in above. Besides that some patches might require additional work (don't remember
if it is the case for _this_ patch).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply

* Re: [PATCH 07/34] Input: stmpe-ts - mark OF related data as maybe unused
From: Uwe Kleine-König @ 2024-04-03 13:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Dmitry Torokhov, Maxime Coquelin, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, linux-input, linux-stm32,
	linux-arm-kernel
In-Reply-To: <gh4slqpbzul67vni6hv2opjuvccokfwqnnroxbpqt5oc3kiz65@nbqaxhwltb3z>

[-- Attachment #1: Type: text/plain, Size: 3145 bytes --]

Hello again,

On Wed, Apr 03, 2024 at 03:17:32PM +0200, Uwe Kleine-König wrote:
> On Wed, Apr 03, 2024 at 10:06:25AM +0200, Arnd Bergmann wrote:
> > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > 
> > When compile tested with W=1 on x86_64 with driver as built-in:
> > 
> >   stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  drivers/input/touchscreen/stmpe-ts.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
> > index b204fdb2d22c..022b3e94266d 100644
> > --- a/drivers/input/touchscreen/stmpe-ts.c
> > +++ b/drivers/input/touchscreen/stmpe-ts.c
> > @@ -366,7 +366,7 @@ static struct platform_driver stmpe_ts_driver = {
> >  };
> >  module_platform_driver(stmpe_ts_driver);
> >  
> > -static const struct of_device_id stmpe_ts_ids[] = {
> > +static const struct of_device_id stmpe_ts_ids[] __maybe_unused = {
> >  	{ .compatible = "st,stmpe-ts", },
> >  	{ },
> >  };
> 
> I'd suggest the following instead:
> 
> diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c
> index b204fdb2d22c..e1afebc641ec 100644
> --- a/drivers/input/touchscreen/stmpe-ts.c
> +++ b/drivers/input/touchscreen/stmpe-ts.c
> @@ -357,21 +357,22 @@ static void stmpe_ts_remove(struct platform_device *pdev)
>  	stmpe_disable(ts->stmpe, STMPE_BLOCK_TOUCHSCREEN);
>  }
>  
> -static struct platform_driver stmpe_ts_driver = {
> -	.driver = {
> -		.name = STMPE_TS_NAME,
> -	},
> -	.probe = stmpe_input_probe,
> -	.remove_new = stmpe_ts_remove,
> -};
> -module_platform_driver(stmpe_ts_driver);
> -
>  static const struct of_device_id stmpe_ts_ids[] = {
>  	{ .compatible = "st,stmpe-ts", },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(of, stmpe_ts_ids);
>  
> +static struct platform_driver stmpe_ts_driver = {
> +	.driver = {
> +		.name = STMPE_TS_NAME,
> +		.of_match_table = stmpe_ts_ids,
> +	},
> +	.probe = stmpe_input_probe,
> +	.remove_new = stmpe_ts_remove,
> +};
> +module_platform_driver(stmpe_ts_driver);
> +
>  MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>");
>  MODULE_DESCRIPTION("STMPEXXX touchscreen driver");
>  MODULE_LICENSE("GPL");
> 
> I wonder if with the status quo binding via dt works at all with
> stmpe_ts_driver.driver.of_match_table unset?!

I missed the discussion between Andy and Krzysztof when I wrote my mail.
I still think this should be considered and if .of_match_table should
stay unassigned (e.g. to allow dropping stmpe_ts_ids in case the driver
is built-in?) I think adding a code comment would be appropriate because
having an of_device_id array but not adding it to the driver is unusuall
and generally a bad template for new drivers.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply

* Re: [PATCH v2] HID: logitech-dj: allow mice to report multimedia keycodes
From: Hans de Goede @ 2024-04-03 13:54 UTC (permalink / raw)
  To: Jiri Kosina, Yaraslau Furman
  Cc: Benjamin Tissoires, Lucas Zampieri, Filipe Laíns,
	open list:HID LOGITECH DRIVERS, open list
In-Reply-To: <nycvar.YFH.7.76.2404031337250.20263@cbobk.fhfr.pm>

Hi All,

On 4/3/24 1:38 PM, Jiri Kosina wrote:
> On Thu, 22 Feb 2024, Yaraslau Furman wrote:
> 
>> Multimedia buttons can be bound to the mouse's extra keys in Windows application.
>> Let Linux receive those keycodes.
>>
>> Signed-off-by: Yaraslau Furman <yaro330@gmail.com>
>> ---
>>  drivers/hid/hid-logitech-dj.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
>> index e6a8b6d8eab7..3c3c497b6b91 100644
>> --- a/drivers/hid/hid-logitech-dj.c
>> +++ b/drivers/hid/hid-logitech-dj.c
>> @@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
>>  		}
>>  		break;
>>  	case REPORT_TYPE_MOUSE:
>> -		workitem->reports_supported |= STD_MOUSE | HIDPP;
>> -		if (djrcv_dev->type == recvr_type_mouse_only)
>> -			workitem->reports_supported |= MULTIMEDIA;
>> +		workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
>>  		break;
> 
> CCing Hans who introduced this explicit check back in 3ed224e273ac 
> ("HID: logitech-dj: Fix 064d:c52f receiver support").
> Should it be made device-specific?

Jiri, thank you for bringing this to my attention. If mice attached
to other receivers can send multi-media key presses too, then I believe
that dropping the if (djrcv_dev->type == recvr_type_mouse_only) check
is fine.

IOW, the patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans





^ permalink raw reply

* [PATCH v2] HID: logitech-dj: allow mice to report multimedia keycodes
From: Yaroslav Furman @ 2024-04-03 15:05 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: Lucas Zampieri, Yaraslau Furman, Filipe Laíns,
	open list:HID LOGITECH DRIVERS, open list
In-Reply-To: <7e34dc43-b70b-4a50-86fd-f021f2de4845@redhat.com>

From: Yaraslau Furman <yaro330@gmail.com>

So, I think this should work fine for now, but IMO we should see if it's
possible to allow the driver to receive all events that a keyboard can send,
since Windows application can assign pretty much any keycode to any mouse
button (perhaps not the main ones though), and then we might see the same situation again.

I tried doing that on my system but the driver stopped working completely.
---
 drivers/hid/hid-logitech-dj.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index e6a8b6d8eab7..3c3c497b6b91 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
 		}
 		break;
 	case REPORT_TYPE_MOUSE:
-		workitem->reports_supported |= STD_MOUSE | HIDPP;
-		if (djrcv_dev->type == recvr_type_mouse_only)
-			workitem->reports_supported |= MULTIMEDIA;
+		workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
 		break;
 	}
 }
-- 
2.44.0


^ permalink raw reply related

* [PATCH v2] HID: logitech-dj: allow mice to report multimedia keycodes
From: Yaroslav Furman @ 2024-04-03 15:06 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: Lucas Zampieri, Hans de Goede, Yaraslau Furman, Filipe Laíns,
	open list:HID LOGITECH DRIVERS, open list
In-Reply-To: <7e34dc43-b70b-4a50-86fd-f021f2de4845@redhat.com>

From: Yaraslau Furman <yaro330@gmail.com>

So, I think this should work fine for now, but IMO we should see if it's
possible to allow the driver to receive all events that a keyboard can send,
since Windows application can assign pretty much any keycode to any mouse
button (perhaps not the main ones though), and then we might see the same situation again.

I tried doing that on my system but the driver stopped working completely.
---
 drivers/hid/hid-logitech-dj.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index e6a8b6d8eab7..3c3c497b6b91 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
 		}
 		break;
 	case REPORT_TYPE_MOUSE:
-		workitem->reports_supported |= STD_MOUSE | HIDPP;
-		if (djrcv_dev->type == recvr_type_mouse_only)
-			workitem->reports_supported |= MULTIMEDIA;
+		workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
 		break;
 	}
 }
-- 
2.44.0


^ permalink raw reply related

* Re: [PATCH v2] HID: logitech-dj: allow mice to report multimedia keycodes
From: Hans de Goede @ 2024-04-03 15:38 UTC (permalink / raw)
  To: Yaroslav Furman, Jiri Kosina, Benjamin Tissoires
  Cc: Lucas Zampieri, Filipe Laíns, open list:HID LOGITECH DRIVERS,
	open list
In-Reply-To: <20240403150638.18749-1-Yaroslav.Furman@softeq.com>

Hi Yaroslav,

On 4/3/24 5:06 PM, Yaroslav Furman wrote:
> From: Yaraslau Furman <yaro330@gmail.com>
> 
> So, I think this should work fine for now, but IMO we should see if it's
> possible to allow the driver to receive all events that a keyboard can send,
> since Windows application can assign pretty much any keycode to any mouse
> button (perhaps not the main ones though), and then we might see the same situation again.
> 
> I tried doing that on my system but the driver stopped working completely.

The actual code change itself looks fine, but the above should have gone
into a cover-letter or something like that.

This is not a proper commit message and this is also lacking
your Signed-off-by (which you did correctly include in your
original version:

https://lore.kernel.org/linux-input/20240128214906.60606-1-yaro330@gmail.com/

Please send a v3 with a proper commit-msg + Signed-off-by.

Regards,

Hans



> ---
>  drivers/hid/hid-logitech-dj.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index e6a8b6d8eab7..3c3c497b6b91 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
>  		}
>  		break;
>  	case REPORT_TYPE_MOUSE:
> -		workitem->reports_supported |= STD_MOUSE | HIDPP;
> -		if (djrcv_dev->type == recvr_type_mouse_only)
> -			workitem->reports_supported |= MULTIMEDIA;
> +		workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
>  		break;
>  	}
>  }


^ permalink raw reply

* Re: [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations
From: Jarkko Sakkinen @ 2024-04-03 16:09 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel, Corey Minyard, Peter Huewe,
	Vinod Koul, Moritz Fischer, Wu Hao, Xu Yilun, Jiri Kosina,
	Benjamin Tissoires, Michael Hennerich, Peter Rosin,
	Dmitry Torokhov, Iyappan Subramanian, Keyur Chudgar,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Yisen Zhuang, Salil Mehta, Tony Lindgren, Liam Girdwood,
	Mark Brown, Alexandre Belloni, Xiang Chen, James E.J. Bottomley,
	Martin K. Petersen, Greg Kroah-Hartman, Russell King, Jiri Slaby,
	Jacky Huang, Shan-Chun Hung
  Cc: Arnd Bergmann, Jason Gunthorpe, Tom Rix, Uwe Kleine-König,
	Randy Dunlap, Rob Herring, Linus Walleij, openipmi-developer,
	linux-integrity, dmaengine, linux-fpga, linux-input, linux-i2c,
	netdev, linux-omap, linux-rtc, linux-scsi, linux-staging,
	linux-serial, linux-arm-kernel
In-Reply-To: <20240403080702.3509288-34-arnd@kernel.org>

On Wed Apr 3, 2024 at 11:06 AM EEST, Arnd Bergmann wrote:
> diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c
> index 2ea4882251cf..0c453f3f928d 100644
> --- a/drivers/char/tpm/tpm_ftpm_tee.c
> +++ b/drivers/char/tpm/tpm_ftpm_tee.c
> @@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids);
>  static struct platform_driver ftpm_tee_plat_driver = {
>  	.driver = {
>  		.name = "ftpm-tee",
> -		.of_match_table = of_match_ptr(of_ftpm_tee_ids),
> +		.of_match_table = of_ftpm_tee_ids,
>  	},
>  	.shutdown = ftpm_plat_tee_shutdown,
>  	.probe = ftpm_plat_tee_probe,

For this portion:

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

[can be included to possible new revisions if it stays same]

BR, Jarkko

^ permalink raw reply

* [PATCH v3] HID: logitech-dj: allow mice to use all types of reports
From: Yaroslav Furman @ 2024-04-03 16:54 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: Lucas Zampieri, Hans de Goede, Yaraslau Furman, Filipe Laíns,
	open list:HID LOGITECH DRIVERS, open list
In-Reply-To: <6713652f-9a44-422e-b6a7-45501093cb08@redhat.com>

From: Yaraslau Furman <yaro330@gmail.com>

You can bind whatever action you want to the mouse's reprogrammable
buttons using Windows application. Allow Linux to receive multimedia keycodes.

Signed-off-by: Yaraslau Furman <yaro330@gmail.com>
---
 drivers/hid/hid-logitech-dj.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index e6a8b6d8eab7..3c3c497b6b91 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -965,9 +965,7 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
 		}
 		break;
 	case REPORT_TYPE_MOUSE:
-		workitem->reports_supported |= STD_MOUSE | HIDPP;
-		if (djrcv_dev->type == recvr_type_mouse_only)
-			workitem->reports_supported |= MULTIMEDIA;
+		workitem->reports_supported |= STD_MOUSE | HIDPP | MULTIMEDIA;
 		break;
 	}
 }
-- 
2.44.0


^ permalink raw reply related


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