linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: shmobile: Enable DSW2 with gpio-keys on KZM9D
Date: Tue, 19 Nov 2013 11:33:08 +0900	[thread overview]
Message-ID: <20131119023302.GJ17628@verge.net.au> (raw)
In-Reply-To: <CANqRtoTb-93b8UPyRLOBS11eXVuoqSB0A5CkGFYMhw42DGsKaQ@mail.gmail.com>

On Thu, Nov 14, 2013 at 05:45:22PM +0900, Magnus Damm wrote:
> Hi Simon,
> 
> On Thu, Nov 14, 2013 at 3:27 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Thu, Nov 14, 2013 at 02:22:06PM +0900, Simon Horman wrote:
> >> On Thu, Nov 14, 2013 at 08:03:45AM +0900, Magnus Damm wrote:
> >> > From: Magnus Damm <damm@opensource.se>
> >> >
> >> > Use the gpio-keys driver to support the 4 pins on the
> >> > dip switch DSW2 which is mounted on the KZM9D board.
> >> >
> >> > Signed-off-by: Magnus Damm <damm@opensource.se>
> >>
> >> Hi Magnus,
> >>
> >> I have tried enabling the following on a config produced
> >> using the kzm9d_defconfig:
> >>
> >> CONFIG_INPUT_KEYBOARD
> >> CONFIG_INPUT_EVDEV
> >> CONFIG_KEYBOARD_GPIO
> >>
> >> But all I see so far in dmsg is:
> >>
> >> # dmesg | grep gpio
> >> platform gpio_keys.3: Driver gpio-keys requests probe deferral
> >>
> >> I was expecting something more along the lines of:
> >> input: gpio-keys as /devices/platform/gpio-keys/input/input0
> >>
> >> Could you give me some guidance on how to test this?
> >
> > I now notice that I also need
> > "[PATCH 00/03] gpio: R-Car and EM GPIO update"
> >
> > But with that applied I now see:
> >
> > # dmesg  | grep gpio
> > gpio-keys gpio_keys.3: Failed to request GPIO 14, error -517
> > platform gpio_keys.3: Driver gpio-keys requests probe deferral
> 
> Thanks for testing. In case of EMEV2 we don't have any PFC support, so
> because of that you probably need to deselect PINCTRL. The patch below
> does the trick, but for proper operation you probably have to split
> this up per-SoC. And these days KZM9D is MULTIPLATFORM only where
> PINCTRL probably wants to be set as a global default, so I suppose the
> proper way to support this is to add PFC support for EMEV2.

Thanks. This hack worked. Although curiously while I see keyboard
events for pins 1 - 3 I don't get any for pin 4. Perhaps there is
a hardware fault on my board.

> Another option would be to make these two cases behave the same:
> - PINCTRL=y but no pinctrl support for the SoC
> - PINCTRL=n

I'm unsure of what the best way forward is. It seems that
the nicest option would be to add PFC support for KZM9D.
But is that likely to happen?

If not, I think your last suggestion would be best.
Though I'm not quite sure that I understand the implementation implications.

> --- 0001/arch/arm/Kconfig
> +++ work/arch/arm/Kconfig    2013-11-14 17:42:36.000000000 +0900
> @@ -655,7 +655,7 @@ config ARCH_SHMOBILE
>      select MIGHT_HAVE_CACHE_L2X0
>      select MULTI_IRQ_HANDLER
>      select NO_IOPORT
> -    select PINCTRL
> +#    select PINCTRL
>      select PM_GENERIC_DOMAINS if PM
>      select SPARSE_IRQ
>      help
> 
> Cheers,
> 
> / magnus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2013-11-19  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 23:03 [PATCH] ARM: shmobile: Enable DSW2 with gpio-keys on KZM9D Magnus Damm
2013-11-14  5:22 ` Simon Horman
2013-11-14  6:27   ` Simon Horman
2013-11-14  8:45     ` Magnus Damm
2013-11-19  2:33       ` Simon Horman [this message]

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=20131119023302.GJ17628@verge.net.au \
    --to=horms@verge.net.au \
    --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;
as well as URLs for NNTP newsgroup(s).