Forum | Documentation | Website | Blog

Skip to content

am335x: pinmux: Allow bias to be controlled by gpio

This tells the pinmux controller what bits in the pinmux register are used to control the pull-up and pull-down. This allows the pinmux controller to handle PIN_CONFIG_BIAS_PULL_UP and PIN_CONFIG_BIAS_PULL_DOWN requests, as made by the gpio controller (in the omap_gpio_set_config function) when requested by userspace.

Before this commit, the pinctrl would not know how to handle these requests, so the bias was unchanged (pinctrl should return an error, but somehow this error did not reach all the way back to userspace).

With this commit, the pullups can be enabled as expected on all pins covered by the universal GPIO DT. In addition to adding the pinctrl-single,bias-pullup/down attributes, this also switches the compatible string from pinctrl,single to pinconf,single. This loads the same driver, with the only difference that it enables this pin configuration API.

This change is modeled after a similar change in mainline for the pocketbeagle:

https://github.com/torvalds/linux/commit/abe4e4675dfc62b7f2328e2c4bce8b5bdcdff7c0
https://github.com/torvalds/linux/commit/adf7045147a53709318948c6948647ac07ed9661

The syntax of these properties is .

Note that the pocketbeagle commits contains incorrect "disable" item, which do not actually disable the bias by setting the 0x08 bits. This is correct in this commit (which also required changing the "value" item, since that should match either the enable or disable items but is otherwise unused). Also note that disabling the bias is not actually supported by the driver due to this bug:

https://github.com/torvalds/linux/commit/abe4e4675dfc62b7f2328e2c4bce8b5bdcdff7c0

Merge request reports