From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
Date: Thu, 25 Oct 2012 08:28:26 +0200 [thread overview]
Message-ID: <20121025082826.693939b0@skate> (raw)
In-Reply-To: <20121025054638.GB8590@lunn.ch>
Andrew,
On Thu, 25 Oct 2012 07:46:38 +0200, Andrew Lunn wrote:
> 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?
>
> 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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-10-25 6:28 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
2012-10-24 14:53 ` [PATCH 1/9] ARM: Kirkwood: Convert TS219 " Andrew Lunn
2012-10-24 19:31 ` Thomas Petazzoni
2012-10-24 19:49 ` Sebastian Hesselbarth
2012-10-24 20:00 ` Thomas Petazzoni
2012-10-24 20:04 ` Andrew Lunn
2012-10-24 20:05 ` Thomas Petazzoni
2012-10-24 20:14 ` Sebastian Hesselbarth
2012-10-24 20:19 ` Thomas Petazzoni
2012-10-24 14:53 ` [PATCH 2/9] ARM: Kirkwood: Convert iConnect " Andrew Lunn
2012-10-24 14:53 ` [PATCH 3/9] ARM: Kirkwood: Convert dnskw " Andrew Lunn
2012-10-25 22:58 ` Jamie Lentin
2012-10-26 6:01 ` Andrew Lunn
2012-10-26 9:42 ` Jamie Lentin
2012-10-26 10:24 ` Andrew Lunn
2012-10-26 12:30 ` Jamie Lentin
2012-10-24 14:53 ` [PATCH 4/9] ARM: Kirkwood: Convert dockstar " Andrew Lunn
2012-10-24 14:53 ` [PATCH 5/9] ARM: Kirkwood: Convert dreamplug " Andrew Lunn
2012-10-24 14:53 ` [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net " Andrew Lunn
2012-10-26 17:28 ` Josh Coombs
2012-10-27 8:51 ` Andrew Lunn
2012-10-28 14:31 ` Josh Coombs
2012-10-24 14:53 ` [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 " Andrew Lunn
2012-10-24 20:40 ` Simon Baatz
2012-10-24 14:53 ` [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards " Andrew Lunn
2012-10-24 20:37 ` Michael Walle
2012-10-28 16:40 ` Michael Walle
2012-10-24 14:53 ` [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 " Andrew Lunn
2012-10-24 20:04 ` Thomas Petazzoni
2012-10-24 20:20 ` Andrew Lunn
2012-10-24 20:29 ` Thomas Petazzoni
2012-10-24 15:29 ` [PATCH 0/9] ARM: Kirkwood: Convert " Josh Coombs
2012-10-24 15:35 ` Andrew Lunn
2012-10-24 19:26 ` Thomas Petazzoni
2012-10-24 18:06 ` Michael Walle
2012-10-24 20:01 ` Andrew Lunn
2012-10-24 20:47 ` Michael Walle
2012-10-24 21:33 ` Thomas Petazzoni
2012-10-25 5:46 ` Andrew Lunn
2012-10-25 6:28 ` Thomas Petazzoni [this message]
2012-10-25 7:39 ` Michael Walle
2012-10-25 7:43 ` Thomas Petazzoni
2012-10-25 20:19 ` Michael Walle
2012-10-26 18:06 ` Michael Walle
2012-10-26 18:45 ` Thomas Petazzoni
2012-10-26 20:17 ` Michael Walle
2012-10-27 8:59 ` Andrew Lunn
2012-10-25 22:57 ` Jamie Lentin
2012-10-28 16:57 ` Andrew Lunn
2012-10-28 18:17 ` Michael Walle
2012-10-28 19:50 ` Simon Baatz
2012-10-28 20:01 ` Andrew Lunn
2012-10-28 21:06 ` Jamie Lentin
2012-10-31 22:38 ` Josh Coombs
2012-11-07 16:13 ` [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant Valentin Longchamp
2012-11-07 17:36 ` Andrew Lunn
2012-11-07 16:13 ` [PATCH 1/2] ARM: support 98DX412x kirkwoods with pinctrl Valentin Longchamp
2012-11-07 16:13 ` [PATCH 2/2] ARM: convert the km_kirkwood board to pinctrl Valentin Longchamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121025082826.693939b0@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox