From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Conor Dooley <conor@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
Peter Rosin <peda@axentia.se>, Linus Walleij <linusw@kernel.org>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-gpio@vger.kernel.org, David Jander <david@protonic.nl>
Subject: Re: [PATCH v4 1/6] dt-bindings: pinctrl: add NXP MC33978/MC34978 MSDI
Date: Mon, 16 Mar 2026 11:49:25 +0100 [thread overview]
Message-ID: <abfgNaCp4VeKZUWE@pengutronix.de> (raw)
In-Reply-To: <20260313-shortwave-baguette-5914f1af60f8@spud>
On Fri, Mar 13, 2026 at 05:16:31PM +0000, Conor Dooley wrote:
> On Fri, Mar 13, 2026 at 03:02:12PM +0100, Oleksij Rempel wrote:
...
> > +maintainers:
> > + - David Jander <david@protonic.nl>
> > + - Oleksij Rempel <o.rempel@pengutronix.de>
> > +
> > +description: |
> > + The MC33978 and MC34978 are Multiple Switch Detection Interface (MSDI)
> > + devices with 22 switch inputs, integrated fault detection, and analog
> > + multiplexer (AMUX) for voltage/temperature monitoring.
> > +
> > + Pin numbering:
> > + - Pins 0-13: SG0-SG13 (Switch-to-Ground inputs). These pins monitor
> > + contacts closed to ground and typically require GPIO_ACTIVE_LOW
> > + flags when used as digital inputs.
> > + - Pins 14-21: SP0-SP7 (Programmable inputs). These can be configured
> > + as SG (Switch-to-Ground) or SB (Switch-to-Battery) inputs. SB
> > + inputs monitor contacts closed to the battery voltage and typically
> > + require GPIO_ACTIVE_HIGH flags when used as digital inputs.
> > +
> > + Output Emulation:
> > + The hardware lacks standard push-pull output drivers. Outputs are emulated
> > + by toggling the programmable wetting current sources (acting as pull-ups
> > + or pull-downs) and the hardware tri-state registers. Because of this
> > + physical constraint:
> > + - Consumers using pins as outputs MUST flag them with GPIO_OPEN_DRAIN or
> > + GPIO_OPEN_SOURCE in the device tree.
> > + - Push-pull configurations are physically unsupported.
> > + - The active polarity depends entirely on the external circuit (e.g., how
> > + an LED is wired) and must be flagged accordingly by the consumer.
> > +
> > +allOf:
> > + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - nxp,mc33978
> > + - nxp,mc34978
>
> What's different about these that a fallback is not suitable?
The difference are operation temperature ranges. But, it is not
detectable by software. This information can be reused for the hwmon.
> > +patternProperties:
> > + '^.*-grp$':
> > + type: object
> > + $ref: /schemas/pinctrl/pincfg-node.yaml#
> > + additionalProperties: false
> > + description: Pin configuration subnodes.
> > + properties:
> > + pins: true
>
> This seems overly permissive, think it should only allow the couple of
> options that your hardware has. Probably just make it an enum? Shouldn't
> have to check the driver to know what the acceptable pin names are.
Some thing like this?
pins:
items:
enum: [ sg0, sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8, sg9,
sg10, sg11, sg12, sg13, sp0, sp1, sp2, sp3,
sp4, sp5, sp6, sp7 ]
Best Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5\x7f555 |
next prev parent reply other threads:[~2026-03-16 10:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 14:02 [PATCH v4 0/6] mfd: Add support for NXP MC33978/MC34978 MSDI Oleksij Rempel
2026-03-13 14:02 ` [PATCH v4 1/6] dt-bindings: pinctrl: add " Oleksij Rempel
2026-03-13 17:16 ` Conor Dooley
2026-03-16 10:49 ` Oleksij Rempel [this message]
2026-03-16 11:02 ` Conor Dooley
2026-03-13 14:02 ` [PATCH v4 2/6] mfd: add NXP MC33978/MC34978 core driver Oleksij Rempel
2026-03-13 14:02 ` [PATCH v4 3/6] pinctrl: core: Make pin group callbacks optional Oleksij Rempel
2026-03-13 14:02 ` [PATCH v4 4/6] pinctrl: add NXP MC33978/MC34978 pinctrl driver Oleksij Rempel
2026-03-13 14:02 ` [PATCH v4 5/6] hwmon: add NXP MC33978/MC34978 driver Oleksij Rempel
2026-03-13 14:02 ` [PATCH v4 6/6] mux: add NXP MC33978/MC34978 AMUX driver Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abfgNaCp4VeKZUWE@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=david@protonic.nl \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=peda@axentia.se \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox