API for pull-up/pull-down configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I can imagine this question has already been asked in the past, but I
couldn't find a useful answer.

I have a GPIO expander over I2C,
https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdf, which is
supported by the existing gpio-pca953x.c driver. This GPIO expander has
built-in pull-up and pull-down resistors, which can be configured by
the PULL_EN and PULL_SET registers:

#define PCAL953X_PULL_EN	0x23
#define PCAL953X_PULL_SEL	0x24

Unfortunately, these are not used anywhere in the driver, and I'm
wondering what is the right interface for configuring this?

Since this GPIO controller is not tied to any pinmux controller, there
is no place to define the configuration of pins.

What would be the upstream-acceptable way of providing a mechanism to
configure such GPIO configuration ? A vendor-specific DT property ? A
generic DT property ? Something else ?

Of course, I could solve that on my side with a quick non-upstream hack
in gpio-pca953x, but if there's a reasonable solution that could be
accepted upstream, I'd very much prefer to go in this direction.

Thanks for your insights,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux