Skip to content

ARM: Kirkwood: Convert to pinctrl

Thomas Petazzoni linux-arm-kernel 1 version New

Get series with b4
b4 am 20121025082826.693939b0@skate

Versions newest first

  1. v1 Latest0 of 9 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 9 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 0/9] ARM: Kirkwood: Convert to pinctrl

Andrew,

Quoted 9 lines · Andrew Lunn

Thanks Thomas, i will play around with this.

I'm just wondering if we are going to get into ordering issues. These gpio operations are providing power to subsystems. We probably need that to happen before the driver is loaded. If we call of_platform_populate() too early, do we have the danger the driver probing is going to happen before the init routine can enable the power?

Quoted 3 lines

It seems like we want pinctrl/gpio working first, with pins hogged as specified in DT, then the board init() function, then the rest of DT setup.

If those GPIO value settings are needed to get a particular driver to work, then I'd recommend letting the driver do the GPIO value setting. For example, in the lsxl board, I see:

        /* usb and sata power on */
        gpio_set_value(LSXL_GPIO_USB_POWER, 1);
        gpio_set_value(LSXL_GPIO_HDD_POWER, 1);

If the LSXL_GPIO_USB_POWER GPIO should be set to one to get the EHCI driver to work properly, then I think we should let the EHCI driver set this GPIO value in its ->probe() operation. Of course, the GPIO reference will be passed in the platform_data (for old-style probing), or through specific DT properties (for new-style, DT-based, probing).

Regarding the LSXL_GPIO_HDD_POWER GPIO, I am not sure. Is it required to apply power on this GPIO to get the SATA driver to probe properly, or is it possible to get the SATA driver to probe properly, then apply power and have the HDD still being recognized? I haven't looked at all at how SATA drivers were working, so I can't say.

Also, ultimately, if those GPIOs are providing power, then they should probably not be handled as simple GPIOs, but rather as regulator, using the gpio-regulator driver. But let's do things steps by steps :-)

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com