linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>, Chris Ball <cjb@laptop.org>,
	Magnus <magnus.damm@gmail.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	linux-mmc@vger.kernel.org, linus.walleij@linaro.org
Subject: Re: [PATCH 01/16] gpio: rcar: use postcore_init()
Date: Mon, 18 Nov 2013 13:59:58 +0000	[thread overview]
Message-ID: <1556705.9JOUK7Uj8L@avalon> (raw)
In-Reply-To: <87fvqyo6gl.wl%kuninori.morimoto.gx@renesas.com>

Hi Morimoto-san,

(CC'ing Linus Walleij)

On Thursday 14 November 2013 16:26:53 Kuninori Morimoto wrote:
> Hi Laurent
> 
> > > Renesas GPIO is being interlocked with PFC, and GPIO is
> > > very basic system for R-Car.
> > > GPIO should be initialised in same timing as PFC.
> > > The GPIO based system doesn't work correctly without this patch.
> > 
> > Could you please describe the failure in a bit more details ?
> 
> Real kernel log is better than my explain :P
> These series needs gpio-regulator.
> *before* case, sh_mobile_sdhi can't use gpio-regulator because of timing
> issue.
> 
> ----------------- before ---------------------
> ...
> sh-pfc pfc-r8a7790: r8a77900_pfc support registered
> ...
> SDHI0Vcc: Failed to request enable GPIO184: -517
> reg-fixed-voltage reg-fixed-voltage.1: Failed to register regulator: -517
> platform reg-fixed-voltage.1: Driver reg-fixed-voltage requests probe
> deferral SDHI2Vcc: Failed to request enable GPIO185: -517
> reg-fixed-voltage reg-fixed-voltage.2: Failed to register regulator: -517
> platform reg-fixed-voltage.2: Driver reg-fixed-voltage requests probe
> deferral gpio-regulator gpio-regulator.0: Could not obtain regulator
> setting GPIOs: -517 platform gpio-regulator.0: Driver gpio-regulator
> requests probe deferral gpio-regulator gpio-regulator.1: Could not obtain
> regulator setting GPIOs: -517 platform gpio-regulator.1: Driver
> gpio-regulator requests probe deferral ...

Except for the verbosity of the error messages, this looks pretty sane to me. 
Regulator probe gets deferred because the required GPIO isn't accessible yet, 
and the device gets reprobed later on.

I'm not against moving the gpio-rcar initialization to postcore or subsys 
initcall, but in that case I believe we should standardize (or at least try 
to) this across the GPIO drivers. We currently have

$ cat drivers/gpio/gpio-*.c | grep _initcall | grep '^[a-z]' | sed 's/(.*//' | 
sort | uniq -c
      2 arch_initcall
      1 core_initcall
      1 device_initcall
      1 late_initcall
     11 postcore_initcall
      2 pure_initcall
     31 subsys_initcall

$ cat drivers/gpio/gpio-*.c | grep 'module_.*_driver' | sed 's/(.*//' | sort | 
uniq -c
      3 module_i2c_driver
      4 module_pci_driver
     23 module_platform_driver
      1 module_spi_driver

Linus, do you have any guidelines on this ?

> gpio_rcar gpio_rcar.0: driving 32 GPIOs
> gpio_rcar gpio_rcar.1: driving 32 GPIOs
> gpio_rcar gpio_rcar.2: driving 32 GPIOs
> gpio_rcar gpio_rcar.3: driving 32 GPIOs
> gpio_rcar gpio_rcar.4: driving 32 GPIOs
> gpio_rcar gpio_rcar.5: driving 32 GPIOs
> ...
> sh_mobile_sdhi sh_mobile_sdhi.0: mmc0 base at 0xee100000 clock rate 97 MHz
> sh_mobile_sdhi sh_mobile_sdhi.2: mmc1 base at 0xee140000 clock rate 48 MHz
> ...
> SDHI0Vcc: 3300 mV
> SDHI2Vcc: 3300 mV
> vqmmc: 1800 <--> 3300 mV at 3300 mV
> vqmmc: 1800 <--> 3300 mV at 3300 mV
> ...
> 
> ---------------- after ------------------
> ...
> sh-pfc pfc-r8a7790: r8a77900_pfc support registered
> gpio_rcar gpio_rcar.0: driving 32 GPIOs
> gpio_rcar gpio_rcar.1: driving 32 GPIOs
> gpio_rcar gpio_rcar.2: driving 32 GPIOs
> gpio_rcar gpio_rcar.3: driving 32 GPIOs
> gpio_rcar gpio_rcar.4: driving 32 GPIOs
> gpio_rcar gpio_rcar.5: driving 32 GPIOs
> ...
> SDHI0Vcc: 3300 mV
> SDHI2Vcc: 3300 mV
> vqmmc: 1800 <--> 3300 mV at 3300 mV
> vqmmc: 1800 <--> 3300 mV at 3300 mV
> ...
> sh_mobile_sdhi sh_mobile_sdhi.0: mmc0 base at 0xee100000 clock rate 97 MHz
> sh_mobile_sdhi sh_mobile_sdhi.2: mmc1 base at 0xee140000 clock rate 48 MHz

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-11-18 13:59 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 10:16 [PATCH 0/16] SDHI support for r8a7790 Kuninori Morimoto
2013-11-14 10:18 ` [PATCH 0/16]: gpio-rcar fixup Kuninori Morimoto
2013-11-14 10:19   ` [PATCH 01/16] gpio: rcar: use postcore_init() Kuninori Morimoto
2013-11-14 13:42     ` Laurent Pinchart
2013-11-15  0:26       ` Kuninori Morimoto
2013-11-18 13:59         ` Laurent Pinchart [this message]
2013-11-19  9:57           ` Linus Walleij
2013-11-19 12:36             ` Laurent Pinchart
2013-11-21  2:02               ` Kuninori Morimoto
2013-11-14 10:21 ` [PATCH 0/16] mmc: bug fix patches Kuninori Morimoto
2013-11-14 10:23   ` [PATCH 03/17] mmc: tmio: Fix odd size access Kuninori Morimoto
2013-11-14 13:32     ` Laurent Pinchart
2013-11-14 10:24   ` [PATCH 04/17] mmc: tmio: Add error IRQ status clear Kuninori Morimoto
2013-11-14 13:34     ` Laurent Pinchart
2013-11-14 10:24   ` [PATCH 05/17] mmc: tmio: don't overwrite caps2 Kuninori Morimoto
2013-11-14 13:36     ` Laurent Pinchart
2013-11-14 10:26 ` [PATCH 0/16] ARM: shmobile: bug fix Kuninori Morimoto
2013-11-14 10:27   ` [PATCH 06/17] ARM: shmobile: marzen: remove SDHI0 WP pin setting from DTS Kuninori Morimoto
2013-11-14 13:38     ` Laurent Pinchart
2013-11-14 10:27   ` [PATCH 07/17] ARM: shmobile: marzen: remove SDHI0 WP pin setting Kuninori Morimoto
2013-11-14 13:38     ` Laurent Pinchart
2013-11-14 10:27   ` [PATCH 08/17] ARM: shmobile: sh73a0: fixup sdhi compatible name Kuninori Morimoto
2013-11-14 13:39     ` Laurent Pinchart
2013-11-14 10:29 ` [PATCH 0/16] mmc: SDHI: add new feature Kuninori Morimoto
2013-11-14 10:30   ` [PATCH 09/17] mmc: tmio: bus_shift become tmio_mmc_data member Kuninori Morimoto
2013-11-14 10:31   ` [PATCH 10/17] mmc: tmio: add new TMIO_MMC_HAVE_HIGH_REG flags Kuninori Morimoto
2013-11-14 10:31   ` [PATCH 11/17] mmc: SDHI: add SoC specific workaround via HW version Kuninori Morimoto
2013-11-14 14:03     ` Sergei Shtylyov
2013-11-15  0:16       ` Kuninori Morimoto
2013-11-14 10:31   ` [PATCH 12/17] mmc: SDHI: tidyup sh_mobile_sdhi_of_match position Kuninori Morimoto
2013-11-14 10:32   ` [PATCH 13/17] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7778 Kuninori Morimoto
2013-11-14 10:32   ` [PATCH 14/17] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7779 Kuninori Morimoto
2013-11-14 10:32   ` [PATCH 15/17] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7790 Kuninori Morimoto
2013-11-14 10:34 ` [PATCH 0/16] ARM: shmobile: SDHI support " Kuninori Morimoto
2013-11-14 10:34   ` [PATCH 16/17] ARM: shmobile: lager: add SDHI0/2 support Kuninori Morimoto
2013-11-14 10:35   ` [PATCH 17/17] ARM: shmobile: lager: use gpio/fixed regulator for SDHI Kuninori Morimoto
2013-11-14 13:51     ` Laurent Pinchart
2013-11-15  0:42       ` Kuninori Morimoto
2013-11-14 13:46   ` [PATCH 0/16] ARM: shmobile: SDHI support for r8a7790 Laurent Pinchart
2013-11-15  0:43     ` Kuninori Morimoto
2013-11-15  1:53   ` Kuninori Morimoto
2013-11-15  1:55     ` [PATCH 1/2 v2] ARM: shmobile: lager: add gpio/fixed regulator for SDHI Kuninori Morimoto
2013-11-18 11:35       ` Laurent Pinchart
2013-11-19  5:14         ` Kuninori Morimoto
2013-11-19 12:45           ` Laurent Pinchart
2013-11-20  7:37             ` Kuninori Morimoto
2013-11-20 10:57               ` Laurent Pinchart
2013-11-21  1:53                 ` Kuninori Morimoto
2013-12-05  6:11       ` Kuninori Morimoto
2013-12-05  6:59       ` Simon Horman
2014-02-12  6:25       ` [PATCH 1/2 v2] ARM: shmobile: lager: add SDHI0/2 support Kuninori Morimoto
2013-11-15  1:56     ` [PATCH 2/2 " Kuninori Morimoto
2013-11-18  7:21     ` [PATCH 0/16] ARM: shmobile: SDHI support for r8a7790 Simon Horman
2013-11-18  7:42       ` Kuninori Morimoto
2013-11-21  3:53         ` Simon Horman
2013-11-21  5:20           ` Kuninori Morimoto
2013-11-21  8:48             ` Simon Horman
2013-11-20  0:43 ` [PATCH 0/16] " Kuninori Morimoto

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=1556705.9JOUK7Uj8L@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=cjb@laptop.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).