From: pawel.moll@arm.com (Pawel Moll)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] leds: Add generic support for memory mapped LEDs
Date: Mon, 26 Nov 2012 16:10:35 +0000 [thread overview]
Message-ID: <1353946235.10271.11.camel@hornet> (raw)
In-Reply-To: <CA+E=qVcjKz-3CAKrDVG+ymij5HAB5H=a9+4G0KOR0tTKLGJu4w@mail.gmail.com>
On Mon, 2012-11-26 at 15:37 +0000, Vasily Khoruzhick wrote:
> On Thu, Nov 1, 2012 at 8:58 PM, Pawel Moll <pawel.moll@arm.com> wrote:
> > LEDs are often controlled by writing to memory mapped
> > register. This patch adds:
> >
> > 1. Generic functions for platform code and drivers to create
> > class device for LEDs controlled by arbitrary bit masks.
> > The control register value is read, modified by logic AND
> > and OR operations with respective mask and written back.
> >
> > 2. A platform driver for simple use case when one or more LED
> > are controlled by consecutive bits in a register pointed
> > at by the platform device's memory resource. It can be
> > particularly useful for MFD cells being part of an other
> > device.
>
> This MMIO controls some latch (or whatever) which is actually GPIO.
> So implementing generic GPIO MMIO driver and using leds-gpio on top of
> it appears to be a better solution for me.
I won't argue that it is doable - I don't even have to implement the
MMIO GPIO driver, because my MFD already has a set of pseudo-GPIO lines
and extending those won't be a problem at all an I'll do exactly that if
there is no other choice. But at the same time I hope you would agree
that my_code->gpio_controller->gpio_led_description->register_device
chain is longer than my_code->mmio_led one if you want to add a single
"status" led for your little board ;-). I don't event mention that at
least couple of the existing drivers follow the same "MMIO pattern"
blindly.
Nevertheless I'd really like to hear from the maintainers...
Thanks!
Pawe?
prev parent reply other threads:[~2012-11-26 16:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 17:58 [PATCH 1/2] leds: Add generic support for memory mapped LEDs Pawel Moll
2012-11-01 17:58 ` [PATCH 2/2] mfd: vexpress-sysreg: Use MMIO driver for platform LEDs Pawel Moll
2012-11-05 9:39 ` [PATCH 1/2] leds: Add generic support for memory mapped LEDs Jon Medhurst (Tixy)
2012-11-05 12:55 ` Pawel Moll
2012-11-05 13:52 ` Jon Medhurst (Tixy)
2012-11-08 15:35 ` Pawel Moll
2012-11-19 11:44 ` Pawel Moll
2012-11-26 15:25 ` Pawel Moll
2012-11-26 15:37 ` Vasily Khoruzhick
2012-11-26 16:10 ` Pawel Moll [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=1353946235.10271.11.camel@hornet \
--to=pawel.moll@arm.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).