Hi, * Matthijs Kooijman <matthijs@xxxxxxxx> [240228 12:04]: > While figuring out why bias-setting on the beaglebone black did not > work, I noticed what looks like a bug in the pinctrl-single driver, > preventing it from disabling a bias once enabled. > > The short version is: It handles pin_config_set by looking up the requested > setting in a DT-defined lookup table, which defines what bits correspond to > each setting. For PIN_CONFIG_BIAS_DISABLE, this never works since that setting > is never defined in the lookup table (so the code that exists to handle this > setting is never actually executed). OK > It seems this code has been broken since it was first introduced in > commit 9dddb4df90d1 (pinctrl: single: support generic pinconf). > > An obvious fix for this would be to lift the handling for > PIN_CONFIG_BIAS_DISABLE out of the inner loop, running that instead of > the inner loop in that case. Maybe post a suggested patch for Haojian to look at? > Note that I have not verified my analysis of the code by testing. I did > confirm that if I define the (what I think is) proper DT definitions for > bias control for the beaglebone black board, I can enable bias, but not > disable them, but I cannot rule out that that problem has a different > cause. I also do not have a good toolchain setup for compiling custom > kernels for this setup (and limited time for setting up one), so I do > not expect to be able to provide more testing or a patch anytime soon. The buildall script should allow you to easily build a cross compiler on pretty much any current Linux host. I think this is the current git tree for it: https://github.com/nathanchance/buildall Seems like buildall should be hosted at kernel.org but I don't know the details, so adding Nathan to Cc too. Regards, Tony