On Tue, Sep 02, 2025 at 01:59:22PM +0200, Bartosz Golaszewski wrote: > > The name of the pin function has no real meaning to pinctrl core and is > there only for human readability of device properties. Some pins are > muxed as GPIOs but for "strict" pinmuxers it's impossible to request > them as GPIOs if they're bound to a devide - even if their function name > explicitly says "gpio". Add a new field to struct pinfunction that > allows to pass additional flags to pinctrl core. Which I disagree with. The pin control _knows_ about itself. If one needs to request a pin as GPIO it can be done differently (perhaps with a new, special callback or with the existing ones, I need to dive to this). On a brief view this can be done in the same way as valid_mask in GPIO, actually this is exactly what should be (re-)used in my opinion here. > While we could go with > a boolean "is_gpio" field, a flags field is more future-proof. This sentence is probably extra in the commit message and can be omitted. > If the PINFUNCTION_FLAG_GPIO is set for a given function, the pin muxed > to it can be requested as GPIO even on strict pin controllers. So. this changes the contract between pin control (mux) core and drivers. Why? How is it supposed to work on the really strict controllers, please? > Add a new callback to struct pinmux_ops - function_is_gpio() - that allows > pinmux core to inspect a function and see if it's a GPIO one. Provide a > generic implementation of this callback. -- With Best Regards, Andy Shevchenko