Skip to content

pinctrl: mvebu: numerous fixes, cleanups and improvements

Thomas Petazzoni linux-arm-kernel stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 34 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 34 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/34] pinctrl: mvebu: numerous fixes, cleanups and improvements

Hello,

Quoted 2 lines · Andrew Lunn

I read a presentation recently, "Device Tree as a stable ABI: a fairy tale?" :-)

Reminds me of something :)

Quoted 5 lines

But we should at least try. So what is actually involved in keeping backwards compatibility?

The two patches i pointed out have two different situations.

Quoted 8 lines

What does pinctrl do when you ask for a pin which is not a member of the function? If it silently ignores it, not a problem. But i expect it actually throws an error. I could be wrong here, but it looks like it is the mvebu code which checks if a pin is a member of a function. So it might be possible to set the value of the val in the mvebu_mpp_ctrl_setting to 0xff for the removed NAND pins, and when we see such a value, print a warning about outdated DT, and "succeed" rather than return an error.

This can only work if the function number is not actually used. For example, in the very first patch "pinctrl: mvebu: armada-38x: fix PCIe functions" :

- MPP_VAR_FUNCTION(4, "pcie1", "rstout", V_88F6820_PLUS),
+ MPP_VAR_FUNCTION(4, "ge0", "txerr", V_88F6810_PLUS),

So the function 4 used to be pcie1, which you would like to still be supported, but it's now actually used for ge0.

To be honest, I actually prefer that people updating their kernel and using an old DT get an error about pin muxing, rather than having the driver silently ignore and have people never update their Device Tree.

It's also about long term maintainability. Do we want to keep old crap around forever in all device drivers?

Quoted 2 lines

For spi -> spi0 it seems messier. So i would leave it as spi with a comment, and add spi1.

I'm fine with that.

What about tdm2c -> tdm renaming on Armada 38x, and tdm-1 -> tdm for one single TDM pin on Armada XP ?

I think we're hitting the limits of the DT backward compatibility: our description of the hardware had some bugs. What do we do? Continue to support bugs?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com