linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] gpio: Add simple poweroff-gpio driver
Date: Thu, 3 May 2012 14:00:34 +0100	[thread overview]
Message-ID: <20120503130034.GA897@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1336033446-18949-1-git-send-email-jm@lentin.co.uk>

On Thu, May 03, 2012 at 09:24:06AM +0100, Jamie Lentin wrote:
> Given appropriate devicetree bindings, this driver registers a
> pm_power_off function to set a GPIO line high/low and power down
> your board.
> 
> Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
> ---
> Here's an attempt at doing this. All works fine, I've not submitted a
> patch to use it since GPIO patches for kirkwood aren't finalised, but
> you can see it being used here:-
> 
> https://github.com/lentinj/linux.git v3.4-rc4-clk-next-orion-dnskw-gpio
> 
> The main issue is where to put it. I'm not convinced that drivers/gpio
> is an appropriate home, however drivers/power and drivers/hwmon (where
> drivers with similar purpose live) contain frameworks this is not part
> of. drivers/mfd has some modules that can power off, but this is hardly
> multifunction :) Could also give in and use drivers/misc.
> 
> Feedback appreciated.

We already have something like this, but specific to a group of SoCs.

Please take a look at arch/arm/mach-pxa/reset.c and consider the behaviour
found there, so we don't end up creating something which PXA can't use.
Thanks.

Note that some PXA platforms want the GPIO for resetting to be configured
as an input when it's not required to assert the reset signal.

      parent reply	other threads:[~2012-05-03 13:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120501172042.GA13233@lunn.ch>
2012-05-01 18:34 ` [PATCH 1/1] ARM: kirkwood: Add support for RaidSonic Jamie Lentin
2012-05-01 19:56   ` Andrew Lunn
2012-05-02 13:29     ` Jamie Lentin
2012-05-02 21:31       ` Simon Baatz
2012-05-03 12:14         ` Andrew Lunn
2012-05-03  8:24     ` [PATCH] gpio: Add simple poweroff-gpio driver Jamie Lentin
2012-05-03  8:48       ` Andrew Lunn
2012-05-03 10:09         ` Jamie Lentin
2012-05-03 10:26           ` Andrew Lunn
2012-05-03  8:50       ` Andrew Lunn
2012-05-03 11:21       ` Luka Perkov
2012-05-03 13:00       ` Russell King - ARM Linux [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=20120503130034.GA897@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).