-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mcp23s17 fixes #6769
base: rpi-6.12.y
Are you sure you want to change the base?
mcp23s17 fixes #6769
Conversation
All DT configured GPIO controllers are meant to have gpio-ranges if linking pinctrl and gpio. As the mcp23s17 driver does, add them. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
In order for gpio-ranges to be registered correctly, the pinctrl device needs to be registered before the gpiochip. The mcp23s08 driver was doing them in the opposite order. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
In order to use gpioget to set bias pull up settings, the gpiochip function list needs a set_config function. gpiochip_generic_config is applicable for mcp23s08, so configure it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Whilst PIN_CONFIG_BIAS_PULL_UP had been implemented to enable the 100k pull-up resistor, PIN_CONFIG_BIAS_DISABLE hadn't been implemented to disable it again. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Is doing a get on BIAS_DISABLE really a thing? |
Most drivers seem to think so: Although I can't find the definitive docs for what it meant to be returned when, and what the argument part of the |
I'd say this is an exemplary implementation: https://github.com/raspberrypi/linux/blob/rpi-6.12.y/drivers/pinctrl/pinctrl-rp1.c#L1470-L1472 |
If we treat the pinconf_get semantics for the individual bias modes as a boolean query as to whether or not that mode is selected, then the implementation of the |
#6763