From: philipp.zabel@gmail.com (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pxa/hx4700: Add hx4700 LED support
Date: Wed, 27 Apr 2011 21:07:14 +0200 [thread overview]
Message-ID: <1303931236.14964.21.camel@flow> (raw)
In-Reply-To: <323465.41879.qm@web29009.mail.ird.yahoo.com>
Am Mittwoch, den 27.04.2011, 16:05 +0100 schrieb Paul Parsons:
[...]
> > Please do not hard-code the timebase, periodtime, dutytime
> > and
> > autostopcount parameters in platform data. This should be
> > hooked up to
> > led_blink_set(), really.
> I just kept things simple. Will look into it.
Ok. An alternative would be to just disable hardware blinking for the
first version.
[...]
> > Is this relevant to the led support?
> No, but it helps to confirm the mapping between platform and asic3 GPIOs. Other mfd drivers define the label so why not asic3? If you're saying that this should be submitted as a separate patch then fair enough.
In this case yes, a separate patch would be better.
[...]
> > Where did you get this information? I don't have
> > WinCE+HaRET installed
> > right now, but I'm pretty sure that my old notes say that
> > these were
> > configured as low outputs by default, and I believe the SDG
> > Systems code
> > even triggered them as if to power the LEDs, although I'm
> > not sure of
> > that right now.
> I got it from observation. Writing the 3 LED GPIOs had no effect despite the options I tried. Reading them was a different story however; it always returned the current on/off state.
> For example:
> # echo 162 > /sys/class/gpio/export # platform #162 = asic3 #34
> # cat /sys/class/gpio/gpio162/value
> 0
> # echo 1 > /sys/class/gpio/gpio162/value # has no effect
> # cat /sys/class/gpio/gpio162/value
> 0
> # echo 1 > /sys/class/leds/hx4700:blue/brightness # turn on
> # cat /sys/class/gpio/gpio162/value
> 1
> # echo 0 > /sys/class/gpio/gpio162/value # has no effect
> # cat /sys/class/gpio/gpio162/value
> 1
> #
> A more compelling illustration that the 3 LED GPIOs are configured as inputs comes from the amber LED, which blinks on / off for about one second each:
> # echo 160 > /sys/class/gpio/export # platform #160 = asic3 #32
> # echo 1 > /sys/class/leds/hx4700:amber/brightness # start blinking
> # while true; do cat /sys/class/gpio/gpio160/value; sleep 1; done
> 1
> 0
> 1
> 0
> 1
> 0
> 1
> 0
> etc...
> If anyone can demonstrate how the 3 LED GPIOs can be used as outputs then I'll be happy to revisit this.
Ok, thanks. I will look into this.
regards
Philipp
next prev parent reply other threads:[~2011-04-27 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 16:54 [PATCH] pxa/hx4700: Add hx4700 LED support Paul Parsons
2011-04-27 9:55 ` Philipp Zabel
2011-04-27 15:05 ` Paul Parsons
2011-04-27 19:07 ` Philipp Zabel [this message]
2011-04-28 19:09 ` Russell King - ARM Linux
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=1303931236.14964.21.camel@flow \
--to=philipp.zabel@gmail.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;
as well as URLs for NNTP newsgroup(s).