Correct - it should not be used in a production environment. The help text for it even says it is only a debug tool:6by9: can you, or any of the other Pi engineers, comment on the use of pinctrl in production environments? My understanding is that, as it writes directly to hardware registers and that being prone to races, it should only be used as a debugging tool NOT as a general hardware access solution. Some are suggesting it as the universal solution over libgpiod and other libraries that use the standard kernel interfaces.
Code:
WARNING! pinctrl set writes directly to the GPIO control registersignoring whatever else may be using them (such as Linux drivers) -it is designed as a debug tool, only use it if you know what youare doing and at your own risk!
The general recommendation from Pi Towers is libgpiod for C and gpiozero for Python.
Statistics: Posted by 6by9 — Sun Aug 18, 2024 6:55 pm