Re: [PATCH v1 3/8] dt-bindings: pinctrl: add NXP MC33978/MC34978 pinctrl
From: Linus Walleij <linusw@kernel.org>
Date: 2026-02-26 23:00:55
Also in:
linux-gpio, linux-hwmon, lkml
Hi Oleksij, thanks for your patch for this very interesting hardware! On Wed, Feb 25, 2026 at 6:16 PM Oleksij Rempel [off-list ref] wrote:
Add device tree binding documentation for the pin control and GPIO block of the NXP MC33978/MC34978 Multiple Switch Detection Interface (MSDI). This block manages 22 switch detection inputs (14 Switch-to-Ground, 8 Programmable) and acts as a GPIO controller. Additionally, it supports pin configuration for hardware-specific features required for long-term contact maintenance in harsh environments, such as adjusting the continuous/pulsed wetting current to penetrate oxide layers on mechanical switches. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Are the hardware-specific pin configurations for oxide layer penetration (!) and stuff excluded from these bindings? (It looks like.)
quoted hunk ↗ jump to hunk
+++ b/Documentation/devicetree/bindings/pinctrl/nxp,mc33978-pinctrl.yaml@@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/nxp,mc33978-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP MC33978/MC34978 Pinctrl/GPIO Driver + +maintainers: + - David Jander <david@protonic.nl> + - Oleksij Rempel <o.rempel@pengutronix.de> + +description: | + Pin control and GPIO driver for the MC33978/MC34978 MSDI device. + + Pin numbering: + - Pins 0-13: SG0-SG13 (Switch-to-Ground inputs)
I don't know what a switch-to-ground input is, but I talked to an AI about it. It appears to be directly incorrect to use such a line without flagging it as GPIO_ACTIVE_LOW in the consumer so this should be mentioned here, GPIO lines 0-13 *must* be flagged GPIO_ACTIVE_LOW. (I don't know a good way to enforce it in schema, sadly, maybe Conor has ideas.)
+ - Pins 14-21: SP0-SP7 (Programmable inputs, can be SG or SB)
What is SB now? Please explain :) Other than that it looks good to me! Yours, Linus Walleij