Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v2 1/2] HID: i2c-hid: acpi: Drop unneded NULL check of adev
From: Andy Shevchenko @ 2023-01-16 15:46 UTC (permalink / raw)
  To: Dmitry Torokhov, Raul E Rangel, Benjamin Tissoires, linux-input,
	linux-kernel
  Cc: Jiri Kosina, Andy Shevchenko

The driver is enumerated on ACPI platforms, so adev is valid.
Since there is no valid I²C ID table provided, there is no
possibility to bind a device to this driver via user space.
Hence, drop unneeded NULL check of adev.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: no changes
 drivers/hid/i2c-hid/i2c-hid-acpi.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c
index 375c77c3db74..5e28da45e762 100644
--- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
+++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
@@ -48,8 +48,9 @@ static guid_t i2c_hid_guid =
 	GUID_INIT(0x3CDFF6F7, 0x4267, 0x4555,
 		  0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
 
-static int i2c_hid_acpi_get_descriptor(struct acpi_device *adev)
+static int i2c_hid_acpi_get_descriptor(struct i2c_hid_acpi *ihid_acpi)
 {
+	struct acpi_device *adev = ihid_acpi->adev;
 	acpi_handle handle = acpi_device_handle(adev);
 	union acpi_object *obj;
 	u16 hid_descriptor_address;
@@ -81,29 +82,22 @@ static int i2c_hid_acpi_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct i2c_hid_acpi *ihid_acpi;
-	struct acpi_device *adev;
 	u16 hid_descriptor_address;
 	int ret;
 
-	adev = ACPI_COMPANION(dev);
-	if (!adev) {
-		dev_err(&client->dev, "Error could not get ACPI device\n");
-		return -ENODEV;
-	}
-
 	ihid_acpi = devm_kzalloc(&client->dev, sizeof(*ihid_acpi), GFP_KERNEL);
 	if (!ihid_acpi)
 		return -ENOMEM;
 
-	ihid_acpi->adev = adev;
+	ihid_acpi->adev = ACPI_COMPANION(dev);
 	ihid_acpi->ops.shutdown_tail = i2c_hid_acpi_shutdown_tail;
 
-	ret = i2c_hid_acpi_get_descriptor(adev);
+	ret = i2c_hid_acpi_get_descriptor(ihid_acpi);
 	if (ret < 0)
 		return ret;
 	hid_descriptor_address = ret;
 
-	acpi_device_fix_up_power(adev);
+	acpi_device_fix_up_power(ihid_acpi->adev);
 
 	return i2c_hid_core_probe(client, &ihid_acpi->ops,
 				  hid_descriptor_address, 0);
-- 
2.39.0


^ permalink raw reply related

* Re: [PATCH 04/16] Input: s6sy761 - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr()
From: Caleb Connolly @ 2023-01-16 14:20 UTC (permalink / raw)
  To: Jonathan Cameron, linux-input, Dmitry Torokhov
  Cc: Jonathan Cameron, Andi Shyti
In-Reply-To: <20230114171620.42891-5-jic23@kernel.org>



On 14/01/2023 17:16, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as
> they require explicit protection against unused function warnings.
> The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/
> RUNTIME_PM_OPS() allows the compiler to see the functions,
> thus suppressing the warning, but still allowing the unused code to be
> removed. Thus also drop the __maybe_unused markings.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Tested-by: Caleb Connolly <caleb@connolly.tech> # oneplus-guacamole
> Cc: Caleb Connolly <caleb@connolly.tech>
> Cc: Andi Shyti <andi@etezian.org>
> ---
>  drivers/input/touchscreen/s6sy761.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/input/touchscreen/s6sy761.c b/drivers/input/touchscreen/s6sy761.c
> index cc417c03aaca..371cf4848ad5 100644
> --- a/drivers/input/touchscreen/s6sy761.c
> +++ b/drivers/input/touchscreen/s6sy761.c
> @@ -479,7 +479,7 @@ static void s6sy761_remove(struct i2c_client *client)
>  	pm_runtime_disable(&client->dev);
>  }
>
> -static int __maybe_unused s6sy761_runtime_suspend(struct device *dev)
> +static int s6sy761_runtime_suspend(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -487,7 +487,7 @@ static int __maybe_unused s6sy761_runtime_suspend(struct device *dev)
>  				S6SY761_APPLICATION_MODE, S6SY761_APP_SLEEP);
>  }
>
> -static int __maybe_unused s6sy761_runtime_resume(struct device *dev)
> +static int s6sy761_runtime_resume(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -495,7 +495,7 @@ static int __maybe_unused s6sy761_runtime_resume(struct device *dev)
>  				S6SY761_APPLICATION_MODE, S6SY761_APP_NORMAL);
>  }
>
> -static int __maybe_unused s6sy761_suspend(struct device *dev)
> +static int s6sy761_suspend(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -504,7 +504,7 @@ static int __maybe_unused s6sy761_suspend(struct device *dev)
>  	return 0;
>  }
>
> -static int __maybe_unused s6sy761_resume(struct device *dev)
> +static int s6sy761_resume(struct device *dev)
>  {
>  	struct s6sy761_data *sdata = dev_get_drvdata(dev);
>
> @@ -514,9 +514,8 @@ static int __maybe_unused s6sy761_resume(struct device *dev)
>  }
>
>  static const struct dev_pm_ops s6sy761_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(s6sy761_suspend, s6sy761_resume)
> -	SET_RUNTIME_PM_OPS(s6sy761_runtime_suspend,
> -				s6sy761_runtime_resume, NULL)
> +	SYSTEM_SLEEP_PM_OPS(s6sy761_suspend, s6sy761_resume)
> +	RUNTIME_PM_OPS(s6sy761_runtime_suspend, s6sy761_runtime_resume, NULL)
>  };
>
>  #ifdef CONFIG_OF
> @@ -537,7 +536,7 @@ static struct i2c_driver s6sy761_driver = {
>  	.driver = {
>  		.name = S6SY761_DEV_NAME,
>  		.of_match_table = of_match_ptr(s6sy761_of_match),
> -		.pm = &s6sy761_pm_ops,
> +		.pm = pm_ptr(&s6sy761_pm_ops),
>  	},
>  	.probe_new = s6sy761_probe,
>  	.remove = s6sy761_remove,
> --
> 2.39.0
>

--
Kind Regards,
Caleb


^ permalink raw reply

* [PATCH AUTOSEL 5.4 13/16] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
From: Sasha Levin @ 2023-01-16 14:05 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Michael Klein, Hans de Goede, Sasha Levin, markgross, linux-input,
	platform-driver-x86
In-Reply-To: <20230116140520.116257-1-sashal@kernel.org>

From: Michael Klein <m.klein@mvz-labor-lb.de>

[ Upstream commit 36c2b9d6710427f802494ba070621cb415198293 ]

Add touchscreen info for the CSL Panther Tab HD.

Signed-off-by: Michael Klein <m.klein@mvz-labor-lb.de>
Link: https://lore.kernel.org/r/20221220121103.uiwn5l7fii2iggct@LLGMVZLB-0037
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index 515c66ca1aec..61cb1a4a8257 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -169,6 +169,23 @@ static const struct ts_dmi_data connect_tablet9_data = {
 	.properties     = connect_tablet9_props,
 };
 
+static const struct property_entry csl_panther_tab_hd_props[] = {
+	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
+	PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
+	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
+	PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
+	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
+	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-csl-panther-tab-hd.fw"),
+	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+	{ }
+};
+
+static const struct ts_dmi_data csl_panther_tab_hd_data = {
+	.acpi_name      = "MSSL1680:00",
+	.properties     = csl_panther_tab_hd_props,
+};
+
 static const struct property_entry cube_iwork8_air_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
@@ -721,6 +738,14 @@ static const struct dmi_system_id touchscreen_dmi_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
 		},
 	},
+	{
+		/* CSL Panther Tab HD */
+		.driver_data = (void *)&csl_panther_tab_hd_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "CSL Computer GmbH & Co. KG"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"),
+		},
+	},
 	{
 		/* CUBE iwork8 Air */
 		.driver_data = (void *)&cube_iwork8_air_data,
-- 
2.35.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.10 15/17] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
From: Sasha Levin @ 2023-01-16 14:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Michael Klein, Hans de Goede, Sasha Levin, markgross, linux-input,
	platform-driver-x86
In-Reply-To: <20230116140448.116034-1-sashal@kernel.org>

From: Michael Klein <m.klein@mvz-labor-lb.de>

[ Upstream commit 36c2b9d6710427f802494ba070621cb415198293 ]

Add touchscreen info for the CSL Panther Tab HD.

Signed-off-by: Michael Klein <m.klein@mvz-labor-lb.de>
Link: https://lore.kernel.org/r/20221220121103.uiwn5l7fii2iggct@LLGMVZLB-0037
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index 110ff1e6ef81..bc26acace2c3 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -255,6 +255,23 @@ static const struct ts_dmi_data connect_tablet9_data = {
 	.properties     = connect_tablet9_props,
 };
 
+static const struct property_entry csl_panther_tab_hd_props[] = {
+	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
+	PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
+	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
+	PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
+	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
+	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-csl-panther-tab-hd.fw"),
+	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+	{ }
+};
+
+static const struct ts_dmi_data csl_panther_tab_hd_data = {
+	.acpi_name      = "MSSL1680:00",
+	.properties     = csl_panther_tab_hd_props,
+};
+
 static const struct property_entry cube_iwork8_air_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
@@ -1057,6 +1074,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
 		},
 	},
+	{
+		/* CSL Panther Tab HD */
+		.driver_data = (void *)&csl_panther_tab_hd_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "CSL Computer GmbH & Co. KG"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"),
+		},
+	},
 	{
 		/* CUBE iwork8 Air */
 		.driver_data = (void *)&cube_iwork8_air_data,
-- 
2.35.1


^ permalink raw reply related

* [PATCH AUTOSEL 5.15 21/24] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
From: Sasha Levin @ 2023-01-16 14:03 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Michael Klein, Hans de Goede, Sasha Levin, markgross, linux-input,
	platform-driver-x86
In-Reply-To: <20230116140359.115716-1-sashal@kernel.org>

From: Michael Klein <m.klein@mvz-labor-lb.de>

[ Upstream commit 36c2b9d6710427f802494ba070621cb415198293 ]

Add touchscreen info for the CSL Panther Tab HD.

Signed-off-by: Michael Klein <m.klein@mvz-labor-lb.de>
Link: https://lore.kernel.org/r/20221220121103.uiwn5l7fii2iggct@LLGMVZLB-0037
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index 3d0790263fa7..93671037fd59 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -255,6 +255,23 @@ static const struct ts_dmi_data connect_tablet9_data = {
 	.properties     = connect_tablet9_props,
 };
 
+static const struct property_entry csl_panther_tab_hd_props[] = {
+	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
+	PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
+	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
+	PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
+	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
+	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-csl-panther-tab-hd.fw"),
+	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+	{ }
+};
+
+static const struct ts_dmi_data csl_panther_tab_hd_data = {
+	.acpi_name      = "MSSL1680:00",
+	.properties     = csl_panther_tab_hd_props,
+};
+
 static const struct property_entry cube_iwork8_air_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
@@ -1100,6 +1117,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
 		},
 	},
+	{
+		/* CSL Panther Tab HD */
+		.driver_data = (void *)&csl_panther_tab_hd_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "CSL Computer GmbH & Co. KG"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"),
+		},
+	},
 	{
 		/* CUBE iwork8 Air */
 		.driver_data = (void *)&cube_iwork8_air_data,
-- 
2.35.1


^ permalink raw reply related

* [PATCH AUTOSEL 6.1 44/53] platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
From: Sasha Levin @ 2023-01-16 14:01 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Michael Klein, Hans de Goede, Sasha Levin, markgross, linux-input,
	platform-driver-x86
In-Reply-To: <20230116140154.114951-1-sashal@kernel.org>

From: Michael Klein <m.klein@mvz-labor-lb.de>

[ Upstream commit 36c2b9d6710427f802494ba070621cb415198293 ]

Add touchscreen info for the CSL Panther Tab HD.

Signed-off-by: Michael Klein <m.klein@mvz-labor-lb.de>
Link: https://lore.kernel.org/r/20221220121103.uiwn5l7fii2iggct@LLGMVZLB-0037
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c
index baae3120efd0..f00995390fdf 100644
--- a/drivers/platform/x86/touchscreen_dmi.c
+++ b/drivers/platform/x86/touchscreen_dmi.c
@@ -264,6 +264,23 @@ static const struct ts_dmi_data connect_tablet9_data = {
 	.properties     = connect_tablet9_props,
 };
 
+static const struct property_entry csl_panther_tab_hd_props[] = {
+	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
+	PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
+	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
+	PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
+	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
+	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
+	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-csl-panther-tab-hd.fw"),
+	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
+	{ }
+};
+
+static const struct ts_dmi_data csl_panther_tab_hd_data = {
+	.acpi_name      = "MSSL1680:00",
+	.properties     = csl_panther_tab_hd_props,
+};
+
 static const struct property_entry cube_iwork8_air_props[] = {
 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
@@ -1124,6 +1141,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
 		},
 	},
+	{
+		/* CSL Panther Tab HD */
+		.driver_data = (void *)&csl_panther_tab_hd_data,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "CSL Computer GmbH & Co. KG"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"),
+		},
+	},
 	{
 		/* CUBE iwork8 Air */
 		.driver_data = (void *)&cube_iwork8_air_data,
-- 
2.35.1


^ permalink raw reply related

* [PATCH] HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support
From: Bastien Nocera @ 2023-01-16 13:09 UTC (permalink / raw)
  To: linux-input
  Cc: linux-kernel, Jiri Kosina, Benjamin Tissoires,
	Peter F . Patel-Schneider, Filipe Laíns, Nestor Lopez Casado

HID++ 1.0 devices only export whether Fast Scrolling is enabled, not
whether they are capable of it. Reinstate the original quirks for the 3
supported mice so fast scrolling works again on those devices.

Fixes: 908d325 ("HID: logitech-hidpp: Detect hi-res scrolling support")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216903
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
 drivers/hid/hid-logitech-hidpp.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index abf2c95e4d0b..fa026e9107c5 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -77,6 +77,7 @@ MODULE_PARM_DESC(disable_tap_to_click,
 #define HIDPP_QUIRK_HIDPP_WHEELS		BIT(26)
 #define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS	BIT(27)
 #define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS	BIT(28)
+#define HIDPP_QUIRK_HI_RES_SCROLL_1P0		BIT(29)
 
 /* These are just aliases for now */
 #define HIDPP_QUIRK_KBD_SCROLL_WHEEL HIDPP_QUIRK_HIDPP_WHEELS
@@ -3472,14 +3473,8 @@ static int hidpp_initialize_hires_scroll(struct hidpp_device *hidpp)
 			hid_dbg(hidpp->hid_dev, "Detected HID++ 2.0 hi-res scrolling\n");
 		}
 	} else {
-		struct hidpp_report response;
-
-		ret = hidpp_send_rap_command_sync(hidpp,
-						  REPORT_ID_HIDPP_SHORT,
-						  HIDPP_GET_REGISTER,
-						  HIDPP_ENABLE_FAST_SCROLL,
-						  NULL, 0, &response);
-		if (!ret) {
+		/* We cannot detect fast scrolling support on HID++ 1.0 devices */
+		if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) {
 			hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP10_FAST_SCROLL;
 			hid_dbg(hidpp->hid_dev, "Detected HID++ 1.0 fast scroll\n");
 		}
@@ -4296,9 +4291,15 @@ static const struct hid_device_id hidpp_devices[] = {
 	  HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
 		USB_DEVICE_ID_LOGITECH_T651),
 	  .driver_data = HIDPP_QUIRK_CLASS_WTP },
+	{ /* Mouse Logitech Anywhere MX */
+	  LDJ_DEVICE(0x1017), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
 	{ /* Mouse logitech M560 */
 	  LDJ_DEVICE(0x402d),
 	  .driver_data = HIDPP_QUIRK_DELAYED_INIT | HIDPP_QUIRK_CLASS_M560 },
+	{ /* Mouse Logitech M705 (firmware RQM17) */
+	  LDJ_DEVICE(0x101b), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
+	{ /* Mouse Logitech Performance MX */
+	  LDJ_DEVICE(0x101a), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
 	{ /* Keyboard logitech K400 */
 	  LDJ_DEVICE(0x4024),
 	  .driver_data = HIDPP_QUIRK_CLASS_K400 },
-- 
2.39.0


^ permalink raw reply related

* Re: (subset) [PATCH v3 0/9] fix reset line polarity for Goodix touchscreen controllers
From: Quentin Schulz @ 2023-01-16 12:37 UTC (permalink / raw)
  To: Bjorn Andersson, samuel, agx, megous, heiko, hdegoede, robh+dt,
	wens, michael.riesch, lukma, icenowy, kernel, david, shawnguo,
	foss+kernel, linux-imx, festevam, pgwipeout, jagan, agross,
	hadess, dmitry.torokhov, jernej.skrabec,
	angelogioacchino.delregno, mamlinav, frieder.schrempf, angus,
	Sascha Hauer, konrad.dybcio, krzysztof.kozlowski+dt
  Cc: linux-kernel, devicetree, linux-input, linux-arm-kernel,
	linux-sunxi, linux-arm-msm, linux-rockchip
In-Reply-To: <167336743963.2134489.16668389773212954467.b4-ty@kernel.org>

Hi Bjorn, all,

On 1/10/23 17:17, Bjorn Andersson wrote:
> On Mon, 5 Dec 2022 14:40:29 +0100, Quentin Schulz wrote:
>> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>
>> The Goodix touchscreen controller has a reset line active low. It happens to
>> also be used to configure its i2c address at runtime. If the reset line is
>> incorrectly asserted, the address will be wrongly configured. This cost me a few
>> hours, trying to figure out why the touchscreen wouldn't work.
>>
>> [...]
> 
> Applied, thanks!
> 
> [8/9] arm64: dts: qcom: msm8998-fxtec: fix touchscreen reset GPIO polarity
>        commit: 8a0721dae68fdb4534e220fc9faae7a0ef2f3785
> 

Thank you for the merge, however I think there could be some issue here.

This requires the patches 1, 2 and 3 all modifying the input driver in 
order to not introduce a regression.

I mistakenly removed the RFC tag and seemingly didn't make it clear 
enough that I had some question on how to properly merge this patch 
series, c.f. "Do we also make this patch series only one patchset since 
the DT patches depend
on the driver patch and vice-versa? In which tree would this go?" in the 
cover letter.

So please, how do we go on with the rest of the patch series? Should I 
submit a v4 which would be only one patch with DT and input changes all 
at once and Bjorn reverts the patch they had just merged?

@Dmitry, since you would have to merge at least patches 1 to 3 in your 
tree (I assume), would you be willing to take the DT patches at the same 
time through your tree too? Are the appropriate device DT maintainers OK 
with this?

Cheers,
Quentin

^ permalink raw reply

* [PATCH 2/2] HID: check empty report_list in bigben_probe()
From: Pietro Borrello @ 2023-01-16 11:11 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Kees Cook, Hanno Zulla
  Cc: Cristiano Giuffrida, Bos, H.J., Jakob Koschel, Jiri Kosina,
	linux-input, linux-kernel, Pietro Borrello
In-Reply-To: <20230114-hid-fix-emmpty-report-list-v1-0-e4d02fad3ba5@diag.uniroma1.it>

Add a check for empty report_list in bigben_probe().
The missing check causes a type confusion when issuing a list_entry()
on an empty report_list.
The problem is caused by the assumption that the device must
have valid report_list. While this will be true for all normal HID
devices, a suitably malicious device can violate the assumption.

Fixes: 256a90ed9e46 ("HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad")
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
---
 drivers/hid/hid-bigbenff.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hid/hid-bigbenff.c b/drivers/hid/hid-bigbenff.c
index e8c5e3ac9fff..e8b16665860d 100644
--- a/drivers/hid/hid-bigbenff.c
+++ b/drivers/hid/hid-bigbenff.c
@@ -344,6 +344,11 @@ static int bigben_probe(struct hid_device *hid,
 	}
 
 	report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list;
+	if (list_empty(report_list)) {
+		hid_err(hid, "no output report found\n");
+		error = -ENODEV;
+		goto error_hw_stop;
+	}
 	bigben->report = list_entry(report_list->next,
 		struct hid_report, list);
 

-- 
2.25.1

^ permalink raw reply related

* [PATCH 1/2] HID: check empty report_list in hid_validate_values()
From: Pietro Borrello @ 2023-01-16 11:11 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Kees Cook, Hanno Zulla
  Cc: Cristiano Giuffrida, Bos, H.J., Jakob Koschel, Jiri Kosina,
	linux-input, linux-kernel, Pietro Borrello
In-Reply-To: <20230114-hid-fix-emmpty-report-list-v1-0-e4d02fad3ba5@diag.uniroma1.it>

Add a check for empty report_list in hid_validate_values().
The missing check causes a type confusion when issuing a list_entry()
on an empty report_list.
The problem is caused by the assumption that the device must
have valid report_list. While this will be true for all normal HID
devices, a suitably malicious device can violate the assumption.

Fixes: 1b15d2e5b807 ("HID: core: fix validation of report id 0")
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
---
 drivers/hid/hid-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index bd47628da6be..3e1803592bd4 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -993,8 +993,8 @@ struct hid_report *hid_validate_values(struct hid_device *hid,
 		 * Validating on id 0 means we should examine the first
 		 * report in the list.
 		 */
-		report = list_entry(
-				hid->report_enum[type].report_list.next,
+		report = list_first_entry_or_null(
+				&hid->report_enum[type].report_list,
 				struct hid_report, list);
 	} else {
 		report = hid->report_enum[type].report_id_hash[id];

-- 
2.25.1

^ permalink raw reply related

* [PATCH 0/2] Cover Letter: HID: drop assumptions on non-empty report lists
From: Pietro Borrello @ 2023-01-16 11:11 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Kees Cook, Hanno Zulla
  Cc: Cristiano Giuffrida, Bos, H.J., Jakob Koschel, Jiri Kosina,
	linux-input, linux-kernel, Pietro Borrello

We found potential misuses of list_entry() on lists in hid driver
code that are not checked.
Issuing a list_entry() on an empty list causes a type confusion making
the list_entry point to the list_head itself.
The most impactful seems the missing check for an empty list in
hid_validate_values() which is supposed to check the validity of the
reports themselves, potentially affecting all the drivers that rely on it.

The problem is caused by the driver's assumption that the device must
have valid report_list. While this will be true for all normal HID
devices, a suitably malicious device can violate the assumption.

This patch fixes the issue by checking that the lists are nonempty
before allowing them to be used.

At a first glance it may seem that the patches have security implications.
However, when plugging a device which provides a descriptor with no output
report, the type confusions will create a fake struct hid_report*
which points to ((struct hid_device *)hid).report_enum[type].report_list.
This, by chance, makes the type confused structure to span
the `struct hid_report* report_id_hash[256]` array in the
((struct hid_device *)hid).report_enum[type] field.

Then, due to their semantics hid_validate_values() will check
(report->maxfield > field_index) on the type-confused report,
and the maxfield field happens to overlap on the
report_id_hash[] array in the report_enum[type] field
which are all NULL since we provided no reports.
Similarly, for bigben_probe(), the confused report entry is
used in the bigben_worker() function which checks
(report->field[0] != NULL) that, again, overlaps with a NULL
pointer.
It seems there is a commit (918aa1ef104d: "HID: bigbenff: prevent
null pointer dereference") which added the check for report_field
being NULL to bigben_worker() to prevent crashing, but without
checking the actual root cause.

Thus, while being type confusions bugs, they are not exploitable.
I still believe list checks should be added, and the patches on
hid_validate_values() and bigben_probe() merged,
to prevent future exploitability if the shape of the structure changes,
and they do not overlap anymore with NULL pointers.
In this case, it is not exploitable just by the pure chance of struct
member ordering.

To: Jiri Kosina <jikos@kernel.org>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Kees Cook <keescook@chromium.org>
To: Hanno Zulla <abos@hanno.de>
Cc: Cristiano Giuffrida <c.giuffrida@vu.nl>
Cc: "Bos, H.J." <h.j.bos@vu.nl>
Cc: Jakob Koschel <jkl820.git@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>

---
Pietro Borrello (2):
      HID: check empty report_list in hid_validate_values()
      HID: check empty report_list in bigben_probe()

 drivers/hid/hid-bigbenff.c | 5 +++++
 drivers/hid/hid-core.c     | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
base-commit: 5dc4c995db9eb45f6373a956eb1f69460e69e6d4
change-id: 20230114-hid-fix-emmpty-report-list-0d9ab58b234d

Best regards,
-- 
Pietro Borrello <borrello@diag.uniroma1.it>

^ permalink raw reply

* Re: remove arch/sh
From: John Paul Adrian Glaubitz @ 2023-01-16  8:52 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Yoshinori Sato, Rich Felker, Arnd Bergmann, Greg Kroah-Hartman,
	Laurent Pinchart, Kieran Bingham, Geert Uytterhoeven,
	linux-kernel, linux-watchdog, devicetree, linux-arch, dmaengine,
	dri-devel, linux-renesas-soc, linux-i2c, linux-input, linux-media,
	linux-mmc, linux-mtd, netdev, linux-gpio, linux-rtc, linux-spi,
	linux-serial, linux-usb, linux-fbdev, alsa-devel, linux-sh
In-Reply-To: <20230116071306.GA15848@lst.de>

Hello Christoph!

On 1/16/23 08:13, Christoph Hellwig wrote:
> On Fri, Jan 13, 2023 at 09:09:52AM +0100, John Paul Adrian Glaubitz wrote:
>> I'm still maintaining and using this port in Debian.
>>
>> It's a bit disappointing that people keep hammering on it. It works fine for me.
> 
> What platforms do you (or your users) use it on?

We have had a discussion between multiple people invested in the SuperH port and
I have decided to volunteer as a co-maintainer of the port to support Rich Felker
when he isn't available.

Adrian

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply

* Re: remove arch/sh
From: Christoph Hellwig @ 2023-01-16  7:14 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: John Paul Adrian Glaubitz, Christoph Hellwig, Yoshinori Sato,
	Rich Felker, Arnd Bergmann, Greg Kroah-Hartman, Laurent Pinchart,
	Kieran Bingham, Geert Uytterhoeven, linux-kernel, linux-watchdog,
	devicetree, linux-arch, dmaengine, dri-devel, linux-renesas-soc,
	linux-i2c, linux-input, linux-media, linux-mmc, linux-mtd, netdev,
	linux-gpio, linux-rtc, linux-spi, linux-serial, linux-usb,
	linux-fbdev, alsa-devel, linux-sh
In-Reply-To: <CAMuHMdUcnP6a9Ch5=_CMPq-io-YWK5pshkOT2nZmP1hvNcwBAg@mail.gmail.com>

On Fri, Jan 13, 2023 at 09:26:23AM +0100, Geert Uytterhoeven wrote:
> Indeed.  The main issue is not the lack of people sending patches and
> fixes, but those patches never being applied by the maintainers.
> Perhaps someone is willing to stand up to take over maintainership?

The other problem is that it hasn't a DT conversion, and there are
lot of crufty platforms, and crufty hooks in various drivers and
core code.

It's been mentioned a few times that it might be time to go to a minimal
DT only port and then regrow what people are actually using, but for
that we need indiciations of what people are actually using.

And yes, it does need a proper maintainer, and some actual maintainer
option like cutting down unused machine support.

^ permalink raw reply

* Re: remove arch/sh
From: Christoph Hellwig @ 2023-01-16  7:13 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Christoph Hellwig, Yoshinori Sato, Rich Felker, Arnd Bergmann,
	Greg Kroah-Hartman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, linux-kernel, linux-watchdog, devicetree,
	linux-arch, dmaengine, dri-devel, linux-renesas-soc, linux-i2c,
	linux-input, linux-media, linux-mmc, linux-mtd, netdev,
	linux-gpio, linux-rtc, linux-spi, linux-serial, linux-usb,
	linux-fbdev, alsa-devel, linux-sh
In-Reply-To: <11e2e0a8-eabe-2d8c-d612-9cdd4bcc3648@physik.fu-berlin.de>

On Fri, Jan 13, 2023 at 09:09:52AM +0100, John Paul Adrian Glaubitz wrote:
> I'm still maintaining and using this port in Debian.
>
> It's a bit disappointing that people keep hammering on it. It works fine for me.

What platforms do you (or your users) use it on?

^ permalink raw reply

* Re: [PATCH HID for-next v2 9/9] HID: bpf: reorder BPF registration
From: Alexei Starovoitov @ 2023-01-15 18:00 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Greg KH, Jiri Kosina, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Dmitry Torokhov, Tero Kristo, linux-kernel,
	linux-input, netdev, bpf, linux-kselftest
In-Reply-To: <20230113090935.1763477-10-benjamin.tissoires@redhat.com>

On Fri, Jan 13, 2023 at 10:09:35AM +0100, Benjamin Tissoires wrote:
> Given that our initial BPF program is not using any kfuncs anymore,
> we can reorder the initialization to first try to load it and then
> register the kfuncs. This has the advantage of not exporting kfuncs
> when HID-BPF is not working.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Acked-by: Alexei Starovoitov <ast@kernel.org>

^ permalink raw reply

* Re: [PATCH HID for-next v2 8/9] HID: bpf: clean up entrypoint
From: Alexei Starovoitov @ 2023-01-15 18:00 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Greg KH, Jiri Kosina, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Dmitry Torokhov, Tero Kristo, linux-kernel,
	linux-input, netdev, bpf, linux-kselftest
In-Reply-To: <20230113090935.1763477-9-benjamin.tissoires@redhat.com>

On Fri, Jan 13, 2023 at 10:09:34AM +0100, Benjamin Tissoires wrote:
> We don't need to watch for calls on bpf_prog_put_deferred(), so remove
> that from the entrypoints.bpf.c file.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Acked-by: Alexei Starovoitov <ast@kernel.org>

^ permalink raw reply

* Re: [PATCH HID for-next v2 6/9] HID: bpf: rework how programs are attached and stored in the kernel
From: Alexei Starovoitov @ 2023-01-15 17:59 UTC (permalink / raw)
  To: Benjamin Tissoires
  Cc: Greg KH, Jiri Kosina, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Dmitry Torokhov, Tero Kristo, linux-kernel,
	linux-input, netdev, bpf, linux-kselftest
In-Reply-To: <20230113090935.1763477-7-benjamin.tissoires@redhat.com>

On Fri, Jan 13, 2023 at 10:09:32AM +0100, Benjamin Tissoires wrote:
> Previously, HID-BPF was relying on a bpf tracing program to be notified
> when a program was released from userspace. This is error prone, as
> LLVM sometimes inline the function and sometimes not.
> 
> So instead of messing up with the bpf prog ref count, we can use the
> bpf_link concept which actually matches exactly what we want:
> - a bpf_link represents the fact that a given program is attached to a
>   given HID device
> - as long as the bpf_link has fd opened (either by the userspace program
>   still being around or by pinning the bpf object in the bpffs), the
>   program stays attached to the HID device
> - once every user has closed the fd, we get called by
>   hid_bpf_link_release() that we no longer have any users, and we can
>   disconnect the program to the device in 2 passes: first atomically clear
>   the bit saying that the link is active, and then calling release_work in
>   a scheduled work item.
> 
> This solves entirely the problems of BPF tracing not showing up and is
> definitely cleaner.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Acked-by: Alexei Starovoitov <ast@kernel.org>

^ permalink raw reply

* Re: [PATCH 2/2] Docs: Add some missing SPDX license identifiers of subsystem docs
From: Alex Deucher @ 2023-01-15 15:35 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Jonathan Corbet, linux-hwmon, alsa-devel, Herbert Xu, linux-doc,
	linux-kernel, dri-devel, Dmitry Torokhov, Takashi Iwai,
	Jaroslav Kysela, Jean Delvare, linux-crypto, Thomas Zimmermann,
	linux-input, David S. Miller, Guenter Roeck
In-Reply-To: <20230114194741.115855-2-sj@kernel.org>

On Sat, Jan 14, 2023 at 2:48 PM SeongJae Park <sj@kernel.org> wrote:
>
> Some subsystem documents are missing SPDX license identifiers.  Add
> those.

It would be good to split this up per subsystem.

>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
>  Documentation/crypto/index.rst     | 2 ++
>  Documentation/driver-api/index.rst | 2 ++
>  Documentation/gpu/index.rst        | 2 ++
>  Documentation/hwmon/index.rst      | 2 ++
>  Documentation/input/index.rst      | 2 ++
>  Documentation/mm/index.rst         | 2 ++
>  Documentation/scheduler/index.rst  | 2 ++
>  Documentation/sound/index.rst      | 2 ++
>  8 files changed, 16 insertions(+)
>
> diff --git a/Documentation/crypto/index.rst b/Documentation/crypto/index.rst
> index da5d5ad2bdf3..95b0870e09b8 100644
> --- a/Documentation/crypto/index.rst
> +++ b/Documentation/crypto/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  ==========
>  Crypto API
>  ==========
> diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
> index b208e0dac3a0..7a2584ab63c4 100644
> --- a/Documentation/driver-api/index.rst
> +++ b/Documentation/driver-api/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  ==============================
>  Driver implementer's API guide
>  ==============================
> diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst
> index eee5996acf2c..ff06a6b12c5e 100644
> --- a/Documentation/gpu/index.rst
> +++ b/Documentation/gpu/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0

Most of the DRM code is MIT.  I'd expect this would be MIT as well.

Alex

> +
>  ============================
>  GPU Driver Developer's Guide
>  ============================
> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
> index c2b3c1a822dd..2186d732654f 100644
> --- a/Documentation/hwmon/index.rst
> +++ b/Documentation/hwmon/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  ===================
>  Hardware Monitoring
>  ===================
> diff --git a/Documentation/input/index.rst b/Documentation/input/index.rst
> index 35581cd18e91..d60bf9cfe005 100644
> --- a/Documentation/input/index.rst
> +++ b/Documentation/input/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  ===================
>  Input Documentation
>  ===================
> diff --git a/Documentation/mm/index.rst b/Documentation/mm/index.rst
> index 5a94a921ea40..c4e9fbacaf38 100644
> --- a/Documentation/mm/index.rst
> +++ b/Documentation/mm/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  ===============================
>  Memory Management Documentation
>  ===============================
> diff --git a/Documentation/scheduler/index.rst b/Documentation/scheduler/index.rst
> index 1aac972a652f..ae0229f5a9cf 100644
> --- a/Documentation/scheduler/index.rst
> +++ b/Documentation/scheduler/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  =========
>  Scheduler
>  =========
> diff --git a/Documentation/sound/index.rst b/Documentation/sound/index.rst
> index 5abed5fc6485..7e67e12730d3 100644
> --- a/Documentation/sound/index.rst
> +++ b/Documentation/sound/index.rst
> @@ -1,3 +1,5 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
>  =============================
>  Sound Subsystem Documentation
>  =============================
> --
> 2.25.1
>

^ permalink raw reply

* [Bug 216933] New: brightness keys not working on Lenovo ideapad 3
From: bugzilla-daemon @ 2023-01-15 14:19 UTC (permalink / raw)
  To: bp

https://bugzilla.kernel.org/show_bug.cgi?id=216933

            Bug ID: 216933
           Summary: brightness keys not working on Lenovo ideapad 3
           Product: Platform Specific/Hardware
           Version: 2.5
    Kernel Version: 6.1.5
          Hardware: Intel
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: x86-64
          Assignee: platform_x86_64@kernel-bugs.osdl.org
          Reporter: tuxuser@quantentunnel.de
        Regression: No

System: Lenovo ideapad 3
OS: openSUSE Leap 15.4, all updates installed
Kernel: 6.1.5, 5.14.21-150400.38-default

Brightness keys are not working. When pressing these in kde plasma no
brightness increase / decrease indicator is shown.
The brightness system itself is working: When changing the brightness using the
plasma battery applet, the brightness changes as expected.

Changing to runlevel 3 showkey and evtest don't respond to pressing these keys.
They only respond to other keys.
evtest displays
/dev/input/event1 is Video Bus
Here it displays Event code 224 for KEY_BRIGHTNESSDOWN and Event code 225 for
KEY_BRIGHTNESSUP. But pressing the buttons leads to no response.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply

* Re: [PATCH 02/22] usb: remove the dead USB_OHCI_SH option
From: Rob Landley @ 2023-01-15  0:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Christoph Hellwig
  Cc: Yoshinori Sato, Rich Felker, Arnd Bergmann, Laurent Pinchart,
	Kieran Bingham, Geert Uytterhoeven, linux-kernel, linux-watchdog,
	devicetree, linux-arch, dmaengine, dri-devel, linux-renesas-soc,
	linux-i2c, linux-input, linux-media, linux-mmc, linux-mtd, netdev,
	linux-gpio, linux-rtc, linux-spi, linux-serial, linux-usb,
	linux-fbdev, alsa-devel, linux-sh
In-Reply-To: <Y8EEbCP6PRMzWP5y@kroah.com>



On 1/13/23 01:12, Greg Kroah-Hartman wrote:
> On Fri, Jan 13, 2023 at 07:23:19AM +0100, Christoph Hellwig wrote:
>> USB_OHCI_SH is a dummy option that never builds any code, remove it.
>> 
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>> ---
>>  drivers/usb/host/Kconfig | 11 -----------
>>  1 file changed, 11 deletions(-)
>> 
>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
>> index 8d799d23c476e1..ca5f657c092cf4 100644
>> --- a/drivers/usb/host/Kconfig
>> +++ b/drivers/usb/host/Kconfig
>> @@ -548,17 +548,6 @@ config USB_OHCI_HCD_SSB
>>  
>>  	  If unsure, say N.
>>  
>> -config USB_OHCI_SH
>> -	bool "OHCI support for SuperH USB controller (DEPRECATED)"
>> -	depends on SUPERH || COMPILE_TEST
>> -	select USB_OHCI_HCD_PLATFORM
>> -	help
>> -	  This option is deprecated now and the driver was removed, use
>> -	  USB_OHCI_HCD_PLATFORM instead.
>> -
>> -	  Enables support for the on-chip OHCI controller on the SuperH.
>> -	  If you use the PCI OHCI controller, this option is not necessary.
>> -
>>  config USB_OHCI_EXYNOS
>>  	tristate "OHCI support for Samsung S5P/Exynos SoC Series"
>>  	depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
>> -- 
>> 2.39.0
>> 
> 
> Do you want all of these to go through a single tree, or can they go
> through the different driver subsystem trees?

Neither please. Multiple people are objecting.

Rob

^ permalink raw reply

* [PATCH 2/2] Docs: Add some missing SPDX license identifiers of subsystem docs
From: SeongJae Park @ 2023-01-14 19:47 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: SeongJae Park, Herbert Xu, David S. Miller, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	Jean Delvare, Guenter Roeck, Dmitry Torokhov, Jaroslav Kysela,
	Takashi Iwai, linux-crypto, linux-doc, linux-kernel, dri-devel,
	linux-hwmon, linux-input, alsa-devel
In-Reply-To: <20230114194741.115855-1-sj@kernel.org>

Some subsystem documents are missing SPDX license identifiers.  Add
those.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 Documentation/crypto/index.rst     | 2 ++
 Documentation/driver-api/index.rst | 2 ++
 Documentation/gpu/index.rst        | 2 ++
 Documentation/hwmon/index.rst      | 2 ++
 Documentation/input/index.rst      | 2 ++
 Documentation/mm/index.rst         | 2 ++
 Documentation/scheduler/index.rst  | 2 ++
 Documentation/sound/index.rst      | 2 ++
 8 files changed, 16 insertions(+)

diff --git a/Documentation/crypto/index.rst b/Documentation/crypto/index.rst
index da5d5ad2bdf3..95b0870e09b8 100644
--- a/Documentation/crypto/index.rst
+++ b/Documentation/crypto/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ==========
 Crypto API
 ==========
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index b208e0dac3a0..7a2584ab63c4 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ==============================
 Driver implementer's API guide
 ==============================
diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst
index eee5996acf2c..ff06a6b12c5e 100644
--- a/Documentation/gpu/index.rst
+++ b/Documentation/gpu/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ============================
 GPU Driver Developer's Guide
 ============================
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index c2b3c1a822dd..2186d732654f 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ===================
 Hardware Monitoring
 ===================
diff --git a/Documentation/input/index.rst b/Documentation/input/index.rst
index 35581cd18e91..d60bf9cfe005 100644
--- a/Documentation/input/index.rst
+++ b/Documentation/input/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ===================
 Input Documentation
 ===================
diff --git a/Documentation/mm/index.rst b/Documentation/mm/index.rst
index 5a94a921ea40..c4e9fbacaf38 100644
--- a/Documentation/mm/index.rst
+++ b/Documentation/mm/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ===============================
 Memory Management Documentation
 ===============================
diff --git a/Documentation/scheduler/index.rst b/Documentation/scheduler/index.rst
index 1aac972a652f..ae0229f5a9cf 100644
--- a/Documentation/scheduler/index.rst
+++ b/Documentation/scheduler/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 =========
 Scheduler
 =========
diff --git a/Documentation/sound/index.rst b/Documentation/sound/index.rst
index 5abed5fc6485..7e67e12730d3 100644
--- a/Documentation/sound/index.rst
+++ b/Documentation/sound/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 =============================
 Sound Subsystem Documentation
 =============================
-- 
2.25.1


^ permalink raw reply related

* [PATCH 1/2] Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents
From: SeongJae Park @ 2023-01-14 19:47 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: SeongJae Park, Bjorn Helgaas, Rafael J. Wysocki, Viresh Kumar,
	Herbert Xu, David S. Miller, David Airlie, Daniel Vetter,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Jean Delvare,
	Guenter Roeck, Dmitry Torokhov, Iwona Winiarska, Jaroslav Kysela,
	Takashi Iwai, Wim Van Sebroeck, linux-pci, linux-doc,
	linux-kernel, linux-pm, linux-crypto, dri-devel, linux-hwmon,
	linux-input, openbmc, alsa-devel, linux-watchdog

Some documents that listed on subsystem-apis have 'Linux' or 'The Linux'
title prefixes.  It's duplicated information, and makes finding the
document of interest with human eyes not easy.  Remove the prefixes from
the titles.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 Documentation/PCI/index.rst        | 6 +++---
 Documentation/cpu-freq/index.rst   | 6 +++---
 Documentation/crypto/index.rst     | 6 +++---
 Documentation/driver-api/index.rst | 6 +++---
 Documentation/gpu/index.rst        | 6 +++---
 Documentation/hwmon/index.rst      | 6 +++---
 Documentation/input/index.rst      | 6 +++---
 Documentation/mm/index.rst         | 6 +++---
 Documentation/peci/index.rst       | 6 +++---
 Documentation/scheduler/index.rst  | 6 +++---
 Documentation/scsi/index.rst       | 6 +++---
 Documentation/sound/index.rst      | 6 +++---
 Documentation/virt/index.rst       | 6 +++---
 Documentation/watchdog/index.rst   | 6 +++---
 14 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/Documentation/PCI/index.rst b/Documentation/PCI/index.rst
index c17c87af1968..e73f84aebde3 100644
--- a/Documentation/PCI/index.rst
+++ b/Documentation/PCI/index.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0
 
-=======================
-Linux PCI Bus Subsystem
-=======================
+=================
+PCI Bus Subsystem
+=================
 
 .. toctree::
    :maxdepth: 2
diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst
index 2fe32dad562a..de25740651f7 100644
--- a/Documentation/cpu-freq/index.rst
+++ b/Documentation/cpu-freq/index.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0
 
-==============================================================================
-Linux CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel
-==============================================================================
+========================================================================
+CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel
+========================================================================
 
 Author: Dominik Brodowski  <linux@brodo.de>
 
diff --git a/Documentation/crypto/index.rst b/Documentation/crypto/index.rst
index 21338fa92642..da5d5ad2bdf3 100644
--- a/Documentation/crypto/index.rst
+++ b/Documentation/crypto/index.rst
@@ -1,6 +1,6 @@
-=======================
-Linux Kernel Crypto API
-=======================
+==========
+Crypto API
+==========
 
 :Author: Stephan Mueller
 :Author: Marek Vasut
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index d3a58f77328e..b208e0dac3a0 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -1,6 +1,6 @@
-========================================
-The Linux driver implementer's API guide
-========================================
+==============================
+Driver implementer's API guide
+==============================
 
 The kernel offers a wide variety of interfaces to support the development
 of device drivers.  This document is an only somewhat organized collection
diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst
index b99dede9a5b1..eee5996acf2c 100644
--- a/Documentation/gpu/index.rst
+++ b/Documentation/gpu/index.rst
@@ -1,6 +1,6 @@
-==================================
-Linux GPU Driver Developer's Guide
-==================================
+============================
+GPU Driver Developer's Guide
+============================
 
 .. toctree::
 
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index fe2cc6b73634..c2b3c1a822dd 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -1,6 +1,6 @@
-=========================
-Linux Hardware Monitoring
-=========================
+===================
+Hardware Monitoring
+===================
 
 .. toctree::
    :maxdepth: 1
diff --git a/Documentation/input/index.rst b/Documentation/input/index.rst
index 9888f5cbf6d5..35581cd18e91 100644
--- a/Documentation/input/index.rst
+++ b/Documentation/input/index.rst
@@ -1,6 +1,6 @@
-=============================
-The Linux Input Documentation
-=============================
+===================
+Input Documentation
+===================
 
 Contents:
 
diff --git a/Documentation/mm/index.rst b/Documentation/mm/index.rst
index 4aa12b8be278..5a94a921ea40 100644
--- a/Documentation/mm/index.rst
+++ b/Documentation/mm/index.rst
@@ -1,6 +1,6 @@
-=====================================
-Linux Memory Management Documentation
-=====================================
+===============================
+Memory Management Documentation
+===============================
 
 Memory Management Guide
 =======================
diff --git a/Documentation/peci/index.rst b/Documentation/peci/index.rst
index 989de10416e7..930e75217c33 100644
--- a/Documentation/peci/index.rst
+++ b/Documentation/peci/index.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0-only
 
-====================
-Linux PECI Subsystem
-====================
+==============
+PECI Subsystem
+==============
 
 .. toctree::
 
diff --git a/Documentation/scheduler/index.rst b/Documentation/scheduler/index.rst
index b430d856056a..1aac972a652f 100644
--- a/Documentation/scheduler/index.rst
+++ b/Documentation/scheduler/index.rst
@@ -1,6 +1,6 @@
-===============
-Linux Scheduler
-===============
+=========
+Scheduler
+=========
 
 .. toctree::
     :maxdepth: 1
diff --git a/Documentation/scsi/index.rst b/Documentation/scsi/index.rst
index 7c5f5f8f614e..919f3edfe1bf 100644
--- a/Documentation/scsi/index.rst
+++ b/Documentation/scsi/index.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0
 
-====================
-Linux SCSI Subsystem
-====================
+==============
+SCSI Subsystem
+==============
 
 .. toctree::
    :maxdepth: 1
diff --git a/Documentation/sound/index.rst b/Documentation/sound/index.rst
index 4d7d42acf6df..5abed5fc6485 100644
--- a/Documentation/sound/index.rst
+++ b/Documentation/sound/index.rst
@@ -1,6 +1,6 @@
-===================================
-Linux Sound Subsystem Documentation
-===================================
+=============================
+Sound Subsystem Documentation
+=============================
 
 .. toctree::
    :maxdepth: 2
diff --git a/Documentation/virt/index.rst b/Documentation/virt/index.rst
index 56e003ff28ff..7fb55ae08598 100644
--- a/Documentation/virt/index.rst
+++ b/Documentation/virt/index.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0
 
-============================
-Linux Virtualization Support
-============================
+======================
+Virtualization Support
+======================
 
 .. toctree::
    :maxdepth: 2
diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst
index c177645081d8..4603f2511f58 100644
--- a/Documentation/watchdog/index.rst
+++ b/Documentation/watchdog/index.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0
 
-======================
-Linux Watchdog Support
-======================
+================
+Watchdog Support
+================
 
 .. toctree::
     :maxdepth: 1
-- 
2.25.1


^ permalink raw reply related

* [PATCH 16/16] Input: wistron_btns -  use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards
From: Jonathan Cameron @ 2023-01-14 17:16 UTC (permalink / raw)
  To: linux-input, Dmitry Torokhov; +Cc: jic23, Jonathan Cameron
In-Reply-To: <20230114171620.42891-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP
would have been a tighter protection. As pm_sleep_ptr() lets the compiler
see the protected ops structure and callbacks but also lets the compiler
remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef
guards to be removed, slightly simplifying the resulting code.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
--
It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but
I'd prefer not to make that change unless someone can confirm that the
extra callbacks registered will have no unwanted side effects in this
driver.
---
 drivers/input/misc/wistron_btns.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index 80dfd72a02d3..111cb70cde46 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -1295,7 +1295,6 @@ static int wistron_remove(struct platform_device *dev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static int wistron_suspend(struct device *dev)
 {
 	if (have_wifi)
@@ -1330,14 +1329,11 @@ static const struct dev_pm_ops wistron_pm_ops = {
 	.poweroff	= wistron_suspend,
 	.restore	= wistron_resume,
 };
-#endif
 
 static struct platform_driver wistron_driver = {
 	.driver		= {
 		.name	= "wistron-bios",
-#ifdef CONFIG_PM
-		.pm	= &wistron_pm_ops,
-#endif
+		.pm	= pm_sleep_ptr(&wistron_pm_ops),
 	},
 	.probe		= wistron_probe,
 	.remove		= wistron_remove,
-- 
2.39.0


^ permalink raw reply related

* [PATCH 15/16] Input: cma3000 - use pm_sleep_ptr() to allow removal of ifdef CONFIG_PM guards
From: Jonathan Cameron @ 2023-01-14 17:16 UTC (permalink / raw)
  To: linux-input, Dmitry Torokhov; +Cc: jic23, Jonathan Cameron
In-Reply-To: <20230114171620.42891-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

As the guards only apply to suspend and resume, #ifdef CONFIG_PM_SLEEP
would have been a tighter protection. As pm_sleep_ptr() lets the compiler
see the protected ops structure and callbacks but also lets the compiler
remove it as unused code if !CONFIG_PM_SLEEP this allows the #ifdef
guards to be removed, slightly simplifying the resulting code.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

--
It seems likely that DEFINE_SIMPLE_DEV_PM_OPS() would work here but
I'd prefer not to make that change unless someone can confirm that the
extra callbacks registered will have no unwanted side effects in this
driver.
---
 drivers/input/misc/cma3000_d0x_i2c.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/input/misc/cma3000_d0x_i2c.c b/drivers/input/misc/cma3000_d0x_i2c.c
index 75442c1230b1..136eb3715870 100644
--- a/drivers/input/misc/cma3000_d0x_i2c.c
+++ b/drivers/input/misc/cma3000_d0x_i2c.c
@@ -64,7 +64,6 @@ static void cma3000_i2c_remove(struct i2c_client *client)
 	cma3000_exit(data);
 }
 
-#ifdef CONFIG_PM
 static int cma3000_i2c_suspend(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
@@ -89,7 +88,6 @@ static const struct dev_pm_ops cma3000_i2c_pm_ops = {
 	.suspend	= cma3000_i2c_suspend,
 	.resume		= cma3000_i2c_resume,
 };
-#endif
 
 static const struct i2c_device_id cma3000_i2c_id[] = {
 	{ "cma3000_d01", 0 },
@@ -104,9 +102,7 @@ static struct i2c_driver cma3000_i2c_driver = {
 	.id_table	= cma3000_i2c_id,
 	.driver = {
 		.name	= "cma3000_i2c_accl",
-#ifdef CONFIG_PM
-		.pm	= &cma3000_i2c_pm_ops,
-#endif
+		.pm	= pm_sleep_ptr(&cma3000_i2c_pm_ops),
 	},
 };
 
-- 
2.39.0


^ permalink raw reply related

* [PATCH 14/16] Input: Use pm_sleep_ptr() to avoid need for ifdef CONFIG_PM_SLEEP
From: Jonathan Cameron @ 2023-01-14 17:16 UTC (permalink / raw)
  To: linux-input, Dmitry Torokhov; +Cc: jic23, Jonathan Cameron
In-Reply-To: <20230114171620.42891-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

As the new pm_sleep_ptr() macro lets the compiler see the code, but
then remove it if !CONFIG_PM_SLEEP it can be used to avoid the need
for #ifdef guards.  Use that in the input core to simplify the code
a little.  Note pm_sleep_ptr() has not been applied to each callback
in the ops structure because the pm_sleep_ptr() at the usage site
is sufficient.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/input/input.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index ca2e3dd7188b..9fdb22db2ca4 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -19,6 +19,7 @@
 #include <linux/proc_fs.h>
 #include <linux/sched.h>
 #include <linux/seq_file.h>
+#include <linux/pm.h>
 #include <linux/poll.h>
 #include <linux/device.h>
 #include <linux/kstrtox.h>
@@ -1828,7 +1829,6 @@ static int input_uninhibit_device(struct input_dev *dev)
 	return ret;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int input_dev_suspend(struct device *dev)
 {
 	struct input_dev *input_dev = to_input_dev(dev);
@@ -1903,15 +1903,12 @@ static const struct dev_pm_ops input_dev_pm_ops = {
 	.poweroff	= input_dev_poweroff,
 	.restore	= input_dev_resume,
 };
-#endif /* CONFIG_PM */
 
 static const struct device_type input_dev_type = {
 	.groups		= input_dev_attr_groups,
 	.release	= input_dev_release,
 	.uevent		= input_dev_uevent,
-#ifdef CONFIG_PM_SLEEP
-	.pm		= &input_dev_pm_ops,
-#endif
+	.pm		= pm_sleep_ptr(&input_dev_pm_ops),
 };
 
 static char *input_devnode(const struct device *dev, umode_t *mode)
-- 
2.39.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