linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: linuxppc-dev@ozlabs.org
Subject: Using gpiolib to power off my system
Date: Wed, 12 Nov 2008 11:51:44 +0100	[thread overview]
Message-ID: <200811121151.45208.jbe@pengutronix.de> (raw)

Hi list,

I want to use the gpiolib API in a routine that should poweroff the system=
=20
(MPC5200B). I register my poweroff routine in the define_machine() macro as:

[...]
=2Epower_off	=3D my_power_off,
[...]

In this routine I'm using gpio_request(...), gpio_direction_output(...) and=
=20
gpio_set_value(...) ---- but nothing happens.

When I set the GPIOs in the hard way (ioremap() + playing with the register=
s)=20
the system switches off as expected.

How to get some useful debug output at this late system state (printk does =
not=20
work anymore)?

Regards,
Juergen
=2D-=20
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
=A0Pengutronix - Linux Solutions for Science and Industry
=A0   Handelsregister: Amtsgericht Hildesheim, HRA 2686
=A0 =A0 =A0    Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9

                 reply	other threads:[~2008-11-12 10:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200811121151.45208.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=linuxppc-dev@ozlabs.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).