On Thu, Aug 13, 2020 at 10:06:55AM +0200, Linus Walleij wrote: > Patch applied. It's clearly better like this. A plain bug. Thanks! > Do you think we can fix it properly by reading both the > DATS and DATC registers to do the inverse of what > __nmk_gpio_set_pull() does and give a proper readout > of pull up/down? Sadly I don't think this will work. Both the DATS and DATC registers return the contents of the DAT register on a read, so we'd be back to where we are without the patch I posted. To me it seems like this pin controller just doesn't support any method to probe the hardware for the current pull state. I had considered seeing if this state was stored in software anywhere, but decided against it since there's a good chance a bootloader setup some pin configurations as well, and that would cause the output to not match up with the actual hardware state. > Out of curiosity: what hardware are you testing this on? I have access to an Accordo5 (sta1295 - not upstreamed). Thanks, Andrew