* [PATCH v4 7/8] arm64: dts: add description for solidrun solidsense-n8 board
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
Add description for the SolidRun SolidSense N8 Compact.
The board is designed around the i.MX8MN SoC and comes as a complete
product including enclosure and labels.
Features:
- USB-2.0 Type A connector
- 1Gbps RJ45 Ethernet with PoE
- microSD connector
- eMMC
- Cellular Modem + SIM holder
- WiFi + Bluetooth
- RS485
- CAN
- 802.15.1 radio
- supercapacitor backup power supply
This is a headless design without display.
The board includes an internal expansion connector for daughterboards
which may be described by dt addon.
The supercap is not currently described due to lack of suitable bindings.
Vendor BSP uses gpio-keys driver to trigger shutdown on power loss.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
arch/arm64/boot/dts/freescale/Makefile | 2 +
.../dts/freescale/imx8mn-solidsense-n8-compact.dts | 853 +++++++++++++++++++++
2 files changed, 855 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index d414d0efe5e74..c56137097da3b 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -181,6 +181,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mn-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-ddr3l-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-ddr4-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-rve-gateway.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mn-solidsense-n8-compact.dtb
+DTC_FLAGS_imx8mn-solidsense-n8-compact += -@
dtb-$(CONFIG_ARCH_MXC) += imx8mn-tqma8mqnl-mba8mx.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-var-som-symphony.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mn-venice-gw7902.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-solidsense-n8-compact.dts b/arch/arm64/boot/dts/freescale/imx8mn-solidsense-n8-compact.dts
new file mode 100644
index 0000000000000..93396e22ba409
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mn-solidsense-n8-compact.dts
@@ -0,0 +1,853 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Device Tree file for SolidSense N8 Compact
+ *
+ * Copyright 2024 Josua Mayer <josua@solid-run.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+
+#include "imx8mn.dtsi"
+
+/ {
+ model = "SolidRun SolidSense N8 Compact";
+ compatible = "solidrun,solidsense-n8-compact", "fsl,imx8mn";
+
+ aliases {
+ gpio5 = &expander;
+ rtc0 = &rtc;
+ rtc1 = &snvs_rtc;
+ usb0 = &usbotg1;
+ watchdog0 = &wdog1;
+ watchdog1 = &rtc;
+ };
+
+ chosen {
+ stdout-path = &uart2;
+ };
+
+ /* LED labels based on enclosure, schematic names differ. */
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins>;
+
+ /* D20 */
+ led1 {
+ label = "led1";
+ gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ /* D18 */
+ led2 {
+ label = "led2";
+ gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ /* D19 */
+ led3 {
+ label = "led3";
+ gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ memory@40000000 {
+ reg = <0x0 0x40000000 0 0x80000000>;
+ device_type = "memory";
+ };
+
+ reg_modem_vbat: regulator-modem-vbat {
+ compatible = "regulator-fixed";
+ regulator-name = "modem-vbat";
+ pinctrl-names = "default";
+ pinctrl-0 = <®ulator_modem_vbat_pins>;
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ gpio = <&gpio3 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ /* power to lte modems behind hub ports 2/3 */
+ reg_modem_vbus: regulator-modem-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "modem-vbus";
+ pinctrl-names = "default";
+ pinctrl-0 = <®ulator_modem_vbus_pins>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio5 4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ /* power to usb hub, and type-a behind hub port 1 */
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ pinctrl-names = "default";
+ pinctrl-0 = <®ulator_usb1_vbus_pins>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio5 5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ reg_vdd_1v8: regulator-vdd-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd-1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ reg_vdd_3v3: regulator-vdd-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
+ compatible = "regulator-fixed";
+ regulator-name = "usdhc2-vmmc";
+ pinctrl-names = "default";
+ pinctrl-0 = <®ulator_usdhc2_vmmc_pins>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <®_vdd_3v3>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ off-on-delay-us = <250>;
+ };
+
+ rfkill {
+ compatible = "rfkill-gpio";
+ label = "rfkill-wwan";
+ radio-type = "wwan";
+ pinctrl-names = "default";
+ pinctrl-0 = <&modem_pins>;
+ /* rfkill-gpio inverts internally */
+ shutdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ usdhc1_pwrseq: usdhc1-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&A53_0 {
+ cpu-supply = <&buck2_reg>;
+};
+
+&A53_1 {
+ cpu-supply = <&buck2_reg>;
+};
+
+&A53_2 {
+ cpu-supply = <&buck2_reg>;
+};
+
+&A53_3 {
+ cpu-supply = <&buck2_reg>;
+};
+
+&ddrc {
+ operating-points-v2 = <&ddrc_opp_table>;
+
+ ddrc_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-266500000 {
+ opp-hz = /bits/ 64 <266500000>;
+ };
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ };
+ };
+};
+
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ecspi2_pins>;
+ /* native chip-select causes reading 0xffffffff */
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ num-cs = <1>;
+ status = "okay";
+
+ can@0 {
+ compatible = "microchip,mcp2518fd";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&can_pins>;
+ interrupt-parent = <&gpio5>;
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+ clocks = <&clk IMX8MN_CLK_CLKOUT1>;
+ /* generate 8MHz clock from soc-internal 24mhz reference */
+ assigned-clocks = <&clk IMX8MN_CLK_CLKOUT1_SEL>,
+ <&clk IMX8MN_CLK_CLKOUT1_DIV>;
+ assigned-clock-rates = <0>, <8000000>;
+ assigned-clock-parents = <&clk IMX8MN_CLK_24M>, <0>;
+ };
+};
+
+&fec1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fec1_pins>;
+ phy-mode = "rgmii-id";
+ phy-handle = <&phy4>;
+ local-mac-address = [00 00 00 00 00 00];
+ fsl,magic-packet;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /*
+ * Depending on board revision two different phys are used:
+ * - v1.1: atheros phy at address 4
+ * - v1.2+: analog devices phy at address 0
+ * Configure first version by default.
+ * On v1.2 and later, U-Boot will enable the correct phy
+ * based on runtime detection and patch dtb accordingly.
+ */
+
+ /* ADIN1300 */
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10>;
+ reset-deassert-us = <5000>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ adi,link-st-polarity = <GPIO_ACTIVE_LOW>;
+ adi,led-polarity = <GPIO_ACTIVE_LOW>;
+ status = "disabled";
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_YELLOW>;
+ function = LED_FUNCTION_LAN;
+ default-state = "keep";
+ active-low;
+ };
+ };
+ };
+
+ /* AR8035 */
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10000>;
+ status = "okay";
+ };
+ };
+};
+
+&gpio5 {
+ usb-hub-reset-hog {
+ gpio-hog;
+ gpios = <3 GPIO_ACTIVE_LOW>;
+ output-low; /* deasserted */
+ line-name = "usb-hub-reset";
+ };
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+ status = "okay";
+
+ pmic@4b {
+ compatible = "rohm,bd71847";
+ reg = <0x4b>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+ rohm,reset-snvs-powered;
+
+ #clock-cells = <0>;
+ clocks = <&osc_32k>;
+ clock-output-names = "clk-32k-out";
+
+ regulators {
+ BUCK1 {
+ // supplies soc vdd, soc mipi vdd @ 0.9V
+ regulator-name = "buck1";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <1250>;
+ rohm,dvs-run-voltage = <850000>;
+ rohm,dvs-suspend-voltage = <750000>;
+ };
+
+ buck2_reg: BUCK2 {
+ regulator-name = "buck2";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-ramp-delay = <1250>;
+ rohm,dvs-run-voltage = <1000000>;
+ rohm,dvs-idle-voltage = <900000>;
+ rohm,dvs-suspend-voltage = <0>;
+ };
+
+ BUCK3 {
+ // BUCK5 in datasheet
+ // output floating
+ regulator-name = "buck3";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ BUCK4 {
+ // BUCK6 in datasheet
+ // supplies ldo3, ldo5, muxsw
+ regulator-name = "buck4";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ BUCK5 {
+ // BUCK7 in datasheet
+ // supplies ldo4, ldo6, muxsw
+ // enables dram vpp @ 2.5V
+ regulator-name = "buck5";
+ regulator-min-microvolt = <1605000>;
+ regulator-max-microvolt = <1995000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ BUCK6 {
+ // BUCK8 in datasheet
+ // supplies dram @ 1.2V
+ regulator-name = "buck6";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO1 {
+ // supplies soc snvs @ 1.8V
+ regulator-name = "ldo1";
+ regulator-min-microvolt = <1600000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO2 {
+ // supplies soc snvs @ 0.8V
+ regulator-name = "ldo2";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <900000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO3 {
+ // supplies soc vdd @ 1.8V
+ regulator-name = "ldo3";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ LDO4 {
+ // output floating
+ regulator-name = "ldo4";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ LDO5 {
+ // output floating
+ regulator-name = "ldo5";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ LDO6 {
+ // supplies soc vdd mipi @ 1.2V
+ regulator-name = "ldo6";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+};
+
+&i2c2 {
+ /*
+ * routed to various connectors:
+ * - basler camera (CON2)
+ * - touchscreen (J3)
+ * - expansion connector (J14)
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+ status = "okay";
+};
+
+&i2c3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins>;
+ status = "okay";
+
+ expander: gpio@20 {
+ compatible = "ti,tca6408";
+ reg = <0x20>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_expander_pins>;
+ reset-gpios = <&gpio3 16 GPIO_ACTIVE_LOW>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "SYSGD", "PFO#", "CAPGD", "CAPFLT#",
+ "CHGEN#", "BSTEN#", "", "";
+ };
+
+ light-sensor@44 {
+ compatible = "isil,isl29023";
+ reg = <0x44>;
+ };
+
+ accelerometer@53 {
+ compatible = "adi,adxl345";
+ reg = <0x53>;
+ };
+
+ /* battery-charger@68 */
+
+ rtc: rtc@69 {
+ compatible = "abracon,abx80x";
+ reg = <0x69>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtc_pins>;
+ abracon,tc-diode = "schottky";
+ abracon,tc-resistor = <3>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+ };
+};
+
+&i2c4 {
+ /* routed to expansion connector (J14) */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c4_pins>;
+ status = "okay";
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&tamper_pins>, <&usb_hub_pins>;
+
+ ieee802151_radio_pins: pinctrl-ieee802151-radio-grp {
+ fsl,pins = <
+ /* RESETN */
+ MX8MN_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x0
+ /* VDD_EN */
+ MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x0
+ /* SWDCLK */
+ MX8MN_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x0
+ /* SDIO */
+ MX8MN_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x0
+ >;
+ };
+
+ can_pins: pinctrl-can-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SAI3_TXD_GPIO5_IO1 0x140
+ >;
+ };
+
+ ecspi2_pins: pinctrl-ecspi2-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x96
+ MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x1d6
+ MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x1d6
+ MX8MN_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x1d6
+ >;
+ };
+
+ fec1_pins: pinctrl-fec1-grp {
+ /*
+ * Some pins are sampled at phy reset to apply configuration:
+ * - AR803x PHY (revision 1.1)
+ * - RXD[1:0]: phy address bits [1:0]
+ * - RXD[3:2],RX_CTL: mac interface select bits 3,1,0
+ * - ADIN1300 PHY (revision 1.2 or later)
+ * - RXD[3:0]: phy address bits [3:0]
+ * - RX_CTL,RXC: mac interface select bits 1,0
+ * SoC enables pull-down at reset, PHYs have internal
+ * pull-down, so pinmux may unset pull-enable.
+ */
+ fsl,pins = <
+ MX8MN_IOMUXC_ENET_MDC_ENET1_MDC 0x2
+ MX8MN_IOMUXC_ENET_MDIO_ENET1_MDIO 0x2
+ MX8MN_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1e
+ MX8MN_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1e
+ MX8MN_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1e
+ MX8MN_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1e
+ /* RD[3:0] sampled at phy reset for address bits [3:0] */
+ MX8MN_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x90
+ MX8MN_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x90
+ MX8MN_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x90
+ MX8MN_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x90
+ MX8MN_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x10
+ MX8MN_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x90
+ MX8MN_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x90
+ MX8MN_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x10
+ /* phy reset */
+ MX8MN_IOMUXC_SAI5_RXFS_GPIO3_IO19 0x0
+ /* phy interrupt */
+ MX8MN_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x140
+ >;
+ };
+
+ gpio_expander_pins: pinctrl-gpio-expander-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_NAND_READY_B_GPIO3_IO16 0x140
+ MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11 0x140
+ >;
+ };
+
+ i2c1_pins: pinctrl-i2c1-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c2
+ MX8MN_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c2
+ >;
+ };
+
+ i2c2_pins: pinctrl-i2c2-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c2
+ MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c2
+ >;
+ };
+
+ i2c3_pins: pinctrl-i2c3-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c2
+ MX8MN_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c2
+ >;
+ };
+
+ i2c4_pins: pinctrl-i2c4-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c2
+ MX8MN_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c2
+ >;
+ };
+
+ led_pins: pinctrl-led-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO11_GPIO1_IO11 0x100
+ MX8MN_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x100
+ MX8MN_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x100
+ >;
+ };
+
+ modem_pins: pinctrl-modem-grp {
+ fsl,pins = <
+ /* RESET_N: modem-internal pull-down */
+ MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x0
+ /* PWRKEY: pull-down ensures always-on */
+ MX8MN_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x100
+ >;
+ };
+
+ pmic_pins: pinctrl-pmic-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x140
+ >;
+ };
+
+ regulator_modem_vbat_pins: pinctrl-regulator-modem-vbat-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SAI5_MCLK_GPIO3_IO25 0x0
+ >;
+ };
+
+ regulator_modem_vbus_pins: pinctrl-regulator-modem-vbus-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SPDIF_RX_GPIO5_IO4 0x0
+ >;
+ };
+
+ regulator_usb1_vbus_pins: pinctrl-regulator-usb1-vbus-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x0
+ >;
+ };
+
+ regulator_usdhc2_vmmc_pins: pinctrl-regulator-usdhc2-vmmc-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x0
+ >;
+ };
+
+ rtc_pins: pinctrl-rtc-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x140
+ MX8MN_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x100
+ >;
+ };
+
+ tamper_pins: pinctrl-tamper-grp {
+ /*
+ * Routed to physical tamper input (J12),
+ * accelerometer and light-sensor interrupts.
+ */
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x140
+ >;
+ };
+
+ uart1_pins: pinctrl-uart1-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
+ MX8MN_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
+ MX8MN_IOMUXC_UART3_RXD_UART1_DCE_CTS_B 0x140
+ MX8MN_IOMUXC_UART3_TXD_UART1_DCE_RTS_B 0x140
+ /* BT_REG_ON */
+ MX8MN_IOMUXC_SD1_DATA4_GPIO2_IO6 0x0
+ /* BT_WAKE_DEV */
+ MX8MN_IOMUXC_SD1_DATA5_GPIO2_IO7 0x0
+ /* BT_WAKE_HOST */
+ MX8MN_IOMUXC_SD1_DATA6_GPIO2_IO8 0x100
+ >;
+ };
+
+ uart2_pins: pinctrl-uart2-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
+ MX8MN_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
+ >;
+ };
+
+ uart3_pins: pinctrl-uart3-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_ECSPI1_MOSI_UART3_DTE_RX 0x140
+ MX8MN_IOMUXC_ECSPI1_SCLK_UART3_DTE_TX 0x140
+ MX8MN_IOMUXC_ECSPI1_MISO_UART3_DTE_RTS_B 0x140
+ MX8MN_IOMUXC_ECSPI1_SS0_UART3_DTE_CTS_B 0x140
+ >;
+ };
+
+ uart4_pins: pinctrl-uart4-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_UART4_RXD_UART4_DCE_RX 0x140
+ MX8MN_IOMUXC_UART4_TXD_UART4_DCE_TX 0x140
+ >;
+ };
+
+ usb_hub_pins: pinctrl-usb-hub-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SPDIF_TX_GPIO5_IO3 0x0
+ >;
+ };
+
+ usdhc1_pins: pinctrl-usdhc1-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD1_CLK_USDHC1_CLK 0x190
+ MX8MN_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0
+ MX8MN_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0
+ MX8MN_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0
+ MX8MN_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0
+ MX8MN_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0
+ /* wifi refclk */
+ MX8MN_IOMUXC_GPIO1_IO00_ANAMIX_REF_CLK_32K 0x0
+ /* WL_WAKE_HOST */
+ MX8MN_IOMUXC_SD1_DATA7_GPIO2_IO9 0x100
+ /* WL_REG_ON */
+ MX8MN_IOMUXC_SD1_RESET_B_GPIO2_IO10 0x0
+ >;
+ };
+
+ usdhc2_pins: pinctrl-usdhc2-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
+ MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0
+ MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0
+ MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0
+ MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
+ MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
+ MX8MN_IOMUXC_SD2_CD_B_USDHC2_CD_B 0x0
+ /* usdhc2 signalling voltage pmic control */
+ MX8MN_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x140
+ >;
+ };
+
+ usdhc2_100mhz_pins: pinctrl-usdhc2-100mhz-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
+ MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
+ MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
+ MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
+ MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
+ MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
+ MX8MN_IOMUXC_SD2_CD_B_USDHC2_CD_B 0x0
+ /* usdhc2 signalling voltage pmic control */
+ MX8MN_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x140
+ >;
+ };
+
+ usdhc2_200mhz_pins: pinctrl-usdhc2-100mhz-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
+ MX8MN_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
+ MX8MN_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
+ MX8MN_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
+ MX8MN_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
+ MX8MN_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
+ MX8MN_IOMUXC_SD2_CD_B_USDHC2_CD_B 0x0
+ /* usdhc2 signalling voltage pmic control */
+ MX8MN_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x140
+ >;
+ };
+
+ usdhc3_pins: pinctrl-usdhc3-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_NAND_WE_B_USDHC3_CLK 0x190
+ MX8MN_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d0
+ MX8MN_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d0
+ MX8MN_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d0
+ MX8MN_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d0
+ MX8MN_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d0
+ MX8MN_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d0
+ MX8MN_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d0
+ MX8MN_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d0
+ MX8MN_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d0
+ MX8MN_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x190
+ >;
+ };
+
+ wdog1_pins: pinctrl-wdog1-grp {
+ fsl,pins = <
+ MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x140
+ >;
+ };
+};
+
+/* Bluetooth */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>;
+ uart-has-rtscts;
+ /* select 80MHz parent clock to support maximum baudrate 4Mbps */
+ assigned-clocks = <&clk IMX8MN_CLK_UART1>;
+ assigned-clock-parents = <&clk IMX8MN_SYS_PLL1_80M>;
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4330-bt";
+ device-wakeup-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
+ shutdown-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+ max-speed = <3000000>;
+ };
+};
+
+/* console */
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+ status = "okay";
+};
+
+/* RS485 */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>;
+ uart-has-rtscts;
+ linux,rs485-enabled-at-boot-time;
+ fsl,dte-mode;
+ status = "okay";
+};
+
+/* 802.15.1 radio */
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins &ieee802151_radio_pins>;
+ status = "okay";
+};
+
+&usbotg1 {
+ vbus-supply = <®_usb1_vbus>;
+ dr_mode = "host";
+ disable-over-current;
+ status = "okay";
+};
+
+/* WiFi */
+&usdhc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usdhc1_pins>;
+ vmmc-supply = <®_vdd_3v3>;
+ vqmmc-supply = <®_vdd_1v8>;
+ bus-width = <4>;
+ mmc-pwrseq = <&usdhc1_pwrseq>;
+ status = "okay";
+};
+
+/* microSD */
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&usdhc2_pins>;
+ pinctrl-1 = <&usdhc2_100mhz_pins>;
+ pinctrl-2 = <&usdhc2_200mhz_pins>;
+ vmmc-supply = <®_usdhc2_vmmc>;
+ bus-width = <4>;
+ broken-cd;
+ status = "okay";
+};
+
+/* eMMC */
+&usdhc3 {
+ /*
+ * Use lowest drive strength for all high-speed modes to minimise
+ * electro-magnetic emissions.
+ * In this particular design HS-400 still works okay, no extra
+ * pinctrl for 100mhz and 200mhz are required.
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&usdhc3_pins>;
+ vmmc-supply = <®_vdd_3v3>;
+ vqmmc-supply = <®_vdd_1v8>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
+
+&wdog1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&wdog1_pins>;
+ status = "okay";
+};
--
2.51.0
^ permalink raw reply related
* [PATCH v4 5/8] arm64: dts: imx8mp-sr-som: build dtbs with symbols for overlay support
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
Build all dtbs based on SolidRun i.MX8MP SoM with symbols (adding -@ to
dtc flags) to enable support for device-tree addons.
The SoM has a camera connector for basler cameras that can be enabled by
downstream dtbo.
Hence by extension all boards based on this SoM should support addons.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
arch/arm64/boot/dts/freescale/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 525ef180481d3..8bda6fb0ff9c1 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -197,6 +197,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-aristainetos3-helios-lvds.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-aristainetos3-proton2s.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-beacon-kit.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-cubox-m.dtb
+DTC_FLAGS_imx8mp-cubox-m := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-data-modul-edm-sbc.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-debix-model-a.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-debix-som-a-bmb-08.dtb
@@ -207,9 +208,13 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-picoitx.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-edm-g-wb.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-mate.dtb
+DTC_FLAGS_imx8mp-hummingboard-mate := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-pro.dtb
+DTC_FLAGS_imx8mp-hummingboard-pro := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-pulse.dtb
+DTC_FLAGS_imx8mp-hummingboard-pulse := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-ripple.dtb
+DTC_FLAGS_imx8mp-hummingboard-ripple := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-icore-mx8mp-edimm2.2.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-iota2-lumpy.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-kontron-bl-osm-s.dtb
--
2.51.0
^ permalink raw reply related
* [PATCH v4 3/8] arm64: dts: imx8mp-hummingboard-pulse/cubox-m: fix vmmc gpio polarity
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
Fix the polarity in vmmc regulator node for the gpio from active-high to
active-low. This is a cosmetic change as regulator default to active-low
unless property enable-active-high was also specified - ignoring the
flag on gpio handle.
Fixes: a009c0c66ecb ("arm64: dts: add description for solidrun imx8mp som and cubox-m")
Fixes: 2a222aa2bee9 ("arm64: dts: add description for solidrun imx8mp hummingboard variants")
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts | 2 +-
arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-common.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts b/arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts
index 8290f187b79fd..7bc213499f094 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts
@@ -68,7 +68,7 @@ vmmc: regulator-mmc {
regulator-name = "vmmc";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_LOW>;
startup-delay-us = <250>;
};
};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-common.dtsi
index 825ad6a2ba14e..5b8c8489713c4 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-common.dtsi
@@ -73,7 +73,7 @@ vmmc: regulator-mmc {
regulator-name = "vmmc";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_LOW>;
startup-delay-us = <250>;
};
--
2.51.0
^ permalink raw reply related
* [PATCH v4 6/8] arm64: dts: add description for solidrun imx8mp hummingboard-iiot
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
Add description for the SolidRun i.MX8MP HummingBoard IIoT.
The board is a new design around the i.MX8MP System on Module, not
sharing much with previous HummingBoards.
It comes with some common features:
- 3x USB-3.0 Type A connector
- 2x 1Gbps RJ45 Ethernet
- USB Type-C Console Port
- microSD connector
- RTC with backup battery
- RGB Status LED
- 1x M.2 M-Key connector with PCI-E Gen. 3 x1
- 1x M.2 B-Key connector with USB-2.0/3.0 + SIM card holder
- 1x LVDS Display Connector
- 1x DSI Display Connector
- GPIO header
- 2x RS232/RS485 ports (configurable)
- 2x CAN
In addition there is a board-to-board expansion connector to support
custom daughter boards with access to SPI, a range of GPIOs and -
notably - CAN and UART. Both 2x CAN and 2x UART can be muxed either
to this b2b connector, or a termianl block connector on the base board.
The routing choice for UART and CAN is expressed through gpio
mux-controllers in DT and can be changed by applying dtb addons.
Four dtb addons are provided:
- dsi panel Winstar WJ70N3TYJHMNG0
- lvds panel Winstar WF70A8SYJHLNGA
- RS485 on UART port "A" (default rs232)
- RS485 on UART port "B" (default rs232)
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
arch/arm64/boot/dts/freescale/Makefile | 6 +
...hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtso | 69 ++
...ummingboard-iiot-panel-lvds-WF70A8SYJHLNGA.dtso | 105 +++
.../imx8mp-hummingboard-iiot-rs485-a.dtso | 18 +
.../imx8mp-hummingboard-iiot-rs485-b.dtso | 18 +
.../dts/freescale/imx8mp-hummingboard-iiot.dts | 713 +++++++++++++++++++++
6 files changed, 929 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 8bda6fb0ff9c1..d414d0efe5e74 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -207,6 +207,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk3.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-picoitx.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-edm-g-wb.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot.dtb
+DTC_FLAGS_imx8mp-hummingboard-iiot := -@
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot-panel-lvds-WF70A8SYJHLNGA.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot-rs485-a.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot-rs485-b.dtbo
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-mate.dtb
DTC_FLAGS_imx8mp-hummingboard-mate := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-pro.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtso b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtso
new file mode 100644
index 0000000000000..e66ee2ce69d8d
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtso
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 Josua Mayer <josua@solid-run.com>
+ *
+ * Overlay for enabling HummingBoard IIoT MIPI-DSI connector
+ * with Winstar WJ70N3TYJHMNG0 panel.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+&{/} {
+ dsi_backlight: dsi-backlight {
+ compatible = "gpio-backlight";
+ gpios = <&tca6408_u48 3 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&i2c_dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@41 {
+ compatible = "ilitek,ili2130";
+ reg = <0x41>;
+ reset-gpios = <&tca6408_u48 6 GPIO_ACTIVE_LOW>;
+ interrupts-extended = <&tca6416_u21 13 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&lcdif1 {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <10000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ panel@0 {
+ /* This is a Winstar panel, but the ronbo panel uses same controls. */
+ compatible = "ronbo,rb070d30";
+ reg = <0>;
+ vcc-lcd-supply = <®_dsi_panel>;
+ power-gpios = <&tca6408_u48 2 GPIO_ACTIVE_HIGH>;
+ /* reset is active-low but driver inverts it internally */
+ reset-gpios = <&tca6408_u48 1 GPIO_ACTIVE_HIGH>;
+ updn-gpios = <&tca6408_u48 5 GPIO_ACTIVE_HIGH>;
+ shlr-gpios = <&tca6408_u48 4 GPIO_ACTIVE_LOW>;
+ backlight = <&dsi_backlight>;
+
+ port {
+ panel_from_dsim: endpoint {
+ remote-endpoint = <&dsim_to_panel>;
+ };
+ };
+ };
+
+ port@1 {
+ dsim_to_panel: endpoint {
+ remote-endpoint = <&panel_from_dsim>;
+ data-lanes = <1 2 3 4>;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-panel-lvds-WF70A8SYJHLNGA.dtso b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-panel-lvds-WF70A8SYJHLNGA.dtso
new file mode 100644
index 0000000000000..f8fb7fd0e4e49
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-panel-lvds-WF70A8SYJHLNGA.dtso
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 Josua Mayer <josua@solid-run.com>
+ *
+ * Overlay for enabling HummingBoard IIoT LVDS connector
+ * with Winstar WF70A8SYJHLNGA panel.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+&{/} {
+ lvds_backlight: lvds-backlight {
+ compatible = "gpio-backlight";
+ gpios = <&tca6408_u37 3 GPIO_ACTIVE_LOW>;
+ };
+
+ panel-lvds {
+ compatible = "winstar,wf70a8syjhlnga", "panel-lvds";
+ backlight = <&lvds_backlight>;
+ power-supply = <®_dsi_panel>;
+ enable-gpios = <&tca6408_u37 2 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&tca6408_u37 1 GPIO_ACTIVE_HIGH>;
+ data-mapping = "vesa-24";
+ width-mm = <154>;
+ height-mm = <86>;
+
+ panel-timing {
+ /*
+ * Note: NXP BSP hard-codes 74MHz clock in ldb driver:
+ * drivers/gpu/drm/imx/imx8mp-ldb.c
+ * SolidRun BSP carries patch.
+ */
+ clock-frequency = <49500000>;
+ hactive = <1024>;
+ vactive = <600>;
+ hfront-porch = <40>;
+ hback-porch = <144>;
+ hsync-len = <104>;
+ hsync-active = <0>;
+ vfront-porch = <3>;
+ vback-porch = <11>;
+ vsync-len = <10>;
+ vsync-active = <1>;
+ de-active = <1>;
+ };
+
+ port {
+ panel_from_lvds: endpoint {
+ remote-endpoint = <&lvds_ch0_out>;
+ };
+ };
+ };
+};
+
+&i2c_lvds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@41 {
+ compatible = "ilitek,ili2130";
+ reg = <0x41>;
+ reset-gpios = <&tca6408_u37 6 GPIO_ACTIVE_LOW>;
+ interrupts-extended = <&tca6416_u21 13 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&lcdif2 {
+ status = "okay";
+};
+
+&lvds_bridge {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ port@1 {
+ lvds_ch0_out: endpoint {
+ remote-endpoint = <&panel_from_lvds>;
+ };
+ };
+ };
+};
+
+&tca6408_u37 {
+ lvds-lr-hog {
+ gpio-hog;
+ gpios = <4 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "lvds-l/r";
+ };
+
+ lvds-ud-hog {
+ gpio-hog;
+ gpios = <5 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "lvds-u/d";
+ };
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-rs485-a.dtso b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-rs485-a.dtso
new file mode 100644
index 0000000000000..7bbf800b78fb1
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-rs485-a.dtso
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 Josua Mayer <josua@solid-run.com>
+ *
+ * Overlay for enabling HummingBoard IIoT on-board RS485 Port A on connector J5004.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&uart3_rs_232_485_mux {
+ /* select rs485 */
+ idle-state = <1>;
+};
+
+&uart3 {
+ linux,rs485-enabled-at-boot-time;
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-rs485-b.dtso b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-rs485-b.dtso
new file mode 100644
index 0000000000000..d4bfea886ad12
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot-rs485-b.dtso
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 Josua Mayer <josua@solid-run.com>
+ *
+ * Overlay for enabling HummingBoard IIoT on-board RS485 Port B on connector J5004.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&uart4_rs_232_485_mux {
+ /* select rs485 */
+ idle-state = <1>;
+};
+
+&uart4 {
+ linux,rs485-enabled-at-boot-time;
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot.dts b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot.dts
new file mode 100644
index 0000000000000..070f03e5abab9
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-iiot.dts
@@ -0,0 +1,713 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2024 Yazan Shhady <yazan.shhady@solid-run.com>
+ * Copyright 2025 Josua Mayer <josua@solid-run.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/phy/phy-imx8-pcie.h>
+
+#include "imx8mp-sr-som.dtsi"
+
+/ {
+ model = "SolidRun i.MX8MP HummingBoard IIoT";
+ compatible = "solidrun,imx8mp-hummingboard-iiot",
+ "solidrun,imx8mp-sr-som", "fsl,imx8mp";
+
+ aliases {
+ ethernet0 = &eqos; /* J10 */
+ ethernet1 = &fec; /* J11 */
+ rtc0 = &carrier_rtc;
+ rtc1 = &snvs_rtc;
+ gpio5 = &tca6408_u48;
+ gpio6 = &tca6408_u37;
+ gpio7 = &tca6416_u20;
+ gpio8 = &tca6416_u21;
+ i2c6 = &i2c_exp;
+ i2c7 = &i2c_csi;
+ i2c8 = &i2c_dsi;
+ i2c9 = &i2c_lvds;
+ };
+
+ v_1_2: regulator-1-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "1v2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ reg_dsi_panel: regulator-dsi-panel {
+ compatible = "regulator-fixed";
+ regulator-name = "dsi-panel";
+ regulator-min-microvolt = <11200000>;
+ regulator-max-microvolt = <11200000>;
+ gpios = <&tca6416_u20 15 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ /* power for M.2 B-Key connector (J6) */
+ regulator-m2-b {
+ compatible = "regulator-fixed";
+ regulator-name = "m2-b";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&tca6416_u20 5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ /* power for M.2 M-Key connector (J4) */
+ regulator-m2-m {
+ compatible = "regulator-fixed";
+ regulator-name = "m2-m";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&tca6416_u20 6 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ };
+
+ vmmc: regulator-mmc {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&vmmc_pins>;
+ regulator-name = "vmmc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_LOW>;
+ enable-active-high;
+ startup-delay-us = <250>;
+ };
+
+ /* power for USB-A J5003 */
+ vbus1: regulator-vbus-1 {
+ compatible = "regulator-fixed";
+ regulator-name = "vbus1";
+ gpio = <&tca6416_u20 14 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ /* power for USB-A J27 behind USB Hub Port 3 */
+ regulator-vbus-2 {
+ compatible = "regulator-fixed";
+ regulator-name = "vbus2";
+ gpio = <&tca6416_u20 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ /* power for USB-A J27 behind USB Hub Port 4 */
+ regulator-vbus-3 {
+ compatible = "regulator-fixed";
+ regulator-name = "vbus3";
+ gpio = <&tca6416_u20 13 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ rfkill-m2-b-gnss {
+ compatible = "rfkill-gpio";
+ label = "m2-b gnss";
+ radio-type = "gps";
+ /* rfkill-gpio inverts internally */
+ shutdown-gpios = <&tca6416_u20 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ rfkill-m2-b-wwan {
+ compatible = "rfkill-gpio";
+ label = "m2-b radio";
+ radio-type = "wwan";
+ /* rfkill-gpio inverts internally */
+ shutdown-gpios = <&tca6416_u20 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ flexcan1_flexcan2_b2b_mux: mux-controller-0 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ /*
+ * Mux switches both flexcan1 and flexcan2 tx/rx between
+ * expansion connector (J22) and on-board transceivers
+ * using one GPIO: 0 = on-board, 1 connector.
+ */
+ mux-gpios = <&tca6416_u20 3 GPIO_ACTIVE_HIGH>;
+ /* default on-board */
+ idle-state = <0>;
+ };
+
+ mux-controller-1 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ /*
+ * Mux switches can bus between different SoM board-to-board
+ * connector pins which is used to support different SoMs.
+ * i.MX8M Plus uses J7-12/16 and J9-54/56 for 2x flexcan.
+ */
+ mux-gpios = <&tca6416_u20 4 GPIO_ACTIVE_HIGH>;
+ idle-state = <1>;
+ };
+
+ spi_mux: mux-controller-2 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ /*
+ * Mux switches spi bus between on-board tpm
+ * and expansion connector (J22).
+ */
+ mux-gpios = <&tca6416_u21 0 GPIO_ACTIVE_HIGH>;
+ /* default on-board */
+ idle-state = <0>;
+ };
+
+ uart3_uart4_b2b_mux: mux-controller-3 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ /*
+ * Mux switches both uart3 and uart4 tx/rx between expansion
+ * connector (J22) and on-board rs232/rs485 transceivers
+ * using one GPIO: 0 = on-board, 1 connector.
+ */
+ mux-gpios = <&tca6416_u20 0 GPIO_ACTIVE_HIGH>;
+ /* default on-board */
+ idle-state = <0>;
+ };
+
+ uart3_rs_232_485_mux: mux-controller-4 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ /*
+ * Mux switches uart3 tx/rx between rs232 and rs485
+ * transceivers. using one GPIO: 0 = rs232; 1 = rs485.
+ */
+ mux-gpios = <&tca6416_u20 1 GPIO_ACTIVE_HIGH>;
+ /* default rs232 */
+ idle-state = <0>;
+ };
+
+ uart4_rs_232_485_mux: mux-controller-5 {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+ /*
+ * Mux switches uart4 tx/rx between rs232 and rs485
+ * transceivers. using one GPIO: 0 = rs232; 1 = rs485.
+ */
+ mux-gpios = <&tca6416_u20 2 GPIO_ACTIVE_HIGH>;
+ /* default rs232 */
+ idle-state = <0>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ wakeup-event {
+ label = "m2-m-wakeup";
+ interrupts-extended = <&tca6416_u21 11 IRQ_TYPE_EDGE_FALLING>;
+ linux,code = <KEY_WAKEUP>;
+ wakeup-source;
+ };
+ };
+};
+
+&ecspi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ecspi2_pins>;
+ num-cs = <1>;
+ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ ecspi2_muxed: spi@0 {
+ compatible = "spi-mux";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ /* mux bandwidth is 2GHz, soc max. spi clock is 166MHz */
+ spi-max-frequency = <166000000>;
+ mux-controls = <&spi_mux>;
+
+ tpm@0 {
+ compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+ reg = <0>;
+ spi-max-frequency = <43000000>;
+ reset-gpios = <&tca6416_u21 1 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
+ interrupts-extended = <&tca6416_u21 9 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+};
+
+&flexcan1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&can1_pins>;
+ status = "okay";
+
+ can-transceiver {
+ max-bitrate = <8000000>;
+ };
+};
+
+&flexcan2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&can2_pins>;
+ status = "okay";
+
+ can-transceiver {
+ max-bitrate = <8000000>;
+ };
+};
+
+&i2c2 {
+ i2c-mux@70 {
+ compatible = "nxp,pca9546";
+ reg = <0x70>;
+ /*
+ * This reset is open drain,
+ * but reset core does not support GPIO_OPEN_DRAIN flag.
+ */
+ reset-gpios = <&tca6416_u21 2 GPIO_ACTIVE_LOW>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* channel 0 routed to expansion connector (J22) */
+ i2c_exp: i2c@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ /* channel 1 routed to mipi-csi connector (J23) */
+ i2c_csi: i2c@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ /* channel 2 routed to mipi-dsi connector (J25) */
+ i2c_dsi: i2c@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tca6408_u48: gpio@21 {
+ compatible = "ti,tca6408";
+ reg = <0x21>;
+ /*
+ * reset shared between U37 and U48, to be
+ * supported once gpio-pca953x switches to
+ * reset framework.
+ *
+ * reset-gpios = <&tca6416_u21 4 (GPIO_ACTIVE_LOW|GPIO_PULL_UP|GPIO_OPEN_DRAIN)>;
+ */
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "CAM_RST#", "DSI_RESET",
+ "DSI_STBYB", "DSI_PWM_BL",
+ "DSI_L/R", "DSI_U/D",
+ "DSI_CTP_/RST", "CAM_TRIG";
+ };
+ };
+
+ /* channel 2 routed to lvds connector (J24) */
+ i2c_lvds: i2c@3 {
+ reg = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ tca6408_u37: gpio@20 {
+ compatible = "ti,tca6408";
+ reg = <0x20>;
+ /*
+ * reset shared between U37 and U48, to be
+ * supported once gpio-pca953x switches to
+ * reset framework.
+ *
+ * reset-gpios = <&tca6416_u21 4 (GPIO_ACTIVE_LOW|GPIO_PULL_UP|GPIO_OPEN_DRAIN)>;
+ */
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "SELB", "LVDS_RESET",
+ "LVDS_STBYB", "LVDS_PWM_BL",
+ "LVDS_L/R", "LVDS_U/D",
+ "LVDS_CTP_/RST", "";
+ };
+ };
+ };
+};
+
+&i2c3 {
+ /* highest i2c clock supported by all peripherals is 400kHz */
+ clock-frequency = <400000>;
+
+ tca6416_u20: gpio@20 {
+ /*
+ * This is a TI TCAL6416 using same programming model as
+ * NXP PCAL6416, not to be confused with TI TCA6416.
+ */
+ compatible = "nxp,pcal6416";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "TCA_INT/EXT_UART", "TCA_UARTA_232/485",
+ "TCA_UARTB_232/485", "TCA_INT/EXT_CAN",
+ "TCA_NXP/REN", "TCA_M.2B_3V3_EN",
+ "TCA_M.2M_3V3_EN", "TCA_M.2M_RESET#",
+ "TCA_M.2B_RESET#", "TCA_M.2B_W_DIS#",
+ "TCA_M.2B_GPS_EN#", "TCA_USB-HUB_RST#",
+ "TCA_USB_HUB3_PWR_EN", "TCA_USB_HUB4_PWR_EN",
+ "TCA_USB1_PWR_EN", "TCA_VIDEO_PWR_EN";
+
+ m2-b-reset-hog {
+ gpio-hog;
+ gpios = <8 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "m2-b-reset";
+ };
+ };
+
+ tca6416_u21: gpio@21 {
+ /*
+ * This is a TI TCAL6416 using same programming model as
+ * NXP PCAL6416, not to be confused with TI TCA6416.
+ */
+ compatible = "nxp,pcal6416";
+ reg = <0x21>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&tca6416_u21_int_pins>;
+ interrupts-extended = <&gpio1 15 IRQ_TYPE_EDGE_FALLING>;
+ gpio-line-names = "TCA_SPI_TPM/EXT", "TCA_TPM_RST#",
+ "TCA_I2C_RST", "TCA_RS232_SHTD#",
+ "TCA_LCD_I2C_RST", "TCA_DIG_OUT1",
+ "TCA_bDIG_IN1", "TCA_SENS_INT",
+ "TCA_ALERT#", "TCA_TPM_PIRQ#",
+ "TCA_RTC_INT", "TCA_M.2M_WAKW_ON_LAN",
+ "TCA_M.2M_CLKREQ#", "TCA_LVDS_INT#",
+ "", "TCA_POE_AT";
+
+ rs232_shutdown: rs232-shutdown-hog {
+ gpio-hog;
+ gpios = <3 GPIO_ACTIVE_LOW>;
+ output-low;
+ line-name = "rs232-shutdown";
+ };
+
+ lcd-i2c-reset-hog {
+ /*
+ * reset shared between U37 and U48, to be
+ * supported once gpio-pca953x switches to
+ * reset framework.
+ */
+ gpio-hog;
+ gpios = <4 (GPIO_ACTIVE_LOW|GPIO_PULL_UP|GPIO_OPEN_DRAIN)>;
+ output-low;
+ line-name = "lcd-i2c-reset";
+ };
+
+ m2-m-clkreq-hog {
+ gpio-hog;
+ gpios = <12 GPIO_ACTIVE_LOW>;
+ input;
+ line-name = "m2-m-clkreq";
+ };
+ };
+
+ led-controller@30 {
+ compatible = "ti,lp5562";
+ reg = <0x30>;
+ /* use internal clock, could use external generated by rtc */
+ clock-mode = /bits/ 8 <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ multi-led@0 {
+ reg = <0x0>;
+ label = "D7";
+ color = <LED_COLOR_ID_RGB>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0x0>;
+ color = <LED_COLOR_ID_RED>;
+ led-cur = /bits/ 8 <0x32>;
+ max-cur = /bits/ 8 <0x64>;
+ };
+
+ led@1 {
+ reg = <0x1>;
+ color = <LED_COLOR_ID_GREEN>;
+ led-cur = /bits/ 8 <0x19>;
+ max-cur = /bits/ 8 <0x32>;
+ };
+
+ led@2 {
+ reg = <0x2>;
+ color = <LED_COLOR_ID_BLUE>;
+ led-cur = /bits/ 8 <0x19>;
+ max-cur = /bits/ 8 <0x32>;
+ };
+ };
+
+ led@3 {
+ reg = <3>;
+ chan-name = "D8";
+ label = "D8";
+ color = <LED_COLOR_ID_GREEN>;
+ led-cur = /bits/ 8 <0x19>;
+ max-cur = /bits/ 8 <0x64>;
+ };
+ };
+
+ light-sensor@44 {
+ compatible = "isil,isl29023";
+ reg = <0x44>;
+ /* IRQ shared between accelerometer, light-sensor and Tamper input (J5007) */
+ interrupts-extended = <&tca6416_u21 7 IRQ_TYPE_EDGE_FALLING>;
+ };
+
+ accelerometer@53 {
+ compatible = "adi,adxl345";
+ reg = <0x53>;
+ /* IRQ shared between accelerometer, light-sensor and Tamper input (J5007) */
+ interrupt-names = "INT1";
+ interrupts-extended = <&tca6416_u21 7 IRQ_TYPE_EDGE_FALLING>;
+ };
+
+ carrier_eeprom: eeprom@57{
+ compatible = "atmel,24c02";
+ reg = <0x57>;
+ pagesize = <8>;
+ };
+
+ carrier_rtc: rtc@69 {
+ compatible = "abracon,ab1805";
+ reg = <0x69>;
+ abracon,tc-diode = "schottky";
+ abracon,tc-resistor = <3>;
+ interrupts-extended = <&tca6416_u21 10 IRQ_TYPE_EDGE_FALLING>;
+ };
+};
+
+&iomuxc {
+ can1_pins: pinctrl-can1-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SPDIF_RX__CAN1_RX 0x154
+ MX8MP_IOMUXC_SPDIF_TX__CAN1_TX 0x154
+ >;
+ };
+
+ can2_pins: pinctrl-can2-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX 0x154
+ MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX 0x154
+ >;
+ };
+
+ ecspi2_pins: pinctrl-ecspi2-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x140
+ MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x140
+ MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x140
+ MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x140
+ >;
+ };
+
+ tca6416_u21_int_pins: pinctrl-tca6416-u21-int-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO15__GPIO1_IO15 0x0
+ >;
+ };
+
+ /* UARTA */
+ uart3_pins: pinctrl-uart3-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_ECSPI1_SCLK__UART3_DCE_RX 0x140
+ MX8MP_IOMUXC_ECSPI1_MOSI__UART3_DCE_TX 0x140
+ MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x140
+ >;
+ };
+
+ /* UARTB */
+ uart4_pins: pinctrl-uart4-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_NAND_DATA00__UART4_DCE_RX 0x140
+ MX8MP_IOMUXC_NAND_DATA01__UART4_DCE_TX 0x140
+ MX8MP_IOMUXC_ECSPI1_MISO__GPIO5_IO08 0x140
+ >;
+ };
+
+ usdhc2_pins: pinctrl-usdhc2-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d0
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d0
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d0
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d0
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d0
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0x140
+ MX8MP_IOMUXC_SD2_CD_B__USDHC2_CD_B 0x140
+ >;
+ };
+
+ usdhc2_100mhz_pins: pinctrl-usdhc2-100mhz-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x194
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d4
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0x140
+ MX8MP_IOMUXC_SD2_CD_B__USDHC2_CD_B 0x140
+ >;
+ };
+
+ usdhc2_200mhz_pins: pinctrl-usdhc2-200mhz-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x196
+ MX8MP_IOMUXC_SD2_CMD__USDHC2_CMD 0x1d6
+ MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d6
+ MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d6
+ MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d6
+ MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d6
+ MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0x140
+ MX8MP_IOMUXC_SD2_CD_B__USDHC2_CD_B 0x140
+ >;
+ };
+
+ vmmc_pins: pinctrl-vmmc-grp {
+ fsl,pins = <
+ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x0
+ >;
+ };
+};
+
+&pcie {
+ reset-gpio = <&tca6416_u20 7 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+/* M.2 M-Key (J4) */
+&pcie_phy {
+ clocks = <&hsio_blk_ctrl>;
+ clock-names = "ref";
+ fsl,clkreq-unsupported;
+ fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>;
+ status = "okay";
+};
+
+&phy0 {
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* ADIN1300 LED_0 pin */
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ default-state = "keep";
+ };
+ };
+};
+
+&phy1 {
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* ADIN1300 LED_0 pin */
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ default-state = "keep";
+ };
+ };
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>;
+ rts-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
+ /* select 80MHz parent clock to support maximum baudrate 4Mbps */
+ assigned-clocks = <&clk IMX8MP_CLK_UART3>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
+ status = "okay";
+};
+
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins>;
+ rts-gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>;
+ /* select 80MHz parent clock to support maximum baudrate 4Mbps */
+ assigned-clocks = <&clk IMX8MP_CLK_UART4>;
+ assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
+ status = "okay";
+};
+
+&usb3_phy0 {
+ fsl,phy-tx-preemp-amp-tune-microamp = <1200>;
+ vbus-supply = <&vbus1>;
+ status = "okay";
+};
+
+&usb3_0 {
+ status = "okay";
+};
+
+&usb3_phy1 {
+ status = "okay";
+};
+
+&usb3_1 {
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ dr_mode = "host";
+};
+
+&usb_dwc3_1 {
+ dr_mode = "host";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub_2_0: hub@1 {
+ compatible = "usb4b4,6502", "usb4b4,6506";
+ reg = <1>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&tca6416_u20 11 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&v_1_2>;
+ vdd2-supply = <&v_3_3>;
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb4b4,6500", "usb4b4,6504";
+ reg = <2>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&tca6416_u20 11 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&v_1_2>;
+ vdd2-supply = <&v_3_3>;
+ };
+};
+
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&usdhc2_pins>;
+ pinctrl-1 = <&usdhc2_100mhz_pins>;
+ pinctrl-2 = <&usdhc2_200mhz_pins>;
+ vmmc-supply = <&vmmc>;
+ bus-width = <4>;
+ cap-power-off-card;
+ full-pwr-cycle;
+ status = "okay";
+};
--
2.51.0
^ permalink raw reply related
* [PATCH v4 4/8] arm64: dts: imx8mp-hummingboard-pulse: fix mini-hdmi dsi port reference
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
imx8mp.dtsi includes a default port@1 node with an empty placeholder
endpoint intended for linking to a dsi bridge or panel.
HummingBoard Pulse mini-hdmi dtsi added and linked hdmi brodge to yet
another endpoint.
This duplicate endpoint can cause dsi_attach to fail.
Remove the duplicate node and link to the one defined in soc dtsi.
Further remove the unnecessary attach-bridge property.
Fixes: 2a222aa2bee9 ("arm64: dts: add description for solidrun imx8mp hummingboard variants")
Signed-off-by Josua Mayer <josua@solid-run.com>
---
.../dts/freescale/imx8mp-hummingboard-pulse-mini-hdmi.dtsi | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-mini-hdmi.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-mini-hdmi.dtsi
index 46916ddc05335..0e5f4607c7c1b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-mini-hdmi.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse-mini-hdmi.dtsi
@@ -41,7 +41,7 @@ port@0 {
reg = <0>;
adv7535_from_dsim: endpoint {
- remote-endpoint = <&dsim_to_adv7535>;
+ remote-endpoint = <&mipi_dsi_out>;
};
};
@@ -71,11 +71,8 @@ &lcdif1 {
&mipi_dsi {
samsung,esc-clock-frequency = <10000000>;
status = "okay";
+};
- port@1 {
- dsim_to_adv7535: endpoint {
- remote-endpoint = <&adv7535_from_dsim>;
- attach-bridge;
- };
- };
+&mipi_dsi_out {
+ remote-endpoint = <&adv7535_from_dsim>;
};
--
2.51.0
^ permalink raw reply related
* [PATCH v4 0/8] arm64: dts: add description for solidrun imx8mp hummingboard-iiot
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer,
Krzysztof Kozlowski
This patchset mainly adds description for 3 SolidRun boards:
- i.MX8MP Hummingboard IIoT
- SolidSense N8 Compact
- i.MX8MM Hummingboard Ripple
This includes dt bindings and a range of bug-fixes:
- dt bindings for the boards
- fix to dsi panel bindings referncing panel-common and adding port
property
- cosmetic fix to some solidrun imx8mp boards for regulator gpio
polarity
- fix dsi hdmi bridge on hummingboard pulse
- compile dtbs with symbols to support overlays
- gpiod_set_value _can_sleep conversion for panel and touchscreen
drivers
Open Questions:
- How to describe HX3 USB-2.0/3.0 Hub placed on a USB-2.0-only Bus
(affects imx8mm-hummingboard-ripple.dts)
- Is "description for" implied not only on dt-bindings patches, but also
dts? E.g. is this commit subject acceptable?:
"arm64: dts: add solidrun solidsense-n8 board"
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
Changes in v4:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- dropped patches already picked into drm-misc-next
- ronbo panel: picked up reviewed-by tag
(Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>)
- ilitek-ts: changed mdelay calls on reset path to fsleep
(Note Dmitry requested msleep/usleep_range)
(Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>)
- changed hummingboard-iiot tpm irq type to level
- Link to v3: https://lore.kernel.org/r/20251117-imx8mp-hb-iiot-v3-0-bf1a4cf5fa8e@solid-run.com
Changes in v3:
- sinmplified language in gpiod_can_sleep patches.
(Reported-By: Frank Li <Frank.li@nxp.com>)
- collected ack on winstar lvds panel binding
(Acked-by: Conor Dooley <conor.dooley@microchip.com>)
- Link to v2: https://lore.kernel.org/r/20251107-imx8mp-hb-iiot-v2-0-d8233ded999e@solid-run.com
Changes in v2:
- fix spelling mistakes in commit descriptions.
- remove redundant "binding for" from subject:
https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst
(Reported-by: Krzysztof Kozlowski <krzk@kernel.org>)
- remove one useless comment from imx8mm-sr-som.dtsi to fix long line
warning.
- change ronbo panel binding to inherit panel-common and switch
additionalProperties to unevaluatedProperties.
(Reported-by: Krzysztof Kozlowski <krzk@kernel.org>)
- add dt binding for winstar lvds panel
- fix dtbs_check for dsi & lvds panel addons
- change n8 board dts comment-style in header
- collected ack on solidrun boards bindings patch (patch 1 in the series)
(Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>)
- added standard led label property to hb-iiot multi-purpose leds
ensuring consistent names in case lp5562 driver starts using it.
- Link to v1: https://lore.kernel.org/r/20251027-imx8mp-hb-iiot-v1-0-683f86357818@solid-run.com
---
Josua Mayer (8):
dt-bindings: arm: fsl: Add various solidrun i.mx8m boards
Input: ilitek_ts_i2c: fix warning with gpio controllers that sleep
arm64: dts: imx8mp-hummingboard-pulse/cubox-m: fix vmmc gpio polarity
arm64: dts: imx8mp-hummingboard-pulse: fix mini-hdmi dsi port reference
arm64: dts: imx8mp-sr-som: build dtbs with symbols for overlay support
arm64: dts: add description for solidrun imx8mp hummingboard-iiot
arm64: dts: add description for solidrun solidsense-n8 board
arm64: dts: add description for solidrun i.mx8mm som and evb
Documentation/devicetree/bindings/arm/fsl.yaml | 9 +
arch/arm64/boot/dts/freescale/Makefile | 15 +
.../dts/freescale/imx8mm-hummingboard-ripple.dts | 335 ++++++++
arch/arm64/boot/dts/freescale/imx8mm-sr-som.dtsi | 395 ++++++++++
.../dts/freescale/imx8mn-solidsense-n8-compact.dts | 853 +++++++++++++++++++++
arch/arm64/boot/dts/freescale/imx8mp-cubox-m.dts | 2 +-
...hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtso | 69 ++
...ummingboard-iiot-panel-lvds-WF70A8SYJHLNGA.dtso | 105 +++
.../imx8mp-hummingboard-iiot-rs485-a.dtso | 18 +
.../imx8mp-hummingboard-iiot-rs485-b.dtso | 18 +
.../dts/freescale/imx8mp-hummingboard-iiot.dts | 713 +++++++++++++++++
.../imx8mp-hummingboard-pulse-common.dtsi | 2 +-
.../imx8mp-hummingboard-pulse-mini-hdmi.dtsi | 11 +-
drivers/input/touchscreen/ilitek_ts_i2c.c | 8 +-
14 files changed, 2540 insertions(+), 13 deletions(-)
---
base-commit: 45a477d545205afbb4753a4a3371a16136ded2d1
change-id: 20251026-imx8mp-hb-iiot-525b03beea62
Best regards,
--
Josua Mayer <josua@solid-run.com>
^ permalink raw reply
* [PATCH v4 2/8] Input: ilitek_ts_i2c: fix warning with gpio controllers that sleep
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
The ilitek touchscreen driver uses the non-sleeping gpiod_set_value
function for reset.
Switch to using gpiod_set_value_cansleep() when controlling reset_gpio to
support GPIO providers that may sleep, such as I2C GPIO expanders.
Further switch the mdelay calls on the reset path to fsleep (preferred
in non-atomic contexts).
This fixes noisy complaints in kernel log for gpio providers that do
sleep.
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
drivers/input/touchscreen/ilitek_ts_i2c.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
index 0dd632724a003..10e5530d6a5d0 100644
--- a/drivers/input/touchscreen/ilitek_ts_i2c.c
+++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
@@ -396,10 +396,10 @@ static const struct ilitek_protocol_map ptl_func_map[] = {
static void ilitek_reset(struct ilitek_ts_data *ts, int delay)
{
if (ts->reset_gpio) {
- gpiod_set_value(ts->reset_gpio, 1);
- mdelay(10);
- gpiod_set_value(ts->reset_gpio, 0);
- mdelay(delay);
+ gpiod_set_value_cansleep(ts->reset_gpio, 1);
+ fsleep(10000);
+ gpiod_set_value_cansleep(ts->reset_gpio, 0);
+ fsleep(delay * 1000);
}
}
--
2.51.0
^ permalink raw reply related
* [PATCH v4 1/8] dt-bindings: arm: fsl: Add various solidrun i.mx8m boards
From: Josua Mayer @ 2025-12-01 13:07 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Dmitry Torokhov, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Jon Nettleton, Mikhail Anikin, Yazan Shhady, devicetree,
linux-kernel, linux-input, imx, linux-arm-kernel, Josua Mayer,
Krzysztof Kozlowski
In-Reply-To: <20251201-imx8mp-hb-iiot-v4-0-53a4cd6c21bf@solid-run.com>
Add bindings for various SolidRun boards:
- i.MX8MP HummingBoard IIoT - based on the SolidRun i.MX8M Plus SoM
- SolidSense N8 - single-board design with i.MX8M Nano
- i.MX8M Mini System on Module
- i.MX8M Mini HummingBoard Ripple
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
Documentation/devicetree/bindings/arm/fsl.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 00cdf490b0620..f70b933ce3746 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -1041,6 +1041,13 @@ properties:
- const: phytec,imx8mm-phycore-som # phyCORE-i.MX8MM SoM
- const: fsl,imx8mm
+ - description: SolidRun i.MX8MM SoM based boards
+ items:
+ - enum:
+ - solidrun,imx8mm-hummingboard-ripple # SolidRun i.MX8MM SoM on HummingBoard Ripple
+ - const: solidrun,imx8mm-sr-som
+ - const: fsl,imx8mm
+
- description: Variscite VAR-SOM-MX8MM based boards
items:
- const: variscite,var-som-mx8mm-symphony
@@ -1069,6 +1076,7 @@ properties:
- fsl,imx8mn-ddr4-evk # i.MX8MN DDR4 EVK Board
- fsl,imx8mn-evk # i.MX8MN LPDDR4 EVK Board
- gw,imx8mn-gw7902 # i.MX8MM Gateworks Board
+ - solidrun,solidsense-n8-compact # SolidRun SolidSense N8 Compact
- const: fsl,imx8mn
- description: Variscite VAR-SOM-MX8MN based boards
@@ -1205,6 +1213,7 @@ properties:
items:
- enum:
- solidrun,imx8mp-cubox-m # SolidRun i.MX8MP SoM on CuBox-M
+ - solidrun,imx8mp-hummingboard-iiot # SolidRun i.MX8MP SoM on HummingBoard IIoT
- solidrun,imx8mp-hummingboard-mate # SolidRun i.MX8MP SoM on HummingBoard Mate
- solidrun,imx8mp-hummingboard-pro # SolidRun i.MX8MP SoM on HummingBoard Pro
- solidrun,imx8mp-hummingboard-pulse # SolidRun i.MX8MP SoM on HummingBoard Pulse
--
2.51.0
^ permalink raw reply related
* Re: [PATCH v3 04/11] Input: ilitek_ts_i2c: fix warning with gpio controllers that sleep
From: Josua Mayer @ 2025-12-01 12:38 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Neil Armstrong, Jessica Zhang, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Laurent Pinchart,
Lad Prabhakar, Thierry Reding, Jon Nettleton, Mikhail Anikin,
Yazan Shhady, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-input@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <rifyic7w2zyjupbmzwcewcslryqiyexxdvbgcuxtkw3trmtulw@y4otarfyvgm7>
Am 18.11.25 um 20:22 schrieb Dmitry Torokhov:
> Hi Josua,
>
> On Mon, Nov 17, 2025 at 01:28:46PM +0100, Josua Mayer wrote:
>> The ilitek touchscreen driver uses the non-sleeping gpiod_set_value
>> function for reset.
>>
>> Switch to using gpiod_set_value_cansleep() when controlling reset_gpio to
>> support GPIO providers that may sleep, such as I2C GPIO expanders.
>>
>> This fixes noisy complaints in kernel log for gpio providers that do
>> sleep.
>>
>> Signed-off-by: Josua Mayer <josua@solid-run.com>
>> ---
>> drivers/input/touchscreen/ilitek_ts_i2c.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c
>> index 0dd632724a003..8c5a54b336816 100644
>> --- a/drivers/input/touchscreen/ilitek_ts_i2c.c
>> +++ b/drivers/input/touchscreen/ilitek_ts_i2c.c
>> @@ -396,9 +396,9 @@ static const struct ilitek_protocol_map ptl_func_map[] = {
>> static void ilitek_reset(struct ilitek_ts_data *ts, int delay)
>> {
>> if (ts->reset_gpio) {
>> - gpiod_set_value(ts->reset_gpio, 1);
>> + gpiod_set_value_cansleep(ts->reset_gpio, 1);
>> mdelay(10);
> This (and below) should be usleep_range/msleep/fsleep.
True ....
So I will change it since I am areadly changing the code next to it.
>
>> - gpiod_set_value(ts->reset_gpio, 0);
>> + gpiod_set_value_cansleep(ts->reset_gpio, 0);
>> mdelay(delay);
>> }
>> }
>>
> Thanks.
>
^ permalink raw reply
* Re: [PATCH v10 10/11] platform/x86: asus-wmi: add keyboard brightness event handler
From: Antheas Kapenekakis @ 2025-12-01 11:44 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Denis Benato, platform-driver-x86, linux-input, LKML, Jiri Kosina,
Benjamin Tissoires, Corentin Chary, Luke D . Jones, Hans de Goede
In-Reply-To: <4c24cacf-a1e0-186d-5e44-c6772e32ffc2@linux.intel.com>
On Mon, 1 Dec 2025 at 10:52, Ilpo Järvinen
<ilpo.jarvinen@linux.intel.com> wrote:
>
> On Mon, 1 Dec 2025, Antheas Kapenekakis wrote:
> > On Wed, 26 Nov 2025 at 21:39, Antheas Kapenekakis <lkml@antheas.dev> wrote:
> > > On Wed, 26 Nov 2025 at 21:23, Denis Benato <benato.denis96@gmail.com> wrote:
> > > > On 11/22/25 12:00, Antheas Kapenekakis wrote:
> > > > > The keyboard brightness control of Asus WMI keyboards is handled in
> > > > > kernel, which leads to the shortcut going from brightness 0, to 1,
> > > > > to 2, and 3.
> > > > >
> > > > > However, for HID keyboards it is exposed as a key and handled by the
> > > > > user's desktop environment. For the toggle button, this means that
> > > > > brightness control becomes on/off. In addition, in the absence of a
> > > > > DE, the keyboard brightness does not work.
> > > > >
> > > > > Therefore, expose an event handler for the keyboard brightness control
> > > > > which can then be used by hid-asus. Since this handler is called from
> > > > > an interrupt context, defer the actual work to a workqueue.
> > > > >
> > > > > In the process, introduce ASUS_EV_MAX_BRIGHTNESS to hold the constant
> > > > > for maximum brightness since it is shared between hid-asus/asus-wmi.
> > > > >
> > > > > Reviewed-by: Luke D. Jones <luke@ljones.dev>
> > > > > Tested-by: Luke D. Jones <luke@ljones.dev>
> > > > > Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> > > > > ---
> > > > > drivers/platform/x86/asus-wmi.c | 46 +++++++++++++++++++---
> > > > > include/linux/platform_data/x86/asus-wmi.h | 13 ++++++
> > > > > 2 files changed, 54 insertions(+), 5 deletions(-)
> > > > >
> > > > > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> > > > > index 84cde34ab6a8..a69464e45ca4 100644
> > > > > --- a/drivers/platform/x86/asus-wmi.c
> > > > > +++ b/drivers/platform/x86/asus-wmi.c
> > > > > @@ -1719,6 +1719,44 @@ static void kbd_led_update_all(struct work_struct *work)
> > > > > }
> > > > > }
> > > > >
> > > > > +/*
> > > > > + * This function is called from hid-asus to inform asus-wmi of brightness
> > > > > + * changes initiated by the keyboard backlight keys.
> > > > > + */
> > > > > +int asus_hid_event(enum asus_hid_event event)
> > > > > +{
> > > > > + struct asus_wmi *asus;
> > > > > + int brightness;
> > > > > +
> > > > > + guard(spinlock_irqsave)(&asus_ref.lock);
> > > > > + asus = asus_ref.asus;
> > > > > + if (!asus || !asus->kbd_led_registered)
> > > > > + return -EBUSY;
> > > > > +
> > > > > + brightness = asus->kbd_led_wk;
> > > > > +
> > > > > + switch (event) {
> > > > > + case ASUS_EV_BRTUP:
> > > > > + brightness += 1;
> > > > > + break;
> > > > > + case ASUS_EV_BRTDOWN:
> > > > > + brightness -= 1;
> > > > > + break;
> > > > > + case ASUS_EV_BRTTOGGLE:
> > > > > + if (brightness >= ASUS_EV_MAX_BRIGHTNESS)
> > > > > + brightness = 0;
> > > > > + else
> > > > > + brightness += 1;
> > > > > + break;
> > > > > + }
> > > > > +
> > > > > + asus->kbd_led_wk = clamp_val(brightness, 0, ASUS_EV_MAX_BRIGHTNESS);
> > > > > + asus->kbd_led_notify = true;
> > > > > + queue_work(asus->led_workqueue, &asus->kbd_led_work);
> > > > > + return 0;
> > > > > +}
> > > > > +EXPORT_SYMBOL_GPL(asus_hid_event);
> > > > > +
> > > > > /*
> > > > > * These functions actually update the LED's, and are called from a
> > > > LEDs as opposed to LED's?
> > >
> > > I agree with you, but the author of that line probably wouldn't -
> > > depends on author dialect and both are usually correct.
> > >
> > > When making acronyms plural, adding a ' is usually accepted as
> > > correct. But this is not added as part of this series, so you can do a
> > > reword commit if you wish
> > >
> > > Antheas
> >
> > Hm, perhaps this was not clear but the part you commented on was not
> > part of the patch/this series. Do you want to finish reviewing this
> > patch and add a rev-by?
> >
> > @Ilpo: with 6.18 releasing yesterday, what is the status on this? is
> > it for 6.20? Hans commented on patch 5
>
> It will have to wait to the 6.20 cycle as it's cross-subsystem series so
> there are other maintainers involved than just me.
Unfortunate. Jiri is cc'd on this series and we had around 2 weeks
where the code was frozen. Was it my responsibility to ask for acks so
it can go through x86?
> --
> i.
>
> > Thanks,
> > Antheas
> >
> > > > > * workqueue. By doing this as separate work rather than when the LED
> > > > > @@ -1801,13 +1839,11 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value)
> > > > > {
> > > > > struct asus_hid_listener *listener;
> > > > > struct asus_wmi *asus;
> > > > > - int max_level;
> > > > >
> > > > > asus = container_of(led_cdev, struct asus_wmi, kbd_led);
> > > > > - max_level = asus->kbd_led.max_brightness;
> > > > >
> > > > > scoped_guard(spinlock_irqsave, &asus_ref.lock)
> > > > > - asus->kbd_led_wk = clamp_val(value, 0, max_level);
> > > > > + asus->kbd_led_wk = clamp_val(value, 0, ASUS_EV_MAX_BRIGHTNESS);
> > > > >
> > > > > if (asus->kbd_led_avail)
> > > > > kbd_led_update(asus);
> > > > > @@ -2011,7 +2047,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
> > > > > asus->kbd_led.flags = LED_BRIGHT_HW_CHANGED;
> > > > > asus->kbd_led.brightness_set = kbd_led_set;
> > > > > asus->kbd_led.brightness_get = kbd_led_get;
> > > > > - asus->kbd_led.max_brightness = 3;
> > > > > + asus->kbd_led.max_brightness = ASUS_EV_MAX_BRIGHTNESS;
> > > > > asus->kbd_led_avail = !kbd_led_read(asus, &led_val, NULL);
> > > > > INIT_WORK(&asus->kbd_led_work, kbd_led_update_all);
> > > > >
> > > > > @@ -4530,7 +4566,7 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
> > > > > return;
> > > > > }
> > > > > if (code == NOTIFY_KBD_BRTTOGGLE) {
> > > > > - if (led_value == asus->kbd_led.max_brightness)
> > > > > + if (led_value == ASUS_EV_MAX_BRIGHTNESS)
> > > > > kbd_led_set_by_kbd(asus, 0);
> > > > > else
> > > > > kbd_led_set_by_kbd(asus, led_value + 1);
> > > > > diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
> > > > > index d347cffd05d5..7b872b5d0960 100644
> > > > > --- a/include/linux/platform_data/x86/asus-wmi.h
> > > > > +++ b/include/linux/platform_data/x86/asus-wmi.h
> > > > > @@ -178,6 +178,14 @@ struct asus_hid_listener {
> > > > > void (*brightness_set)(struct asus_hid_listener *listener, int brightness);
> > > > > };
> > > > >
> > > > > +enum asus_hid_event {
> > > > > + ASUS_EV_BRTUP,
> > > > > + ASUS_EV_BRTDOWN,
> > > > > + ASUS_EV_BRTTOGGLE,
> > > > > +};
> > > > > +
> > > > > +#define ASUS_EV_MAX_BRIGHTNESS 3
> > > > > +
> > > > > #if IS_REACHABLE(CONFIG_ASUS_WMI)
> > > > > void set_ally_mcu_hack(enum asus_ally_mcu_hack status);
> > > > > void set_ally_mcu_powersave(bool enabled);
> > > > > @@ -186,6 +194,7 @@ int asus_wmi_set_devstate(u32 dev_id, u32 ctrl_param, u32 *retval);
> > > > > int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval);
> > > > > int asus_hid_register_listener(struct asus_hid_listener *cdev);
> > > > > void asus_hid_unregister_listener(struct asus_hid_listener *cdev);
> > > > > +int asus_hid_event(enum asus_hid_event event);
> > > > > #else
> > > > > static inline void set_ally_mcu_hack(enum asus_ally_mcu_hack status)
> > > > > {
> > > > > @@ -213,6 +222,10 @@ static inline int asus_hid_register_listener(struct asus_hid_listener *bdev)
> > > > > static inline void asus_hid_unregister_listener(struct asus_hid_listener *bdev)
> > > > > {
> > > > > }
> > > > > +static inline int asus_hid_event(enum asus_hid_event event)
> > > > > +{
> > > > > + return -ENODEV;
> > > > > +}
> > > > > #endif
> > > > >
> > > > > #endif /* __PLATFORM_DATA_X86_ASUS_WMI_H */
> > > >
> >
>
^ permalink raw reply
* [PATCH] iio: inkern: Use namespaced exports
From: Romain Gantois @ 2025-12-01 10:59 UTC (permalink / raw)
To: MyungJoo Ham, Chanwoo Choi, Guenter Roeck, Peter Rosin,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Lars-Peter Clausen, Michael Hennerich, Mariel Tinaco, Kevin Tsai,
Linus Walleij, Dmitry Torokhov, Eugen Hristev, Vinod Koul,
Kishon Vijay Abraham I, Sebastian Reichel, Chen-Yu Tsai,
Hans de Goede, Support Opensource, Paul Cercueil, Iskren Chernev,
Krzysztof Kozlowski, Marek Szyprowski, Matheus Castello,
Saravanan Sekar, Matthias Brugger, AngeloGioacchino Del Regno,
Casey Connolly, Pali Rohár, Orson Zhai, Baolin Wang,
Chunyan Zhang, Amit Kucheria, Thara Gopinath, Rafael J. Wysocki,
Daniel Lezcano, Zhang Rui, Lukasz Luba, Claudiu Beznea,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Sylwester Nawrocki, Olivier Moysan, Arnaud Pouliquen,
Maxime Coquelin, Alexandre Torgue
Cc: Thomas Petazzoni, linux-kernel, linux-hwmon, linux-iio,
linux-input, linux-phy, linux-pm, linux-mips, linux-mediatek,
linux-arm-msm, linux-sound, linux-stm32, Romain Gantois
Use namespaced exports for IIO consumer API functions.
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
---
drivers/extcon/extcon-adc-jack.c | 1 +
drivers/hwmon/iio_hwmon.c | 1 +
drivers/hwmon/ntc_thermistor.c | 1 +
drivers/iio/adc/envelope-detector.c | 1 +
drivers/iio/afe/iio-rescale.c | 1 +
drivers/iio/buffer/industrialio-buffer-cb.c | 1 +
drivers/iio/buffer/industrialio-hw-consumer.c | 1 +
drivers/iio/dac/ad8460.c | 1 +
drivers/iio/dac/dpot-dac.c | 1 +
drivers/iio/dac/ds4424.c | 2 +-
drivers/iio/inkern.c | 54 ++++++++++++-------------
drivers/iio/light/cm3605.c | 1 +
drivers/iio/light/gp2ap002.c | 1 +
drivers/iio/multiplexer/iio-mux.c | 1 +
drivers/iio/potentiostat/lmp91000.c | 1 +
drivers/input/joystick/adc-joystick.c | 1 +
drivers/input/keyboard/adc-keys.c | 1 +
drivers/input/touchscreen/colibri-vf50-ts.c | 1 +
drivers/input/touchscreen/resistive-adc-touch.c | 1 +
drivers/phy/motorola/phy-cpcap-usb.c | 1 +
drivers/power/supply/ab8500_btemp.c | 1 +
drivers/power/supply/ab8500_charger.c | 1 +
drivers/power/supply/ab8500_fg.c | 1 +
drivers/power/supply/axp20x_ac_power.c | 1 +
drivers/power/supply/axp20x_battery.c | 1 +
drivers/power/supply/axp20x_usb_power.c | 1 +
drivers/power/supply/axp288_fuel_gauge.c | 1 +
drivers/power/supply/cpcap-battery.c | 1 +
drivers/power/supply/cpcap-charger.c | 1 +
drivers/power/supply/da9150-charger.c | 1 +
drivers/power/supply/generic-adc-battery.c | 1 +
drivers/power/supply/ingenic-battery.c | 1 +
drivers/power/supply/intel_dc_ti_battery.c | 1 +
drivers/power/supply/lego_ev3_battery.c | 1 +
drivers/power/supply/lp8788-charger.c | 1 +
drivers/power/supply/max17040_battery.c | 1 +
drivers/power/supply/mp2629_charger.c | 1 +
drivers/power/supply/mt6370-charger.c | 1 +
drivers/power/supply/qcom_smbx.c | 1 +
drivers/power/supply/rn5t618_power.c | 1 +
drivers/power/supply/rx51_battery.c | 1 +
drivers/power/supply/sc27xx_fuel_gauge.c | 1 +
drivers/power/supply/twl4030_charger.c | 1 +
drivers/power/supply/twl4030_madc_battery.c | 1 +
drivers/power/supply/twl6030_charger.c | 1 +
drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 1 +
drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 1 +
drivers/thermal/renesas/rzg3s_thermal.c | 1 +
drivers/thermal/thermal-generic-adc.c | 1 +
sound/soc/codecs/audio-iio-aux.c | 1 +
sound/soc/samsung/aries_wm8994.c | 1 +
sound/soc/samsung/midas_wm1811.c | 1 +
sound/soc/stm/stm32_adfsdm.c | 1 +
53 files changed, 79 insertions(+), 28 deletions(-)
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
index 7e3c9f38297b..e735f43dcdeb 100644
--- a/drivers/extcon/extcon-adc-jack.c
+++ b/drivers/extcon/extcon-adc-jack.c
@@ -210,3 +210,4 @@ module_platform_driver(adc_jack_driver);
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
MODULE_DESCRIPTION("ADC Jack extcon driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c
index e376d4cde5ad..4c7843fbcc50 100644
--- a/drivers/hwmon/iio_hwmon.c
+++ b/drivers/hwmon/iio_hwmon.c
@@ -222,3 +222,4 @@ module_platform_driver(iio_hwmon_driver);
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
MODULE_DESCRIPTION("IIO to hwmon driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index d21f7266c411..417807fad80b 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -706,3 +706,4 @@ MODULE_DESCRIPTION("NTC Thermistor Driver");
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:ntc-thermistor");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/adc/envelope-detector.c b/drivers/iio/adc/envelope-detector.c
index 5b16fe737659..fea20e7e6cd9 100644
--- a/drivers/iio/adc/envelope-detector.c
+++ b/drivers/iio/adc/envelope-detector.c
@@ -406,3 +406,4 @@ module_platform_driver(envelope_detector_driver);
MODULE_DESCRIPTION("Envelope detector using a DAC and a comparator");
MODULE_AUTHOR("Peter Rosin <peda@axentia.se>");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c
index ecaf59278c6f..d7f55109af3e 100644
--- a/drivers/iio/afe/iio-rescale.c
+++ b/drivers/iio/afe/iio-rescale.c
@@ -609,3 +609,4 @@ module_platform_driver(rescale_driver);
MODULE_DESCRIPTION("IIO rescale driver");
MODULE_AUTHOR("Peter Rosin <peda@axentia.se>");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/buffer/industrialio-buffer-cb.c b/drivers/iio/buffer/industrialio-buffer-cb.c
index 3e27385069ed..608ea9afc15a 100644
--- a/drivers/iio/buffer/industrialio-buffer-cb.c
+++ b/drivers/iio/buffer/industrialio-buffer-cb.c
@@ -153,3 +153,4 @@ EXPORT_SYMBOL_GPL(iio_channel_cb_get_iio_dev);
MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
MODULE_DESCRIPTION("Industrial I/O callback buffer");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/buffer/industrialio-hw-consumer.c b/drivers/iio/buffer/industrialio-hw-consumer.c
index 526b2a8d725d..d7ff086ed783 100644
--- a/drivers/iio/buffer/industrialio-hw-consumer.c
+++ b/drivers/iio/buffer/industrialio-hw-consumer.c
@@ -211,3 +211,4 @@ EXPORT_SYMBOL_GPL(iio_hw_consumer_disable);
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_DESCRIPTION("Hardware consumer buffer the IIO framework");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/dac/ad8460.c b/drivers/iio/dac/ad8460.c
index 6e45686902dd..ad654819ca22 100644
--- a/drivers/iio/dac/ad8460.c
+++ b/drivers/iio/dac/ad8460.c
@@ -955,3 +955,4 @@ MODULE_AUTHOR("Mariel Tinaco <mariel.tinaco@analog.com");
MODULE_DESCRIPTION("AD8460 DAC driver");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("IIO_DMAENGINE_BUFFER");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/dac/dpot-dac.c b/drivers/iio/dac/dpot-dac.c
index d1b8441051ae..49dbdb7df955 100644
--- a/drivers/iio/dac/dpot-dac.c
+++ b/drivers/iio/dac/dpot-dac.c
@@ -254,3 +254,4 @@ module_platform_driver(dpot_dac_driver);
MODULE_DESCRIPTION("DAC emulation driver using a digital potentiometer");
MODULE_AUTHOR("Peter Rosin <peda@axentia.se>");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c
index a8198ba4f98a..33d6692f46fe 100644
--- a/drivers/iio/dac/ds4424.c
+++ b/drivers/iio/dac/ds4424.c
@@ -14,7 +14,6 @@
#include <linux/iio/iio.h>
#include <linux/iio/driver.h>
#include <linux/iio/machine.h>
-#include <linux/iio/consumer.h>
#define DS4422_MAX_DAC_CHANNELS 2
#define DS4424_MAX_DAC_CHANNELS 4
@@ -321,3 +320,4 @@ MODULE_AUTHOR("Ismail H. Kose <ismail.kose@maximintegrated.com>");
MODULE_AUTHOR("Vishal Sood <vishal.sood@maximintegrated.com>");
MODULE_AUTHOR("David Jung <david.jung@maximintegrated.com>");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 1e5eb5a41271..c75c3a8d233f 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -281,7 +281,7 @@ struct iio_channel *fwnode_iio_channel_get_by_name(struct fwnode_handle *fwnode,
return ERR_PTR(-ENODEV);
}
-EXPORT_SYMBOL_GPL(fwnode_iio_channel_get_by_name);
+EXPORT_SYMBOL_NS_GPL(fwnode_iio_channel_get_by_name, "IIO_CONSUMER");
static struct iio_channel *fwnode_iio_channel_get_all(struct device *dev)
{
@@ -386,7 +386,7 @@ struct iio_channel *iio_channel_get(struct device *dev,
return iio_channel_get_sys(name, channel_name);
}
-EXPORT_SYMBOL_GPL(iio_channel_get);
+EXPORT_SYMBOL_NS_GPL(iio_channel_get, "IIO_CONSUMER");
void iio_channel_release(struct iio_channel *channel)
{
@@ -395,7 +395,7 @@ void iio_channel_release(struct iio_channel *channel)
iio_device_put(channel->indio_dev);
kfree(channel);
}
-EXPORT_SYMBOL_GPL(iio_channel_release);
+EXPORT_SYMBOL_NS_GPL(iio_channel_release, "IIO_CONSUMER");
static void devm_iio_channel_free(void *iio_channel)
{
@@ -418,7 +418,7 @@ struct iio_channel *devm_iio_channel_get(struct device *dev,
return channel;
}
-EXPORT_SYMBOL_GPL(devm_iio_channel_get);
+EXPORT_SYMBOL_NS_GPL(devm_iio_channel_get, "IIO_CONSUMER");
struct iio_channel *devm_fwnode_iio_channel_get_by_name(struct device *dev,
struct fwnode_handle *fwnode,
@@ -437,7 +437,7 @@ struct iio_channel *devm_fwnode_iio_channel_get_by_name(struct device *dev,
return channel;
}
-EXPORT_SYMBOL_GPL(devm_fwnode_iio_channel_get_by_name);
+EXPORT_SYMBOL_NS_GPL(devm_fwnode_iio_channel_get_by_name, "IIO_CONSUMER");
struct iio_channel *iio_channel_get_all(struct device *dev)
{
@@ -506,7 +506,7 @@ struct iio_channel *iio_channel_get_all(struct device *dev)
iio_device_put(chans[i].indio_dev);
return ERR_PTR(ret);
}
-EXPORT_SYMBOL_GPL(iio_channel_get_all);
+EXPORT_SYMBOL_NS_GPL(iio_channel_get_all, "IIO_CONSUMER");
void iio_channel_release_all(struct iio_channel *channels)
{
@@ -518,7 +518,7 @@ void iio_channel_release_all(struct iio_channel *channels)
}
kfree(channels);
}
-EXPORT_SYMBOL_GPL(iio_channel_release_all);
+EXPORT_SYMBOL_NS_GPL(iio_channel_release_all, "IIO_CONSUMER");
static void devm_iio_channel_free_all(void *iio_channels)
{
@@ -541,7 +541,7 @@ struct iio_channel *devm_iio_channel_get_all(struct device *dev)
return channels;
}
-EXPORT_SYMBOL_GPL(devm_iio_channel_get_all);
+EXPORT_SYMBOL_NS_GPL(devm_iio_channel_get_all, "IIO_CONSUMER");
static int iio_channel_read(struct iio_channel *chan, int *val, int *val2,
enum iio_chan_info_enum info)
@@ -585,7 +585,7 @@ int iio_read_channel_raw(struct iio_channel *chan, int *val)
return iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_RAW);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_raw);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_raw, "IIO_CONSUMER");
int iio_read_channel_average_raw(struct iio_channel *chan, int *val)
{
@@ -597,7 +597,7 @@ int iio_read_channel_average_raw(struct iio_channel *chan, int *val)
return iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_AVERAGE_RAW);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_average_raw);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_average_raw, "IIO_CONSUMER");
int iio_multiply_value(int *result, s64 multiplier,
unsigned int type, int val, int val2)
@@ -701,7 +701,7 @@ int iio_convert_raw_to_processed(struct iio_channel *chan, int raw,
return iio_convert_raw_to_processed_unlocked(chan, raw, processed,
scale);
}
-EXPORT_SYMBOL_GPL(iio_convert_raw_to_processed);
+EXPORT_SYMBOL_NS_GPL(iio_convert_raw_to_processed, "IIO_CONSUMER");
int iio_read_channel_attribute(struct iio_channel *chan, int *val, int *val2,
enum iio_chan_info_enum attribute)
@@ -714,13 +714,13 @@ int iio_read_channel_attribute(struct iio_channel *chan, int *val, int *val2,
return iio_channel_read(chan, val, val2, attribute);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_attribute);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_attribute, "IIO_CONSUMER");
int iio_read_channel_offset(struct iio_channel *chan, int *val, int *val2)
{
return iio_read_channel_attribute(chan, val, val2, IIO_CHAN_INFO_OFFSET);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_offset);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_offset, "IIO_CONSUMER");
int iio_read_channel_processed_scale(struct iio_channel *chan, int *val,
unsigned int scale)
@@ -748,20 +748,20 @@ int iio_read_channel_processed_scale(struct iio_channel *chan, int *val,
scale);
}
}
-EXPORT_SYMBOL_GPL(iio_read_channel_processed_scale);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_processed_scale, "IIO_CONSUMER");
int iio_read_channel_processed(struct iio_channel *chan, int *val)
{
/* This is just a special case with scale factor 1 */
return iio_read_channel_processed_scale(chan, val, 1);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_processed);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_processed, "IIO_CONSUMER");
int iio_read_channel_scale(struct iio_channel *chan, int *val, int *val2)
{
return iio_read_channel_attribute(chan, val, val2, IIO_CHAN_INFO_SCALE);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_scale);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_scale, "IIO_CONSUMER");
static int iio_channel_read_avail(struct iio_channel *chan,
const int **vals, int *type, int *length,
@@ -790,7 +790,7 @@ int iio_read_avail_channel_attribute(struct iio_channel *chan,
return iio_channel_read_avail(chan, vals, type, length, attribute);
}
-EXPORT_SYMBOL_GPL(iio_read_avail_channel_attribute);
+EXPORT_SYMBOL_NS_GPL(iio_read_avail_channel_attribute, "IIO_CONSUMER");
int iio_read_avail_channel_raw(struct iio_channel *chan,
const int **vals, int *length)
@@ -807,7 +807,7 @@ int iio_read_avail_channel_raw(struct iio_channel *chan,
return ret;
}
-EXPORT_SYMBOL_GPL(iio_read_avail_channel_raw);
+EXPORT_SYMBOL_NS_GPL(iio_read_avail_channel_raw, "IIO_CONSUMER");
static int iio_channel_read_max(struct iio_channel *chan,
int *val, int *val2, int *type,
@@ -863,7 +863,7 @@ int iio_read_max_channel_raw(struct iio_channel *chan, int *val)
return iio_channel_read_max(chan, val, NULL, &type, IIO_CHAN_INFO_RAW);
}
-EXPORT_SYMBOL_GPL(iio_read_max_channel_raw);
+EXPORT_SYMBOL_NS_GPL(iio_read_max_channel_raw, "IIO_CONSUMER");
static int iio_channel_read_min(struct iio_channel *chan,
int *val, int *val2, int *type,
@@ -919,7 +919,7 @@ int iio_read_min_channel_raw(struct iio_channel *chan, int *val)
return iio_channel_read_min(chan, val, NULL, &type, IIO_CHAN_INFO_RAW);
}
-EXPORT_SYMBOL_GPL(iio_read_min_channel_raw);
+EXPORT_SYMBOL_NS_GPL(iio_read_min_channel_raw, "IIO_CONSUMER");
int iio_get_channel_type(struct iio_channel *chan, enum iio_chan_type *type)
{
@@ -933,7 +933,7 @@ int iio_get_channel_type(struct iio_channel *chan, enum iio_chan_type *type)
return 0;
}
-EXPORT_SYMBOL_GPL(iio_get_channel_type);
+EXPORT_SYMBOL_NS_GPL(iio_get_channel_type, "IIO_CONSUMER");
static int iio_channel_write(struct iio_channel *chan, int val, int val2,
enum iio_chan_info_enum info)
@@ -957,13 +957,13 @@ int iio_write_channel_attribute(struct iio_channel *chan, int val, int val2,
return iio_channel_write(chan, val, val2, attribute);
}
-EXPORT_SYMBOL_GPL(iio_write_channel_attribute);
+EXPORT_SYMBOL_NS_GPL(iio_write_channel_attribute, "IIO_CONSUMER");
int iio_write_channel_raw(struct iio_channel *chan, int val)
{
return iio_write_channel_attribute(chan, val, 0, IIO_CHAN_INFO_RAW);
}
-EXPORT_SYMBOL_GPL(iio_write_channel_raw);
+EXPORT_SYMBOL_NS_GPL(iio_write_channel_raw, "IIO_CONSUMER");
unsigned int iio_get_channel_ext_info_count(struct iio_channel *chan)
{
@@ -978,7 +978,7 @@ unsigned int iio_get_channel_ext_info_count(struct iio_channel *chan)
return i;
}
-EXPORT_SYMBOL_GPL(iio_get_channel_ext_info_count);
+EXPORT_SYMBOL_NS_GPL(iio_get_channel_ext_info_count, "IIO_CONSUMER");
static const struct iio_chan_spec_ext_info *
iio_lookup_ext_info(const struct iio_channel *chan, const char *attr)
@@ -1013,7 +1013,7 @@ ssize_t iio_read_channel_ext_info(struct iio_channel *chan,
return ext_info->read(chan->indio_dev, ext_info->private,
chan->channel, buf);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_ext_info);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_ext_info, "IIO_CONSUMER");
ssize_t iio_write_channel_ext_info(struct iio_channel *chan, const char *attr,
const char *buf, size_t len)
@@ -1027,7 +1027,7 @@ ssize_t iio_write_channel_ext_info(struct iio_channel *chan, const char *attr,
return ext_info->write(chan->indio_dev, ext_info->private,
chan->channel, buf, len);
}
-EXPORT_SYMBOL_GPL(iio_write_channel_ext_info);
+EXPORT_SYMBOL_NS_GPL(iio_write_channel_ext_info, "IIO_CONSUMER");
ssize_t iio_read_channel_label(struct iio_channel *chan, char *buf)
{
@@ -1038,4 +1038,4 @@ ssize_t iio_read_channel_label(struct iio_channel *chan, char *buf)
return do_iio_read_channel_label(chan->indio_dev, chan->channel, buf);
}
-EXPORT_SYMBOL_GPL(iio_read_channel_label);
+EXPORT_SYMBOL_NS_GPL(iio_read_channel_label, "IIO_CONSUMER");
diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c
index 0c17378e27d1..1bd11292d005 100644
--- a/drivers/iio/light/cm3605.c
+++ b/drivers/iio/light/cm3605.c
@@ -325,3 +325,4 @@ module_platform_driver(cm3605_driver);
MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
MODULE_DESCRIPTION("CM3605 ambient light and proximity sensor driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/light/gp2ap002.c b/drivers/iio/light/gp2ap002.c
index a0d8a58f2704..04b1f6eade0e 100644
--- a/drivers/iio/light/gp2ap002.c
+++ b/drivers/iio/light/gp2ap002.c
@@ -717,3 +717,4 @@ module_i2c_driver(gp2ap002_driver);
MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
MODULE_DESCRIPTION("GP2AP002 ambient light and proximity sensor driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/multiplexer/iio-mux.c b/drivers/iio/multiplexer/iio-mux.c
index b742ca9a99d1..e193913f5af7 100644
--- a/drivers/iio/multiplexer/iio-mux.c
+++ b/drivers/iio/multiplexer/iio-mux.c
@@ -464,3 +464,4 @@ module_platform_driver(mux_driver);
MODULE_DESCRIPTION("IIO multiplexer driver");
MODULE_AUTHOR("Peter Rosin <peda@axentia.se>");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index eccc2a34358f..7d993f2acda4 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -423,3 +423,4 @@ module_i2c_driver(lmp91000_driver);
MODULE_AUTHOR("Matt Ranostay <matt.ranostay@konsulko.com>");
MODULE_DESCRIPTION("LMP91000 digital potentiostat");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/input/joystick/adc-joystick.c b/drivers/input/joystick/adc-joystick.c
index ff44f9978b71..4fa42f88bcfa 100644
--- a/drivers/input/joystick/adc-joystick.c
+++ b/drivers/input/joystick/adc-joystick.c
@@ -329,3 +329,4 @@ module_platform_driver(adc_joystick_driver);
MODULE_DESCRIPTION("Input driver for joysticks connected over ADC");
MODULE_AUTHOR("Artur Rojek <contact@artur-rojek.eu>");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/input/keyboard/adc-keys.c b/drivers/input/keyboard/adc-keys.c
index f1753207429d..d687459a0c80 100644
--- a/drivers/input/keyboard/adc-keys.c
+++ b/drivers/input/keyboard/adc-keys.c
@@ -202,3 +202,4 @@ module_platform_driver(adc_keys_driver);
MODULE_AUTHOR("Alexandre Belloni <alexandre.belloni@free-electrons.com>");
MODULE_DESCRIPTION("Input driver for resistor ladder connected on ADC");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/input/touchscreen/colibri-vf50-ts.c b/drivers/input/touchscreen/colibri-vf50-ts.c
index 98d5b2ba63fb..89c4d7b2b89e 100644
--- a/drivers/input/touchscreen/colibri-vf50-ts.c
+++ b/drivers/input/touchscreen/colibri-vf50-ts.c
@@ -372,3 +372,4 @@ module_platform_driver(vf50_touch_driver);
MODULE_AUTHOR("Sanchayan Maity");
MODULE_DESCRIPTION("Colibri VF50 Touchscreen driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/input/touchscreen/resistive-adc-touch.c b/drivers/input/touchscreen/resistive-adc-touch.c
index 7e761ec73273..2fefd652864c 100644
--- a/drivers/input/touchscreen/resistive-adc-touch.c
+++ b/drivers/input/touchscreen/resistive-adc-touch.c
@@ -301,3 +301,4 @@ module_platform_driver(grts_driver);
MODULE_AUTHOR("Eugen Hristev <eugen.hristev@microchip.com>");
MODULE_DESCRIPTION("Generic ADC Resistive Touch Driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
index 7cb020dd3423..9591672b0511 100644
--- a/drivers/phy/motorola/phy-cpcap-usb.c
+++ b/drivers/phy/motorola/phy-cpcap-usb.c
@@ -717,3 +717,4 @@ MODULE_ALIAS("platform:cpcap_usb");
MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
MODULE_DESCRIPTION("CPCAP usb phy driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index e5202a7b6209..36b0c52a4b8b 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -829,3 +829,4 @@ MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Johan Palsson, Karl Komierowski, Arun R Murthy");
MODULE_ALIAS("platform:ab8500-btemp");
MODULE_DESCRIPTION("AB8500 battery temperature driver");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index 5f4537766e5b..6e49d1b28254 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -3751,3 +3751,4 @@ MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Johan Palsson, Karl Komierowski, Arun R Murthy");
MODULE_ALIAS("platform:ab8500-charger");
MODULE_DESCRIPTION("AB8500 charger management driver");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 9dd99722667a..5fa559f796aa 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -3252,3 +3252,4 @@ MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Johan Palsson, Karl Komierowski");
MODULE_ALIAS("platform:ab8500-fg");
MODULE_DESCRIPTION("AB8500 Fuel Gauge driver");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c
index 5f6ea416fa30..e9049d6229df 100644
--- a/drivers/power/supply/axp20x_ac_power.c
+++ b/drivers/power/supply/axp20x_ac_power.c
@@ -421,3 +421,4 @@ module_platform_driver(axp20x_ac_power_driver);
MODULE_AUTHOR("Quentin Schulz <quentin.schulz@free-electrons.com>");
MODULE_DESCRIPTION("AXP20X and AXP22X PMICs' AC power supply driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/axp20x_battery.c b/drivers/power/supply/axp20x_battery.c
index 50ca8e110085..ee8701a6e907 100644
--- a/drivers/power/supply/axp20x_battery.c
+++ b/drivers/power/supply/axp20x_battery.c
@@ -1155,3 +1155,4 @@ module_platform_driver(axp20x_batt_driver);
MODULE_DESCRIPTION("Battery power supply driver for AXP20X and AXP22X PMICs");
MODULE_AUTHOR("Quentin Schulz <quentin.schulz@free-electrons.com>");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
index e75d1e377ac1..599adcf84968 100644
--- a/drivers/power/supply/axp20x_usb_power.c
+++ b/drivers/power/supply/axp20x_usb_power.c
@@ -1080,3 +1080,4 @@ module_platform_driver(axp20x_usb_power_driver);
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
MODULE_DESCRIPTION("AXP20x PMIC USB power supply status driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index a3d71fc72064..c6897dd808fc 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -817,3 +817,4 @@ MODULE_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
MODULE_AUTHOR("Todd Brandt <todd.e.brandt@linux.intel.com>");
MODULE_DESCRIPTION("Xpower AXP288 Fuel Gauge Driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c
index 8106d1edcbc2..542c3c70e3cb 100644
--- a/drivers/power/supply/cpcap-battery.c
+++ b/drivers/power/supply/cpcap-battery.c
@@ -1176,3 +1176,4 @@ module_platform_driver(cpcap_battery_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
MODULE_DESCRIPTION("CPCAP PMIC Battery Driver");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
index d0c3008db534..89bc0fc3c9f8 100644
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -977,3 +977,4 @@ MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
MODULE_DESCRIPTION("CPCAP Battery Charger Interface driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:cpcap-charger");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/da9150-charger.c b/drivers/power/supply/da9150-charger.c
index 27f36ef5b88d..58449df6068c 100644
--- a/drivers/power/supply/da9150-charger.c
+++ b/drivers/power/supply/da9150-charger.c
@@ -644,3 +644,4 @@ module_platform_driver(da9150_charger_driver);
MODULE_DESCRIPTION("Charger Driver for DA9150");
MODULE_AUTHOR("Adam Thomson <Adam.Thomson.Opensource@diasemi.com>");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c
index f5f2566b3a32..d18c8ee40405 100644
--- a/drivers/power/supply/generic-adc-battery.c
+++ b/drivers/power/supply/generic-adc-battery.c
@@ -298,3 +298,4 @@ module_platform_driver(gab_driver);
MODULE_AUTHOR("anish kumar <yesanishhere@gmail.com>");
MODULE_DESCRIPTION("generic battery driver using IIO");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/ingenic-battery.c b/drivers/power/supply/ingenic-battery.c
index b111c7ce2be3..5be269f17bff 100644
--- a/drivers/power/supply/ingenic-battery.c
+++ b/drivers/power/supply/ingenic-battery.c
@@ -190,3 +190,4 @@ module_platform_driver(ingenic_battery_driver);
MODULE_DESCRIPTION("Battery driver for Ingenic JZ47xx SoCs");
MODULE_AUTHOR("Artur Rojek <contact@artur-rojek.eu>");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/intel_dc_ti_battery.c b/drivers/power/supply/intel_dc_ti_battery.c
index 56b0c92e9d28..1a16ded563bc 100644
--- a/drivers/power/supply/intel_dc_ti_battery.c
+++ b/drivers/power/supply/intel_dc_ti_battery.c
@@ -387,3 +387,4 @@ MODULE_ALIAS("platform:" DEV_NAME);
MODULE_AUTHOR("Hans de Goede <hansg@kernel.org>");
MODULE_DESCRIPTION("Intel Dollar Cove (TI) battery driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/lego_ev3_battery.c b/drivers/power/supply/lego_ev3_battery.c
index 28454de05761..414816662b06 100644
--- a/drivers/power/supply/lego_ev3_battery.c
+++ b/drivers/power/supply/lego_ev3_battery.c
@@ -231,3 +231,4 @@ module_platform_driver(lego_ev3_battery_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Lechner <david@lechnology.com>");
MODULE_DESCRIPTION("LEGO MINDSTORMS EV3 Battery Driver");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/lp8788-charger.c b/drivers/power/supply/lp8788-charger.c
index f0a680c155c4..8c6ec98362d0 100644
--- a/drivers/power/supply/lp8788-charger.c
+++ b/drivers/power/supply/lp8788-charger.c
@@ -727,3 +727,4 @@ MODULE_DESCRIPTION("TI LP8788 Charger Driver");
MODULE_AUTHOR("Milo Kim");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:lp8788-charger");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
index c1640bc6accd..1fe658bfecc1 100644
--- a/drivers/power/supply/max17040_battery.c
+++ b/drivers/power/supply/max17040_battery.c
@@ -635,3 +635,4 @@ module_i2c_driver(max17040_i2c_driver);
MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>");
MODULE_DESCRIPTION("MAX17040 Fuel Gauge");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/mp2629_charger.c b/drivers/power/supply/mp2629_charger.c
index d281c1059629..ed49f9a04c8c 100644
--- a/drivers/power/supply/mp2629_charger.c
+++ b/drivers/power/supply/mp2629_charger.c
@@ -660,3 +660,4 @@ module_platform_driver(mp2629_charger_driver);
MODULE_AUTHOR("Saravanan Sekar <sravanhome@gmail.com>");
MODULE_DESCRIPTION("MP2629 Charger driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/mt6370-charger.c b/drivers/power/supply/mt6370-charger.c
index e6db961d5818..2d02fdf37d70 100644
--- a/drivers/power/supply/mt6370-charger.c
+++ b/drivers/power/supply/mt6370-charger.c
@@ -941,3 +941,4 @@ module_platform_driver(mt6370_chg_driver);
MODULE_AUTHOR("ChiaEn Wu <chiaen_wu@richtek.com>");
MODULE_DESCRIPTION("MediaTek MT6370 Charger Driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/qcom_smbx.c b/drivers/power/supply/qcom_smbx.c
index b1cb925581ec..63b88754155c 100644
--- a/drivers/power/supply/qcom_smbx.c
+++ b/drivers/power/supply/qcom_smbx.c
@@ -1050,3 +1050,4 @@ module_platform_driver(qcom_spmi_smb);
MODULE_AUTHOR("Casey Connolly <casey.connolly@linaro.org>");
MODULE_DESCRIPTION("Qualcomm SMB2 Charger Driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/rn5t618_power.c b/drivers/power/supply/rn5t618_power.c
index 40dec55a9f73..a3f30e390c11 100644
--- a/drivers/power/supply/rn5t618_power.c
+++ b/drivers/power/supply/rn5t618_power.c
@@ -821,3 +821,4 @@ module_platform_driver(rn5t618_power_driver);
MODULE_ALIAS("platform:rn5t618-power");
MODULE_DESCRIPTION("Power supply driver for RICOH RN5T618");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/rx51_battery.c b/drivers/power/supply/rx51_battery.c
index b0220ec2d926..57266921dc8e 100644
--- a/drivers/power/supply/rx51_battery.c
+++ b/drivers/power/supply/rx51_battery.c
@@ -246,3 +246,4 @@ MODULE_ALIAS("platform:rx51-battery");
MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
MODULE_DESCRIPTION("Nokia RX-51 battery driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c
index a7ed9de8a289..1719ec4173e6 100644
--- a/drivers/power/supply/sc27xx_fuel_gauge.c
+++ b/drivers/power/supply/sc27xx_fuel_gauge.c
@@ -1350,3 +1350,4 @@ module_platform_driver(sc27xx_fgu_driver);
MODULE_DESCRIPTION("Spreadtrum SC27XX PMICs Fual Gauge Unit Driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index 04216b2bfb6c..151f7b24e9b9 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -1144,3 +1144,4 @@ MODULE_AUTHOR("Gražvydas Ignotas");
MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:twl4030_bci");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/twl4030_madc_battery.c b/drivers/power/supply/twl4030_madc_battery.c
index 3935162e350b..9b3785d1643c 100644
--- a/drivers/power/supply/twl4030_madc_battery.c
+++ b/drivers/power/supply/twl4030_madc_battery.c
@@ -237,3 +237,4 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Lukas Märdian <lukas@goldelico.com>");
MODULE_DESCRIPTION("twl4030_madc battery driver");
MODULE_ALIAS("platform:twl4030_madc_battery");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/power/supply/twl6030_charger.c b/drivers/power/supply/twl6030_charger.c
index b4ec26ff257c..82911a811f4e 100644
--- a/drivers/power/supply/twl6030_charger.c
+++ b/drivers/power/supply/twl6030_charger.c
@@ -579,3 +579,4 @@ module_platform_driver(twl6030_charger_driver);
MODULE_DESCRIPTION("TWL6030 Battery Charger Interface driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index d7f2e6ca92c2..bb6222c8cc5f 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -1069,3 +1069,4 @@ module_platform_driver(adc_tm5_driver);
MODULE_DESCRIPTION("SPMI PMIC Thermal Monitor ADC driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
index f39ca0ddd17b..fb003ca96454 100644
--- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
+++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
@@ -904,3 +904,4 @@ module_platform_driver(qpnp_tm_driver);
MODULE_ALIAS("platform:spmi-temp-alarm");
MODULE_DESCRIPTION("QPNP PMIC Temperature Alarm driver");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/thermal/renesas/rzg3s_thermal.c b/drivers/thermal/renesas/rzg3s_thermal.c
index e25e36c99a88..7ced8f76a0ec 100644
--- a/drivers/thermal/renesas/rzg3s_thermal.c
+++ b/drivers/thermal/renesas/rzg3s_thermal.c
@@ -270,3 +270,4 @@ module_platform_driver(rzg3s_thermal_driver);
MODULE_DESCRIPTION("Renesas RZ/G3S Thermal Sensor Unit Driver");
MODULE_AUTHOR("Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c
index 7c844589b153..cfdb8e674dd2 100644
--- a/drivers/thermal/thermal-generic-adc.c
+++ b/drivers/thermal/thermal-generic-adc.c
@@ -228,3 +228,4 @@ module_platform_driver(gadc_thermal_driver);
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
MODULE_DESCRIPTION("Generic ADC thermal driver using IIO framework with DT");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/sound/soc/codecs/audio-iio-aux.c b/sound/soc/codecs/audio-iio-aux.c
index 588e48044c13..864a5a676495 100644
--- a/sound/soc/codecs/audio-iio-aux.c
+++ b/sound/soc/codecs/audio-iio-aux.c
@@ -312,3 +312,4 @@ module_platform_driver(audio_iio_aux_driver);
MODULE_AUTHOR("Herve Codina <herve.codina@bootlin.com>");
MODULE_DESCRIPTION("IIO ALSA SoC aux driver");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/sound/soc/samsung/aries_wm8994.c b/sound/soc/samsung/aries_wm8994.c
index 3723329b266d..b6f0f3c0d393 100644
--- a/sound/soc/samsung/aries_wm8994.c
+++ b/sound/soc/samsung/aries_wm8994.c
@@ -700,3 +700,4 @@ module_platform_driver(aries_audio_driver);
MODULE_DESCRIPTION("ALSA SoC ARIES WM8994");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:aries-audio-wm8994");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c
index 239e958b88d3..12c4962f901d 100644
--- a/sound/soc/samsung/midas_wm1811.c
+++ b/sound/soc/samsung/midas_wm1811.c
@@ -773,3 +773,4 @@ module_platform_driver(midas_driver);
MODULE_AUTHOR("Simon Shields <simon@lineageos.org>");
MODULE_DESCRIPTION("ASoC support for Midas");
MODULE_LICENSE("GPL v2");
+MODULE_IMPORT_NS("IIO_CONSUMER");
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index c914d1c46850..dabcd2759187 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -407,3 +407,4 @@ MODULE_DESCRIPTION("stm32 DFSDM DAI driver");
MODULE_AUTHOR("Arnaud Pouliquen <arnaud.pouliquen@st.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:" STM32_ADFSDM_DRV_NAME);
+MODULE_IMPORT_NS("IIO_CONSUMER");
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251127-iio-inkern-use-namespaced-exports-41fc09223b5e
Best regards,
--
Romain Gantois <romain.gantois@bootlin.com>
^ permalink raw reply related
* Re: [PATCH v10 10/11] platform/x86: asus-wmi: add keyboard brightness event handler
From: Ilpo Järvinen @ 2025-12-01 9:52 UTC (permalink / raw)
To: Antheas Kapenekakis
Cc: Denis Benato, platform-driver-x86, linux-input, LKML, Jiri Kosina,
Benjamin Tissoires, Corentin Chary, Luke D . Jones, Hans de Goede
In-Reply-To: <CAGwozwGOgE2JPaR34V8ETEq66bMd1rjGNokdnbLDE1Ch7PR5ig@mail.gmail.com>
On Mon, 1 Dec 2025, Antheas Kapenekakis wrote:
> On Wed, 26 Nov 2025 at 21:39, Antheas Kapenekakis <lkml@antheas.dev> wrote:
> > On Wed, 26 Nov 2025 at 21:23, Denis Benato <benato.denis96@gmail.com> wrote:
> > > On 11/22/25 12:00, Antheas Kapenekakis wrote:
> > > > The keyboard brightness control of Asus WMI keyboards is handled in
> > > > kernel, which leads to the shortcut going from brightness 0, to 1,
> > > > to 2, and 3.
> > > >
> > > > However, for HID keyboards it is exposed as a key and handled by the
> > > > user's desktop environment. For the toggle button, this means that
> > > > brightness control becomes on/off. In addition, in the absence of a
> > > > DE, the keyboard brightness does not work.
> > > >
> > > > Therefore, expose an event handler for the keyboard brightness control
> > > > which can then be used by hid-asus. Since this handler is called from
> > > > an interrupt context, defer the actual work to a workqueue.
> > > >
> > > > In the process, introduce ASUS_EV_MAX_BRIGHTNESS to hold the constant
> > > > for maximum brightness since it is shared between hid-asus/asus-wmi.
> > > >
> > > > Reviewed-by: Luke D. Jones <luke@ljones.dev>
> > > > Tested-by: Luke D. Jones <luke@ljones.dev>
> > > > Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> > > > ---
> > > > drivers/platform/x86/asus-wmi.c | 46 +++++++++++++++++++---
> > > > include/linux/platform_data/x86/asus-wmi.h | 13 ++++++
> > > > 2 files changed, 54 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> > > > index 84cde34ab6a8..a69464e45ca4 100644
> > > > --- a/drivers/platform/x86/asus-wmi.c
> > > > +++ b/drivers/platform/x86/asus-wmi.c
> > > > @@ -1719,6 +1719,44 @@ static void kbd_led_update_all(struct work_struct *work)
> > > > }
> > > > }
> > > >
> > > > +/*
> > > > + * This function is called from hid-asus to inform asus-wmi of brightness
> > > > + * changes initiated by the keyboard backlight keys.
> > > > + */
> > > > +int asus_hid_event(enum asus_hid_event event)
> > > > +{
> > > > + struct asus_wmi *asus;
> > > > + int brightness;
> > > > +
> > > > + guard(spinlock_irqsave)(&asus_ref.lock);
> > > > + asus = asus_ref.asus;
> > > > + if (!asus || !asus->kbd_led_registered)
> > > > + return -EBUSY;
> > > > +
> > > > + brightness = asus->kbd_led_wk;
> > > > +
> > > > + switch (event) {
> > > > + case ASUS_EV_BRTUP:
> > > > + brightness += 1;
> > > > + break;
> > > > + case ASUS_EV_BRTDOWN:
> > > > + brightness -= 1;
> > > > + break;
> > > > + case ASUS_EV_BRTTOGGLE:
> > > > + if (brightness >= ASUS_EV_MAX_BRIGHTNESS)
> > > > + brightness = 0;
> > > > + else
> > > > + brightness += 1;
> > > > + break;
> > > > + }
> > > > +
> > > > + asus->kbd_led_wk = clamp_val(brightness, 0, ASUS_EV_MAX_BRIGHTNESS);
> > > > + asus->kbd_led_notify = true;
> > > > + queue_work(asus->led_workqueue, &asus->kbd_led_work);
> > > > + return 0;
> > > > +}
> > > > +EXPORT_SYMBOL_GPL(asus_hid_event);
> > > > +
> > > > /*
> > > > * These functions actually update the LED's, and are called from a
> > > LEDs as opposed to LED's?
> >
> > I agree with you, but the author of that line probably wouldn't -
> > depends on author dialect and both are usually correct.
> >
> > When making acronyms plural, adding a ' is usually accepted as
> > correct. But this is not added as part of this series, so you can do a
> > reword commit if you wish
> >
> > Antheas
>
> Hm, perhaps this was not clear but the part you commented on was not
> part of the patch/this series. Do you want to finish reviewing this
> patch and add a rev-by?
>
> @Ilpo: with 6.18 releasing yesterday, what is the status on this? is
> it for 6.20? Hans commented on patch 5
It will have to wait to the 6.20 cycle as it's cross-subsystem series so
there are other maintainers involved than just me.
--
i.
> Thanks,
> Antheas
>
> > > > * workqueue. By doing this as separate work rather than when the LED
> > > > @@ -1801,13 +1839,11 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value)
> > > > {
> > > > struct asus_hid_listener *listener;
> > > > struct asus_wmi *asus;
> > > > - int max_level;
> > > >
> > > > asus = container_of(led_cdev, struct asus_wmi, kbd_led);
> > > > - max_level = asus->kbd_led.max_brightness;
> > > >
> > > > scoped_guard(spinlock_irqsave, &asus_ref.lock)
> > > > - asus->kbd_led_wk = clamp_val(value, 0, max_level);
> > > > + asus->kbd_led_wk = clamp_val(value, 0, ASUS_EV_MAX_BRIGHTNESS);
> > > >
> > > > if (asus->kbd_led_avail)
> > > > kbd_led_update(asus);
> > > > @@ -2011,7 +2047,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
> > > > asus->kbd_led.flags = LED_BRIGHT_HW_CHANGED;
> > > > asus->kbd_led.brightness_set = kbd_led_set;
> > > > asus->kbd_led.brightness_get = kbd_led_get;
> > > > - asus->kbd_led.max_brightness = 3;
> > > > + asus->kbd_led.max_brightness = ASUS_EV_MAX_BRIGHTNESS;
> > > > asus->kbd_led_avail = !kbd_led_read(asus, &led_val, NULL);
> > > > INIT_WORK(&asus->kbd_led_work, kbd_led_update_all);
> > > >
> > > > @@ -4530,7 +4566,7 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
> > > > return;
> > > > }
> > > > if (code == NOTIFY_KBD_BRTTOGGLE) {
> > > > - if (led_value == asus->kbd_led.max_brightness)
> > > > + if (led_value == ASUS_EV_MAX_BRIGHTNESS)
> > > > kbd_led_set_by_kbd(asus, 0);
> > > > else
> > > > kbd_led_set_by_kbd(asus, led_value + 1);
> > > > diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
> > > > index d347cffd05d5..7b872b5d0960 100644
> > > > --- a/include/linux/platform_data/x86/asus-wmi.h
> > > > +++ b/include/linux/platform_data/x86/asus-wmi.h
> > > > @@ -178,6 +178,14 @@ struct asus_hid_listener {
> > > > void (*brightness_set)(struct asus_hid_listener *listener, int brightness);
> > > > };
> > > >
> > > > +enum asus_hid_event {
> > > > + ASUS_EV_BRTUP,
> > > > + ASUS_EV_BRTDOWN,
> > > > + ASUS_EV_BRTTOGGLE,
> > > > +};
> > > > +
> > > > +#define ASUS_EV_MAX_BRIGHTNESS 3
> > > > +
> > > > #if IS_REACHABLE(CONFIG_ASUS_WMI)
> > > > void set_ally_mcu_hack(enum asus_ally_mcu_hack status);
> > > > void set_ally_mcu_powersave(bool enabled);
> > > > @@ -186,6 +194,7 @@ int asus_wmi_set_devstate(u32 dev_id, u32 ctrl_param, u32 *retval);
> > > > int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval);
> > > > int asus_hid_register_listener(struct asus_hid_listener *cdev);
> > > > void asus_hid_unregister_listener(struct asus_hid_listener *cdev);
> > > > +int asus_hid_event(enum asus_hid_event event);
> > > > #else
> > > > static inline void set_ally_mcu_hack(enum asus_ally_mcu_hack status)
> > > > {
> > > > @@ -213,6 +222,10 @@ static inline int asus_hid_register_listener(struct asus_hid_listener *bdev)
> > > > static inline void asus_hid_unregister_listener(struct asus_hid_listener *bdev)
> > > > {
> > > > }
> > > > +static inline int asus_hid_event(enum asus_hid_event event)
> > > > +{
> > > > + return -ENODEV;
> > > > +}
> > > > #endif
> > > >
> > > > #endif /* __PLATFORM_DATA_X86_ASUS_WMI_H */
> > >
>
^ permalink raw reply
* Re: [PATCH v10 10/11] platform/x86: asus-wmi: add keyboard brightness event handler
From: Antheas Kapenekakis @ 2025-12-01 8:58 UTC (permalink / raw)
To: Denis Benato
Cc: platform-driver-x86, linux-input, linux-kernel, Jiri Kosina,
Benjamin Tissoires, Corentin Chary, Luke D . Jones, Hans de Goede,
Ilpo Järvinen
In-Reply-To: <CAGwozwHwi7mopXY=DM2jt82jgdetdhNR-CUicX7R9KbYj4g0Xw@mail.gmail.com>
On Wed, 26 Nov 2025 at 21:39, Antheas Kapenekakis <lkml@antheas.dev> wrote:
>
> On Wed, 26 Nov 2025 at 21:23, Denis Benato <benato.denis96@gmail.com> wrote:
> >
> >
> > On 11/22/25 12:00, Antheas Kapenekakis wrote:
> > > The keyboard brightness control of Asus WMI keyboards is handled in
> > > kernel, which leads to the shortcut going from brightness 0, to 1,
> > > to 2, and 3.
> > >
> > > However, for HID keyboards it is exposed as a key and handled by the
> > > user's desktop environment. For the toggle button, this means that
> > > brightness control becomes on/off. In addition, in the absence of a
> > > DE, the keyboard brightness does not work.
> > >
> > > Therefore, expose an event handler for the keyboard brightness control
> > > which can then be used by hid-asus. Since this handler is called from
> > > an interrupt context, defer the actual work to a workqueue.
> > >
> > > In the process, introduce ASUS_EV_MAX_BRIGHTNESS to hold the constant
> > > for maximum brightness since it is shared between hid-asus/asus-wmi.
> > >
> > > Reviewed-by: Luke D. Jones <luke@ljones.dev>
> > > Tested-by: Luke D. Jones <luke@ljones.dev>
> > > Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> > > ---
> > > drivers/platform/x86/asus-wmi.c | 46 +++++++++++++++++++---
> > > include/linux/platform_data/x86/asus-wmi.h | 13 ++++++
> > > 2 files changed, 54 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> > > index 84cde34ab6a8..a69464e45ca4 100644
> > > --- a/drivers/platform/x86/asus-wmi.c
> > > +++ b/drivers/platform/x86/asus-wmi.c
> > > @@ -1719,6 +1719,44 @@ static void kbd_led_update_all(struct work_struct *work)
> > > }
> > > }
> > >
> > > +/*
> > > + * This function is called from hid-asus to inform asus-wmi of brightness
> > > + * changes initiated by the keyboard backlight keys.
> > > + */
> > > +int asus_hid_event(enum asus_hid_event event)
> > > +{
> > > + struct asus_wmi *asus;
> > > + int brightness;
> > > +
> > > + guard(spinlock_irqsave)(&asus_ref.lock);
> > > + asus = asus_ref.asus;
> > > + if (!asus || !asus->kbd_led_registered)
> > > + return -EBUSY;
> > > +
> > > + brightness = asus->kbd_led_wk;
> > > +
> > > + switch (event) {
> > > + case ASUS_EV_BRTUP:
> > > + brightness += 1;
> > > + break;
> > > + case ASUS_EV_BRTDOWN:
> > > + brightness -= 1;
> > > + break;
> > > + case ASUS_EV_BRTTOGGLE:
> > > + if (brightness >= ASUS_EV_MAX_BRIGHTNESS)
> > > + brightness = 0;
> > > + else
> > > + brightness += 1;
> > > + break;
> > > + }
> > > +
> > > + asus->kbd_led_wk = clamp_val(brightness, 0, ASUS_EV_MAX_BRIGHTNESS);
> > > + asus->kbd_led_notify = true;
> > > + queue_work(asus->led_workqueue, &asus->kbd_led_work);
> > > + return 0;
> > > +}
> > > +EXPORT_SYMBOL_GPL(asus_hid_event);
> > > +
> > > /*
> > > * These functions actually update the LED's, and are called from a
> > LEDs as opposed to LED's?
>
> I agree with you, but the author of that line probably wouldn't -
> depends on author dialect and both are usually correct.
>
> When making acronyms plural, adding a ' is usually accepted as
> correct. But this is not added as part of this series, so you can do a
> reword commit if you wish
>
> Antheas
Hm, perhaps this was not clear but the part you commented on was not
part of the patch/this series. Do you want to finish reviewing this
patch and add a rev-by?
@Ilpo: with 6.18 releasing yesterday, what is the status on this? is
it for 6.20? Hans commented on patch 5
Thanks,
Antheas
> > > * workqueue. By doing this as separate work rather than when the LED
> > > @@ -1801,13 +1839,11 @@ static void do_kbd_led_set(struct led_classdev *led_cdev, int value)
> > > {
> > > struct asus_hid_listener *listener;
> > > struct asus_wmi *asus;
> > > - int max_level;
> > >
> > > asus = container_of(led_cdev, struct asus_wmi, kbd_led);
> > > - max_level = asus->kbd_led.max_brightness;
> > >
> > > scoped_guard(spinlock_irqsave, &asus_ref.lock)
> > > - asus->kbd_led_wk = clamp_val(value, 0, max_level);
> > > + asus->kbd_led_wk = clamp_val(value, 0, ASUS_EV_MAX_BRIGHTNESS);
> > >
> > > if (asus->kbd_led_avail)
> > > kbd_led_update(asus);
> > > @@ -2011,7 +2047,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
> > > asus->kbd_led.flags = LED_BRIGHT_HW_CHANGED;
> > > asus->kbd_led.brightness_set = kbd_led_set;
> > > asus->kbd_led.brightness_get = kbd_led_get;
> > > - asus->kbd_led.max_brightness = 3;
> > > + asus->kbd_led.max_brightness = ASUS_EV_MAX_BRIGHTNESS;
> > > asus->kbd_led_avail = !kbd_led_read(asus, &led_val, NULL);
> > > INIT_WORK(&asus->kbd_led_work, kbd_led_update_all);
> > >
> > > @@ -4530,7 +4566,7 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
> > > return;
> > > }
> > > if (code == NOTIFY_KBD_BRTTOGGLE) {
> > > - if (led_value == asus->kbd_led.max_brightness)
> > > + if (led_value == ASUS_EV_MAX_BRIGHTNESS)
> > > kbd_led_set_by_kbd(asus, 0);
> > > else
> > > kbd_led_set_by_kbd(asus, led_value + 1);
> > > diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h
> > > index d347cffd05d5..7b872b5d0960 100644
> > > --- a/include/linux/platform_data/x86/asus-wmi.h
> > > +++ b/include/linux/platform_data/x86/asus-wmi.h
> > > @@ -178,6 +178,14 @@ struct asus_hid_listener {
> > > void (*brightness_set)(struct asus_hid_listener *listener, int brightness);
> > > };
> > >
> > > +enum asus_hid_event {
> > > + ASUS_EV_BRTUP,
> > > + ASUS_EV_BRTDOWN,
> > > + ASUS_EV_BRTTOGGLE,
> > > +};
> > > +
> > > +#define ASUS_EV_MAX_BRIGHTNESS 3
> > > +
> > > #if IS_REACHABLE(CONFIG_ASUS_WMI)
> > > void set_ally_mcu_hack(enum asus_ally_mcu_hack status);
> > > void set_ally_mcu_powersave(bool enabled);
> > > @@ -186,6 +194,7 @@ int asus_wmi_set_devstate(u32 dev_id, u32 ctrl_param, u32 *retval);
> > > int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval);
> > > int asus_hid_register_listener(struct asus_hid_listener *cdev);
> > > void asus_hid_unregister_listener(struct asus_hid_listener *cdev);
> > > +int asus_hid_event(enum asus_hid_event event);
> > > #else
> > > static inline void set_ally_mcu_hack(enum asus_ally_mcu_hack status)
> > > {
> > > @@ -213,6 +222,10 @@ static inline int asus_hid_register_listener(struct asus_hid_listener *bdev)
> > > static inline void asus_hid_unregister_listener(struct asus_hid_listener *bdev)
> > > {
> > > }
> > > +static inline int asus_hid_event(enum asus_hid_event event)
> > > +{
> > > + return -ENODEV;
> > > +}
> > > #endif
> > >
> > > #endif /* __PLATFORM_DATA_X86_ASUS_WMI_H */
> >
^ permalink raw reply
* [PATCH v1 4/4] HID: Intel-thc-hid: Intel-quicki2c: Add output report support
From: Even Xu @ 2025-12-01 7:30 UTC (permalink / raw)
To: jikos, bentiss
Cc: srinivas.pandruvada, linux-input, linux-kernel, Even Xu,
Rui Zhang
In-Reply-To: <20251201073047.3313824-1-even.xu@intel.com>
Add support for HID output reports in the intel-quicki2c driver by
implementing the output_report callback in the HID low-level driver
interface.
This enables proper communication with HID devices that require
output report functionality, such as setting device configuration or
updating device firmware.
Tested-by: Rui Zhang <rui1.zhang@intel.com>
Signed-off-by: Even Xu <even.xu@intel.com>
---
.../intel-quicki2c/quicki2c-hid.c | 8 ++++++++
.../intel-quicki2c/quicki2c-protocol.c | 19 +++++++++++++++++++
.../intel-quicki2c/quicki2c-protocol.h | 1 +
3 files changed, 28 insertions(+)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c
index 5c3ec95bb3fd..580a760b3ffc 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c
@@ -83,6 +83,13 @@ static int quicki2c_hid_power(struct hid_device *hid, int lvl)
return 0;
}
+static int quicki2c_hid_output_report(struct hid_device *hid, u8 *buf, size_t count)
+{
+ struct quicki2c_device *qcdev = hid->driver_data;
+
+ return quicki2c_output_report(qcdev, buf, count);
+}
+
static struct hid_ll_driver quicki2c_hid_ll_driver = {
.parse = quicki2c_hid_parse,
.start = quicki2c_hid_start,
@@ -91,6 +98,7 @@ static struct hid_ll_driver quicki2c_hid_ll_driver = {
.close = quicki2c_hid_close,
.power = quicki2c_hid_power,
.raw_request = quicki2c_hid_raw_request,
+ .output_report = quicki2c_hid_output_report,
};
/**
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
index a287d9ee09c3..4030337dd6f5 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
@@ -195,6 +195,25 @@ int quicki2c_set_report(struct quicki2c_device *qcdev, u8 report_type,
return buf_len;
}
+int quicki2c_output_report(struct quicki2c_device *qcdev, void *buf, size_t buf_len)
+{
+ size_t len;
+ int ret;
+
+ len = quicki2c_init_write_buf(qcdev, 0, 0, false, buf, buf_len,
+ qcdev->report_buf, qcdev->report_len);
+ if (!len)
+ return -EINVAL;
+
+ ret = thc_dma_write(qcdev->thc_hw, qcdev->report_buf, len);
+ if (ret) {
+ dev_err(qcdev->dev, "Output Report failed, ret %d\n", ret);
+ return ret;
+ }
+
+ return buf_len;
+}
+
#define HIDI2C_RESET_TIMEOUT 5
int quicki2c_reset(struct quicki2c_device *qcdev)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h
index db70e08c8b1c..6642cefb8a67 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h
@@ -13,6 +13,7 @@ int quicki2c_get_report(struct quicki2c_device *qcdev, u8 report_type,
unsigned int reportnum, void *buf, size_t buf_len);
int quicki2c_set_report(struct quicki2c_device *qcdev, u8 report_type,
unsigned int reportnum, void *buf, size_t buf_len);
+int quicki2c_output_report(struct quicki2c_device *qcdev, void *buf, size_t buf_len);
int quicki2c_get_device_descriptor(struct quicki2c_device *qcdev);
int quicki2c_get_report_descriptor(struct quicki2c_device *qcdev);
int quicki2c_reset(struct quicki2c_device *qcdev);
--
2.40.1
^ permalink raw reply related
* [PATCH v1 3/4] HID: Intel-thc-hid: Intel-quicki2c: Support writing output report format
From: Even Xu @ 2025-12-01 7:30 UTC (permalink / raw)
To: jikos, bentiss
Cc: srinivas.pandruvada, linux-input, linux-kernel, Even Xu,
Rui Zhang, Ilpo Järvinen
In-Reply-To: <20251201073047.3313824-1-even.xu@intel.com>
There are two output formats requested in the HID-over-I2C specification:
- Command format (set feature/set report): encoded command written to
command register, followed by data written to data register
- Output report format: all data written directly to output register
Current quicki2c_init_write_buf() implementation only supports the
command format.
Extend quicki2c_init_write_buf() to automatically detect the output
format based on the presence of command parameters and prepare the
appropriate output buffer accordingly.
Tested-by: Rui Zhang <rui1.zhang@intel.com>
Signed-off-by: Even Xu <even.xu@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
.../intel-quicki2c/quicki2c-protocol.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
index ab390ce79c21..a287d9ee09c3 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
@@ -30,13 +30,18 @@ static ssize_t quicki2c_init_write_buf(struct quicki2c_device *qcdev, u32 cmd, s
if (buf_len > write_buf_len)
return -EINVAL;
- memcpy(write_buf, &qcdev->dev_desc.cmd_reg, HIDI2C_REG_LEN);
- offset += HIDI2C_REG_LEN;
- memcpy(write_buf + offset, &cmd, cmd_len);
- offset += cmd_len;
+ if (cmd_len) {
+ memcpy(write_buf, &qcdev->dev_desc.cmd_reg, HIDI2C_REG_LEN);
+ offset += HIDI2C_REG_LEN;
+ memcpy(write_buf + offset, &cmd, cmd_len);
+ offset += cmd_len;
- if (append_data_reg) {
- memcpy(write_buf + offset, &qcdev->dev_desc.data_reg, HIDI2C_REG_LEN);
+ if (append_data_reg) {
+ memcpy(write_buf + offset, &qcdev->dev_desc.data_reg, HIDI2C_REG_LEN);
+ offset += HIDI2C_REG_LEN;
+ }
+ } else {
+ memcpy(write_buf, &qcdev->dev_desc.output_reg, HIDI2C_REG_LEN);
offset += HIDI2C_REG_LEN;
}
--
2.40.1
^ permalink raw reply related
* [PATCH v1 2/4] HID: Intel-thc-hid: Intel-quicki2c: Use put_unaligned_le16 for __le16 writes
From: Even Xu @ 2025-12-01 7:30 UTC (permalink / raw)
To: jikos, bentiss; +Cc: srinivas.pandruvada, linux-input, linux-kernel, Even Xu
In-Reply-To: <20251201073047.3313824-1-even.xu@intel.com>
Replace memcpy operations with put_unaligned_le16() when writing 16-bit
little-endian values to the write buffer.
This change improves code clarity and ensures proper handling of unaligned
memory access.
Signed-off-by: Even Xu <even.xu@intel.com>
---
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
index 013cbbb39efd..ab390ce79c21 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
@@ -41,9 +41,7 @@ static ssize_t quicki2c_init_write_buf(struct quicki2c_device *qcdev, u32 cmd, s
}
if (data && data_len) {
- __le16 len = cpu_to_le16(data_len + HIDI2C_LENGTH_LEN);
-
- memcpy(write_buf + offset, &len, HIDI2C_LENGTH_LEN);
+ put_unaligned_le16(data_len + HIDI2C_LENGTH_LEN, write_buf + offset);
offset += HIDI2C_LENGTH_LEN;
memcpy(write_buf + offset, data, data_len);
}
--
2.40.1
^ permalink raw reply related
* [PATCH v1 1/4] HID: Intel-thc-hid: Intel-quicki2c: Use size_t for all length variables
From: Even Xu @ 2025-12-01 7:30 UTC (permalink / raw)
To: jikos, bentiss; +Cc: srinivas.pandruvada, linux-input, linux-kernel, Even Xu
In-Reply-To: <20251201073047.3313824-1-even.xu@intel.com>
Convert all length-related variables in the QuickI2C protocol layer to use
size_t type to follow kernel coding conventions.
This includes:
- All buffer length parameters and variables
- Return values of quicki2c_encode_cmd() function which represents
encoded command buffer size.
- Return values of quicki2c_init_write_buf() function which represents
process result: either prepared output buffer size or error code.
This change improves type consistency and aligns with standard kernel
practices for memory size representation, reducing potential issues
with size calculations and comparisons.
Signed-off-by: Even Xu <even.xu@intel.com>
---
.../intel-quicki2c/quicki2c-dev.h | 2 +-
.../intel-quicki2c/quicki2c-protocol.c | 55 +++++++++----------
.../intel-quicki2c/quicki2c-protocol.h | 4 +-
3 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h
index 2cb5471a8133..33a1e3db1cb2 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h
@@ -213,7 +213,7 @@ struct quicki2c_device {
u8 *report_descriptor;
u8 *input_buf;
u8 *report_buf;
- u32 report_len;
+ size_t report_len;
wait_queue_head_t reset_ack_wq;
bool reset_ack;
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
index a63f8c833252..013cbbb39efd 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
@@ -13,11 +13,11 @@
#include "quicki2c-hid.h"
#include "quicki2c-protocol.h"
-static int quicki2c_init_write_buf(struct quicki2c_device *qcdev, u32 cmd, int cmd_len,
- bool append_data_reg, u8 *data, int data_len,
- u8 *write_buf, int write_buf_len)
+static ssize_t quicki2c_init_write_buf(struct quicki2c_device *qcdev, u32 cmd, size_t cmd_len,
+ bool append_data_reg, u8 *data, size_t data_len,
+ u8 *write_buf, size_t write_buf_len)
{
- int buf_len, offset = 0;
+ size_t buf_len, offset = 0;
buf_len = HIDI2C_REG_LEN + cmd_len;
@@ -51,10 +51,10 @@ static int quicki2c_init_write_buf(struct quicki2c_device *qcdev, u32 cmd, int c
return buf_len;
}
-static int quicki2c_encode_cmd(struct quicki2c_device *qcdev, u32 *cmd_buf,
- u8 opcode, u8 report_type, u8 report_id)
+static size_t quicki2c_encode_cmd(struct quicki2c_device *qcdev, u32 *cmd_buf,
+ u8 opcode, u8 report_type, u8 report_id)
{
- int cmd_len;
+ size_t cmd_len;
*cmd_buf = FIELD_PREP(HIDI2C_CMD_OPCODE, opcode) |
FIELD_PREP(HIDI2C_CMD_REPORT_TYPE, report_type);
@@ -72,22 +72,20 @@ static int quicki2c_encode_cmd(struct quicki2c_device *qcdev, u32 *cmd_buf,
}
static int write_cmd_to_txdma(struct quicki2c_device *qcdev, int opcode,
- int report_type, int report_id, u8 *buf, int buf_len)
+ int report_type, int report_id, u8 *buf, size_t buf_len)
{
- size_t write_buf_len;
- int cmd_len, ret;
+ size_t cmd_len;
+ ssize_t len;
u32 cmd;
cmd_len = quicki2c_encode_cmd(qcdev, &cmd, opcode, report_type, report_id);
- ret = quicki2c_init_write_buf(qcdev, cmd, cmd_len, buf ? true : false, buf,
+ len = quicki2c_init_write_buf(qcdev, cmd, cmd_len, buf ? true : false, buf,
buf_len, qcdev->report_buf, qcdev->report_len);
- if (ret < 0)
- return ret;
-
- write_buf_len = ret;
+ if (len < 0)
+ return len;
- return thc_dma_write(qcdev->thc_hw, qcdev->report_buf, write_buf_len);
+ return thc_dma_write(qcdev->thc_hw, qcdev->report_buf, len);
}
int quicki2c_set_power(struct quicki2c_device *qcdev, enum hidi2c_power_state power_state)
@@ -126,13 +124,13 @@ int quicki2c_get_report_descriptor(struct quicki2c_device *qcdev)
}
int quicki2c_get_report(struct quicki2c_device *qcdev, u8 report_type,
- unsigned int reportnum, void *buf, u32 buf_len)
+ unsigned int reportnum, void *buf, size_t buf_len)
{
struct hidi2c_report_packet *rpt;
- size_t write_buf_len, read_len = 0;
- int cmd_len, rep_type;
+ size_t cmd_len, read_len = 0;
+ int rep_type, ret;
+ ssize_t len;
u32 cmd;
- int ret;
if (report_type == HID_INPUT_REPORT) {
rep_type = HIDI2C_INPUT;
@@ -145,25 +143,22 @@ int quicki2c_get_report(struct quicki2c_device *qcdev, u8 report_type,
cmd_len = quicki2c_encode_cmd(qcdev, &cmd, HIDI2C_GET_REPORT, rep_type, reportnum);
- ret = quicki2c_init_write_buf(qcdev, cmd, cmd_len, true, NULL, 0,
+ len = quicki2c_init_write_buf(qcdev, cmd, cmd_len, true, NULL, 0,
qcdev->report_buf, qcdev->report_len);
- if (ret < 0)
- return ret;
-
- write_buf_len = ret;
+ if (len < 0)
+ return len;
rpt = (struct hidi2c_report_packet *)qcdev->input_buf;
- ret = thc_swdma_read(qcdev->thc_hw, qcdev->report_buf, write_buf_len,
- NULL, rpt, &read_len);
+ ret = thc_swdma_read(qcdev->thc_hw, qcdev->report_buf, len, NULL, rpt, &read_len);
if (ret) {
- dev_err_once(qcdev->dev, "Get report failed, ret %d, read len (%zu vs %d)\n",
+ dev_err_once(qcdev->dev, "Get report failed, ret %d, read len (%zu vs %zu)\n",
ret, read_len, buf_len);
return ret;
}
if (HIDI2C_DATA_LEN(le16_to_cpu(rpt->len)) != buf_len || rpt->data[0] != reportnum) {
- dev_err_once(qcdev->dev, "Invalid packet, len (%d vs %d) report id (%d vs %d)\n",
+ dev_err_once(qcdev->dev, "Invalid packet, len (%d vs %zu) report id (%d vs %d)\n",
le16_to_cpu(rpt->len), buf_len, rpt->data[0], reportnum);
return -EINVAL;
}
@@ -174,7 +169,7 @@ int quicki2c_get_report(struct quicki2c_device *qcdev, u8 report_type,
}
int quicki2c_set_report(struct quicki2c_device *qcdev, u8 report_type,
- unsigned int reportnum, void *buf, u32 buf_len)
+ unsigned int reportnum, void *buf, size_t buf_len)
{
int rep_type;
int ret;
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h
index bf4908cce59c..db70e08c8b1c 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.h
@@ -10,9 +10,9 @@ struct quicki2c_device;
int quicki2c_set_power(struct quicki2c_device *qcdev, enum hidi2c_power_state power_state);
int quicki2c_get_report(struct quicki2c_device *qcdev, u8 report_type,
- unsigned int reportnum, void *buf, u32 buf_len);
+ unsigned int reportnum, void *buf, size_t buf_len);
int quicki2c_set_report(struct quicki2c_device *qcdev, u8 report_type,
- unsigned int reportnum, void *buf, u32 buf_len);
+ unsigned int reportnum, void *buf, size_t buf_len);
int quicki2c_get_device_descriptor(struct quicki2c_device *qcdev);
int quicki2c_get_report_descriptor(struct quicki2c_device *qcdev);
int quicki2c_reset(struct quicki2c_device *qcdev);
--
2.40.1
^ permalink raw reply related
* [PATCH v1 0/4] Add output report support for QuickI2C driver
From: Even Xu @ 2025-12-01 7:30 UTC (permalink / raw)
To: jikos, bentiss; +Cc: srinivas.pandruvada, linux-input, linux-kernel, Even Xu
This patch serial adds support for HID output reports in the Quicki2c
driver by implementing the output_report callback in the HID low-level
driver interface.
This change introduces:
- Refine QuickI2C driver to use size_t for all length-related variables
- Enhance the quicki2c_init_write_buf() function by adding support for
writing to the output register based on the content being written
- Add quicki2c_hid_output_report() and quicki2c_output_report() function
that processe the HID output reports request
This enables proper communication with HID devices that require output
report functionality, such as setting device configuration or updating
device firmware.
Even Xu (4):
HID: Intel-thc-hid: Intel-quicki2c: Use size_t for all length
variables
HID: Intel-thc-hid: Intel-quicki2c: Use put_unaligned_le16 for __le16
writes
HID: Intel-thc-hid: Intel-quicki2c: Support writing output report
format
HID: Intel-thc-hid: Intel-quicki2c: Add output report support
.../intel-quicki2c/quicki2c-dev.h | 2 +-
.../intel-quicki2c/quicki2c-hid.c | 8 ++
.../intel-quicki2c/quicki2c-protocol.c | 95 +++++++++++--------
.../intel-quicki2c/quicki2c-protocol.h | 5 +-
4 files changed, 68 insertions(+), 42 deletions(-)
--
2.40.1
^ permalink raw reply
* Re: [PATCH] Input: ti_am335x_tsc: clamp coordinate_readouts to DT maximum (6)
From: Junjie Cao @ 2025-12-01 6:36 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20251117032358.891822-1-junjie.cao@intel.com>
Hi Dmitry,
Just a gentle ping on this patch as well.
Best regards,
Junjie
^ permalink raw reply
* Re: [PATCH] Input: ti_am335x_tsc: fix off-by-one error in wire_order validation
From: Junjie Cao @ 2025-12-01 6:02 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20251114062817.852698-1-junjie.cao@intel.com>
Hi Dmitry,
Just a gentle ping on this patch~
Best regards,
Junjie
^ permalink raw reply
* [syzbot] [input?] [usb?] WARNING in cm109_urb_irq_callback
From: syzbot @ 2025-11-30 22:59 UTC (permalink / raw)
To: dmitry.torokhov, linux-input, linux-kernel, linux-usb,
syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 663d0d1af3fa Add linux-next specific files for 20251126
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14c584b4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c8705ffbbff9235f
dashboard link: https://syzkaller.appspot.com/bug?extid=c708736c2ec142a386fd
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10746f42580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1456de12580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bccd41a8a8ce/disk-663d0d1a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/21ebce6fa0f2/vmlinux-663d0d1a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/441ffa7b502f/bzImage-663d0d1a.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+c708736c2ec142a386fd@syzkaller.appspotmail.com
cm109 1-1:0.8: cm109_urb_irq_callback: urb status -71
------------[ cut here ]------------
URB ffff8880269d7000 submitted while active
WARNING: drivers/usb/core/urb.c:380 at 0x0, CPU#1: syz.0.17/6058
Modules linked in:
CPU: 1 UID: 0 PID: 6058 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:usb_submit_urb+0x7e/0x18d0 drivers/usb/core/urb.c:380
Code: 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 67 4e 21 fb 49 83 3e 00 74 40 e8 bc fe ba fa 48 8d 3d 75 5b c5 08 48 89 de <67> 48 0f b9 3a b8 f0 ff ff ff eb 11 e8 a1 fe ba fa eb 05 e8 9a fe
RSP: 0018:ffffc90000a08878 EFLAGS: 00010046
RAX: ffffffff8706e144 RBX: ffff8880269d7000 RCX: ffff88802503bd00
RDX: 0000000000000100 RSI: ffff8880269d7000 RDI: ffffffff8fcc3cc0
RBP: 000000000000000f R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000141100 R12: 0000000000000820
R13: ffff88807b288030 R14: ffff8880269d7008 R15: dffffc0000000000
FS: 0000555591d77500(0000) GS:ffff888125b3e000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2160730e9c CR3: 000000007837a000 CR4: 00000000003526f0
Call Trace:
<IRQ>
cm109_submit_ctl drivers/input/misc/cm109.c:380 [inline]
cm109_urb_irq_callback+0x709/0xcd0 drivers/input/misc/cm109.c:431
__usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661
dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x51c/0xc30 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x27d/0x850 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727
irq_exit_rcu+0x9/0x30 kernel/softirq.c:743
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xa8/0x110 kernel/locking/spinlock.c:194
Code: 74 05 e8 eb f6 64 f6 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4f f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> a3 7f 2c f6 65 8b 05 2c 61 59 07 85 c0 74 40 48 c7 04 24 0e 36
RSP: 0018:ffffc90003b7faa0 EFLAGS: 00000206
RAX: ea11a46cfad79300 RBX: 0000000000000a02 RCX: ea11a46cfad79300
RDX: 0000000000000006 RSI: ffffffff8da6f16a RDI: 0000000000000001
RBP: ffffc90003b7fb28 R08: ffffffff8fbf8277 R09: 1ffffffff1f7f04e
R10: dffffc0000000000 R11: fffffbfff1f7f04f R12: dffffc0000000000
R13: 1ffff1102887017f R14: ffff888144380000 R15: 1ffff9200076ff54
spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
dummy_pullup+0x18c/0x200 drivers/usb/gadget/udc/dummy_hcd.c:926
usb_gadget_disconnect_locked+0x143/0x490 drivers/usb/gadget/udc/core.c:780
gadget_unbind_driver+0xc7/0x460 drivers/usb/gadget/udc/core.c:1685
device_remove drivers/base/dd.c:569 [inline]
__device_release_driver drivers/base/dd.c:1274 [inline]
device_release_driver_internal+0x46f/0x800 drivers/base/dd.c:1297
driver_detach+0x1f3/0x2d0 drivers/base/dd.c:1360
bus_remove_driver+0x226/0x320 drivers/base/bus.c:785
usb_gadget_unregister_driver+0x4e/0x70 drivers/usb/gadget/udc/core.c:1751
raw_release+0xd7/0x260 drivers/usb/gadget/legacy/raw_gadget.c:463
__fput+0x44c/0xa70 fs/file_table.c:468
task_work_run+0x1d4/0x260 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:44 [inline]
exit_to_user_mode_loop+0xff/0x4f0 kernel/entry/common.c:75
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x2e3/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff71818f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc6614e5d8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 000000000001fed9 RCX: 00007ff71818f749
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 000000056614e8cf
R10: 0000001b31f20000 R11: 0000000000000246 R12: 00007ff7183e5fac
R13: 00007ff7183e5fa0 R14: ffffffffffffffff R15: 0000000000000003
</TASK>
----------------
Code disassembly (best guess):
0: 89 f0 mov %esi,%eax
2: 48 c1 e8 03 shr $0x3,%rax
6: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1)
b: 74 08 je 0x15
d: 4c 89 f7 mov %r14,%rdi
10: e8 67 4e 21 fb call 0xfb214e7c
15: 49 83 3e 00 cmpq $0x0,(%r14)
19: 74 40 je 0x5b
1b: e8 bc fe ba fa call 0xfabafedc
20: 48 8d 3d 75 5b c5 08 lea 0x8c55b75(%rip),%rdi # 0x8c55b9c
27: 48 89 de mov %rbx,%rsi
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: b8 f0 ff ff ff mov $0xfffffff0,%eax
34: eb 11 jmp 0x47
36: e8 a1 fe ba fa call 0xfabafedc
3b: eb 05 jmp 0x42
3d: e8 .byte 0xe8
3e: 9a (bad)
3f: fe .byte 0xfe
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply
* [PATCH] MAINTAINERS: Change Linus Walleij mail address
From: Linus Walleij @ 2025-11-30 16:14 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: linux-kernel, linux-gpio, linux-iio, linux-input, dri-devel,
linux-arm-kernel, Linus Walleij
I will be using my kernel.org mail address going forward.
There is no point in splitting this MAINTAINERS patch up
per subsystem, I will just include it with the rest of my
patches to pin control in the next merge window.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
MAINTAINERS | 58 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 181a58ec4a8d..13f61acdc8f7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -195,7 +195,7 @@ F: drivers/pinctrl/pinctrl-upboard.c
F: include/linux/mfd/upboard-fpga.h
AB8500 BATTERY AND CHARGER DRIVERS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
F: Documentation/devicetree/bindings/power/supply/*ab8500*
F: drivers/power/supply/*ab8500*
@@ -2045,7 +2045,7 @@ F: Documentation/devicetree/bindings/display/arm,hdlcd.yaml
F: drivers/gpu/drm/arm/hdlcd_*
ARM INTEGRATOR, VERSATILE AND REALVIEW SUPPORT
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/arm/arm,integrator.yaml
@@ -2203,7 +2203,7 @@ F: Documentation/devicetree/bindings/memory-controllers/arm,pl35x-smc.yaml
F: drivers/memory/pl353-smc.c
ARM PRIMECELL SSP PL022 SPI DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/spi/spi-pl022.yaml
@@ -2216,7 +2216,7 @@ F: drivers/tty/serial/amba-pl01*.c
F: include/linux/amba/serial.h
ARM PRIMECELL VIC PL190/PL192 DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/interrupt-controller/arm,vic.yaml
@@ -2633,7 +2633,7 @@ F: tools/perf/util/cs-etm.*
ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
M: Hans Ulli Kroll <ulli.kroll@googlemail.com>
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
T: git https://github.com/ulli-kroll/linux.git
@@ -3035,7 +3035,7 @@ F: include/dt-bindings/clock/mstar-*
F: include/dt-bindings/gpio/msc313-gpio.h
ARM/NOMADIK/Ux500 ARCHITECTURES
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
@@ -3732,7 +3732,7 @@ F: Documentation/devicetree/bindings/media/i2c/asahi-kasei,ak7375.yaml
F: drivers/media/i2c/ak7375.c
ASAHI KASEI AK8974 DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-iio@vger.kernel.org
S: Supported
W: http://www.akm.com/
@@ -6758,7 +6758,7 @@ S: Maintained
F: drivers/pinctrl/pinctrl-cy8c95x0.c
CYPRESS CY8CTMA140 TOUCHSCREEN DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-input@vger.kernel.org
S: Maintained
F: drivers/input/touchscreen/cy8ctma140.c
@@ -6778,13 +6778,13 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/
F: drivers/media/common/cypress_firmware*
CYTTSP TOUCHSCREEN DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-input@vger.kernel.org
S: Maintained
F: drivers/input/touchscreen/cyttsp*
D-LINK DIR-685 TOUCHKEYS DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-input@vger.kernel.org
S: Supported
F: drivers/input/keyboard/dlink-dir685-touchkeys.c
@@ -7653,13 +7653,13 @@ T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: drivers/gpu/drm/tiny/appletbdrm.c
DRM DRIVER FOR ARM PL111 CLCD
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: drivers/gpu/drm/pl111/
DRM DRIVER FOR ARM VERSATILE TFT PANELS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/arm,versatile-tft-panel.yaml
@@ -7709,7 +7709,7 @@ F: Documentation/devicetree/bindings/display/panel/ebbg,ft8719.yaml
F: drivers/gpu/drm/panel/panel-ebbg-ft8719.c
DRM DRIVER FOR FARADAY TVE200 TV ENCODER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: drivers/gpu/drm/tve200/
@@ -7903,14 +7903,14 @@ F: include/dt-bindings/clock/qcom,dsi-phy-28nm.h
F: include/uapi/drm/msm_drm.h
DRM DRIVER FOR NOVATEK NT35510 PANELS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/novatek,nt35510.yaml
F: drivers/gpu/drm/panel/panel-novatek-nt35510.c
DRM DRIVER FOR NOVATEK NT35560 PANELS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml
@@ -8028,7 +8028,7 @@ F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml
F: drivers/gpu/drm/panel/panel-raydium-rm67191.c
DRM DRIVER FOR SAMSUNG DB7430 PANELS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml
@@ -8112,7 +8112,7 @@ F: Documentation/devicetree/bindings/display/solomon,ssd13*.yaml
F: drivers/gpu/drm/solomon/ssd130x*
DRM DRIVER FOR ST-ERICSSON MCDE
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/ste,mcde.yaml
@@ -8144,7 +8144,7 @@ F: Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml
F: drivers/gpu/drm/bridge/ti-sn65dsi86.c
DRM DRIVER FOR TPO TPG110 PANELS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml
@@ -8188,7 +8188,7 @@ F: drivers/gpu/drm/vmwgfx/
F: include/uapi/drm/vmwgfx_drm.h
DRM DRIVER FOR WIDECHIPS WS2401 PANELS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/samsung,lms380kf01.yaml
@@ -9482,7 +9482,7 @@ F: include/linux/fanotify.h
F: include/uapi/linux/fanotify.h
FARADAY FOTG210 USB2 DUAL-ROLE CONTROLLER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-usb@vger.kernel.org
S: Maintained
F: drivers/usb/fotg210/
@@ -10669,7 +10669,7 @@ F: drivers/gpio/gpio-sloppy-logic-analyzer.c
F: tools/gpio/gpio-sloppy-logic-analyzer.sh
GPIO SUBSYSTEM
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
M: Bartosz Golaszewski <brgl@bgdev.pl>
L: linux-gpio@vger.kernel.org
S: Maintained
@@ -13033,7 +13033,7 @@ F: Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
F: drivers/iio/imu/inv_icm42600/
INVENSENSE MPU-3050 GYROSCOPE DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-iio@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.yaml
@@ -13948,7 +13948,7 @@ F: drivers/auxdisplay/ks0108.c
F: include/linux/ks0108.h
KTD253 BACKLIGHT DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
F: drivers/video/backlight/ktd253-backlight.c
@@ -14159,7 +14159,7 @@ F: drivers/ata/pata_arasan_cf.c
F: include/linux/pata_arasan_cf_data.h
LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-ide@vger.kernel.org
S: Maintained
F: drivers/ata/pata_ftide010.c
@@ -19663,7 +19663,7 @@ F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
F: drivers/pci/controller/dwc/*imx6*
PCI DRIVER FOR INTEL IXP4XX
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: Documentation/devicetree/bindings/pci/intel,ixp4xx-pci.yaml
F: drivers/pci/controller/pci-ixp4xx.c
@@ -19774,7 +19774,7 @@ F: drivers/pci/controller/cadence/pci-j721e.c
F: drivers/pci/controller/dwc/pci-dra7xx.c
PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-pci@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/pci/v3,v360epc-pci.yaml
@@ -20219,7 +20219,7 @@ K: (?i)clone3
K: \b(clone_args|kernel_clone_args)\b
PIN CONTROL SUBSYSTEM
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-gpio@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
@@ -21631,7 +21631,7 @@ F: Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
F: drivers/watchdog/realtek_otto_wdt.c
REALTEK RTL83xx SMI DSA ROUTER CHIPS
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
M: Alvin Šipraga <alsi@bang-olufsen.dk>
S: Maintained
F: Documentation/devicetree/bindings/net/dsa/realtek.yaml
@@ -23384,7 +23384,7 @@ S: Supported
F: net/smc/
SHARP GP2AP002A00F/GP2AP002S00F SENSOR DRIVER
-M: Linus Walleij <linus.walleij@linaro.org>
+M: Linus Walleij <linusw@kernel.org>
L: linux-iio@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
---
base-commit: 6156424a7d001cceeafe59b52209d6f36719b51d
change-id: 20251130-linusw-kernelorg-email-0791125070f4
Best regards,
--
Linus Walleij <linusw@kernel.org>
^ permalink raw reply related
* Re: hid_multitouch - random non-responsive, multitouch, scrolling and zooming
From: Steven Haigh @ 2025-11-30 5:56 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Stéphane Chatty, Peter Hutterer, linux-input
In-Reply-To: <c12cb1c4-2d6c-47c9-835c-898ad83677bc@crc.id.au>
Hi all,
Just wanted to follow this up to see where we're currently at.
Thanks in advance.
On 14/11/25 15:04, Steven Haigh wrote:
> On 11/10/25 00:54, Benjamin Tissoires wrote:
>>
>> Right now the most valuable would be to test the series at
>> https://lore.kernel.org/linux-input/20251008-fix-sticky-fingers-
>> v1-0-760f1f26fce3@kernel.org/T/#m0fba507cbd43acd36bef28151ecb90b7077606a4
>>
>> If this work and you want a quick and dirty fix you can then return to
>> the default kernel, and use the BPF from https://
>> gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/204, the
>> latest version should be compatible with your device, just re-download
>> and install it again.
>>
>> But definitely a tested-by on the kernel patch would be appreciated :)
>
> Hi all, I know its been a while - and I almost forgot about this after
> installing the BPF update to test.
>
> That is until I did a reinstall on that laptop of a fresh Fedora 43 KDE
> install. Oh my, what I didn't realise was actually fixed :)
>
> I checked here again:
> https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/
> merge_requests/204/pipelines
>
> It looks like the artifacts that I downloaded prior don't seem to be on
> the gitlab instance anymore.
>
> I grabbed a different artifact, but I'm pretty sure that was based on
> the main branch, so it didn't apply to my touchpad.
>
> I had a look around, and noticed that the kernel side fixes seem to be
> in the works for 6.18.0 - am I understanding that right?
>
> I can see some 6.18.0-rc5 packages for Fedora that I can probably shoe-
> horn into Fedora 43 if that is a reasonable way forward.
>
> What's the best way at the moment to go forwards now?
>
--
Steven Haigh
📧 netwiz@crc.id.au
💻 https://crc.id.au
^ permalink raw reply
* [PATCH] HID: pidff: Do not set out of range trigger button
From: Tomasz Pakuła @ 2025-11-29 18:46 UTC (permalink / raw)
To: jikos, bentiss; +Cc: oleg, linux-input
Some games (mainly observed with Kylotonn's WRC Serises) set trigger
button to a random value, or always the same one, out of range.
I observed 307 and other values but, for example, my Moza R9 only
exposes 128 buttons AND it's trigger button field is 8-bit. This causes
errors to appear in dmesg.
Only set the trigger button and trigger interval in the trigger button
is in range of the field.
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
---
drivers/hid/usbhid/hid-pidff.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 95377c5f6335..a4e700b40ba9 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -523,9 +523,19 @@ static void pidff_set_effect_report(struct pidff_device *pidff,
pidff_set_duration(&pidff->set_effect[PID_DURATION],
effect->replay.length);
- pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = effect->trigger.button;
- pidff_set_time(&pidff->set_effect[PID_TRIGGER_REPEAT_INT],
- effect->trigger.interval);
+ /* Some games set this to random values that can be out of range */
+ s32 trigger_button_max =
+ pidff->set_effect[PID_TRIGGER_BUTTON].field->logical_maximum;
+ if (effect->trigger.button <= trigger_button_max) {
+ pidff->set_effect[PID_TRIGGER_BUTTON].value[0] =
+ effect->trigger.button;
+ pidff_set_time(&pidff->set_effect[PID_TRIGGER_REPEAT_INT],
+ effect->trigger.interval);
+ } else {
+ pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = 0;
+ pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0;
+ }
+
pidff->set_effect[PID_GAIN].value[0] =
pidff->set_effect[PID_GAIN].field->logical_maximum;
--
2.52.0
^ permalink raw reply related
* Re: [PATCH v4 2/3] platform/x86: thinkpad_acpi - Add doubletap_filter sysfs interface
From: Hans de Goede @ 2025-11-29 14:48 UTC (permalink / raw)
To: Vishnu Sankar, corbet, dmitry.torokhov, hmh, derekjohn.clark,
ilpo.jarvinen
Cc: mpearson-lenovo, linux-doc, linux-input, linux-kernel,
ibm-acpi-devel, platform-driver-x86, vsankar
In-Reply-To: <20251129002533.9070-3-vishnuocv@gmail.com>
Hi Vishnu,
On 29-Nov-25 1:25 AM, Vishnu Sankar wrote:
> Add sysfs interface for controlling TrackPoint doubletap event filtering.
> This allows userspace to enable/disable doubletap functionality and
> query the current state.
>
> The attribute is available at:
> /sys/devices/platform/thinkpad_acpi/doubletap_filter
>
> When set to 1, doubletap events are filtered out (ignored).
> When set to 0, doubletap events are processed (default).
>
> This complements the automatic hardware enablement in the trackpoint
> driver by providing user control over event processing at the kernel level.
>
> Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com>
> Suggested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> ---
> Changes in v2:
> - Updated commit message to clarify dependency on trackpoint driver
> - Now handling sysfs read/write of trackpoint driver using file read/write
> - Removed sysfs attribute creation of trackpoint double tap here
> - Reversed the logic and return false right away
> - Dropped unnecessary debug messages
> - Using dev_dbg() instead of pr_xxxx()
>
> Changes in v3:
> - No changes
>
> Changes in v4:
> - Simplified approach: single sysfs attribute for user control
> - Clear naming: doubletap_filter instead of doubletap_enabled
> - Intuitive behavior: 0=process events, 1=filter events
> - No cross-driver dependencies or complex interactions
> - Minimal code changes using existing thinkpad_acpi infrastructure
> ---
> ---
> drivers/platform/x86/lenovo/thinkpad_acpi.c | 54 +++++++++++++++++++--
> 1 file changed, 49 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index cc19fe520ea9..9b646ecff452 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> @@ -373,7 +373,7 @@ static struct {
> u32 hotkey_poll_active:1;
> u32 has_adaptive_kbd:1;
> u32 kbd_lang:1;
> - u32 trackpoint_doubletap:1;
> + u32 trackpoint_doubletap_filter:1;
Why the rename? The new name suggests that events will be filtered
when trackpoint_doubletap_filter = 1, so inverted of the old name
but when processing events events are let through when
trackpoint_doubletap_filter == 1 so 1 means _not_ filtering which
makes the name weird:
> + /* Only send the event if kernel-level filtering allows it */
> + if (tp_features.trackpoint_doubletap_filter)
> tpacpi_input_send_key(hkey, send_acpi_ev);
Maybe you forgot to add an '!' here, iow this should become:
/* Only send the event if kernel-level filtering allows it */
if (!tp_features.trackpoint_doubletap_filter)
tpacpi_input_send_key(hkey, send_acpi_ev);
?
> struct quirk_entry *quirks;
> } tp_features;
>
> @@ -3104,8 +3104,35 @@ static void tpacpi_send_radiosw_update(void)
> hotkey_radio_sw_notify_change();
> }
>
> +static ssize_t doubletap_filter_show(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> + return sysfs_emit(buf, "%d\n", tp_features.trackpoint_doubletap_filter);
> +}
> +
> +static ssize_t doubletap_filter_store(struct device *dev,
> + struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
> + bool filter;
> + int err;
> +
> + err = kstrtobool(buf, &filter);
> + if (err)
> + return err;
> +
> + tp_features.trackpoint_doubletap_filter = filter;
> + return count;
> +}
> +
> +static DEVICE_ATTR_RW(doubletap_filter);
> +
> static void hotkey_exit(void)
> {
> + if (tpacpi_pdev)
> + device_remove_file(&tpacpi_pdev->dev, &dev_attr_doubletap_filter);
> +
New code should not use device_create_file() / device_remove_file() instead
the attribute should be added to hotkey_attributes[] and then the driver
core will automatically add/remove it.
> mutex_lock(&hotkey_mutex);
> hotkey_poll_stop_sync();
> dbg_printk(TPACPI_DBG_EXIT | TPACPI_DBG_HKEY,
> @@ -3557,8 +3584,22 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
>
> hotkey_poll_setup_safe(true);
>
> - /* Enable doubletap by default */
> - tp_features.trackpoint_doubletap = 1;
> + /*
> + * Enable kernel-level doubletap event filtering by default.
> + * This allows doubletap events to reach userspace.
> + */
> + tp_features.trackpoint_doubletap_filter = 1;
Again this seems to be inverted, or if you really want
trackpoint_doubletap_filter to work as an enable flag
then please rename it to trackpoint_doubletap_enable.
> +
> + /* Create doubletap_filter sysfs attribute */
> + if (tpacpi_pdev) {
> + int err = device_create_file(&tpacpi_pdev->dev, &dev_attr_doubletap_filter);
> + if (err) {
> + pr_warn("Unable to create doubletap_filter sysfs attribute\n");
> + /* Continue even if sysfs creation fails */
> + } else {
> + pr_info("ThinkPad ACPI doubletap_filter sysfs attribute created\n");
> + }
> + }
This can be dropped (replaced by adding the attr to hotkey_attributes[].
Regards,
Hans
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox