From: Ed W <lists@wildgooses.com>
To: grant.likely@secretlab.ca, dilinger@queued.net
Cc: linux-geode@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: New PCEngines Alix LED driver using gpio interface
Date: Fri, 18 Mar 2011 18:32:21 +0000 [thread overview]
Message-ID: <4D83A535.4090806@wildgooses.com> (raw)
In-Reply-To: <1300471949-29366-1-git-send-email-kernel@wildgooses.com>
Hi, Thanks for "mentoring" me over this. I appreciate that this
consumes your valuable time
I have reposted what I hope is close to the correct code for this new
driver. I'm somewhat apprehensive, so to draw attention to the things I
have most likely "done wrong":
> :000000 100644 0000000... bc1b3b3... A arch/x86/platform/geode/alix_leds.c
...
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index d5ed94d..b16ab56 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2094,6 +2094,15 @@ config OLPC_OPENFIRMWARE_DT
> default y if OLPC_OPENFIRMWARE && PROC_DEVICETREE
> select OF_PROMTREE
>
> +config ALIX_LEDS
> + bool "PCEngines ALIX.2/.3 LED Support"
> + select GPIOLIB
> + depends on LEDS_CLASS
> + depends on LEDS_GPIO_PLATFORM && GPIO_CS5535
> + ---help---
> + This option enables support for the PCEngines ALIX.2 and ALIX.3 LEDs.
> + You have to set alix-leds.force=1 for boards with Award BIOS.
> +
> endif # X86_32
Driver and KConfig show this being specifically a driver for the Alix
LEDs rather than being a general Alix plaform initialisation module?
I was unsure if the trend was to have one module which initialised all
Alix platform stuff (whatever it needs), or to split by function?
Looking at other platform modules they seem to be somewhat fine grained
so I went with a specific "ALIX Led Module" approach?
Additionally I am unsure how strictly to set dependencies for my module?
It clearly requires all the LED_GPIO_PLATFORM, GPIO_CS5535 dependencies
to do anything, but equally it doesn't seem to *break* anything if those
dependencies aren't compiled in? Listing all the dependencies seems to
make it hard for users to find the option to enable it since it's not
even listed in menuconfig until your deps are met? Please correct me as
to what level of deps should be listed?
On the topic of dependencies, Andres has changed cs5535-gpio.c to depend
on a new module cs5535-mfd - however, apart from the commit log message
this is not obvious to see? OK, I'm an idiot, but it took me most of
this afternoon to understand why my GPIOs stopped working after moving
to 2.6.38? Q: Should the new -mfd module be listed as a dep of -gpio?
Or perhaps -gpio should "select" -mfd? At least it would be helpful to
list the dependency in the Kconfig message?
Happy to submit a change - please advise on what (if anything) would be
the best solution?
Many thanks for your help and guidance so far
Ed W
next prev parent reply other threads:[~2011-03-18 18:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4D81D7FD.1040602@wildgooses.com>
2011-03-17 15:43 ` Feedback please: [PATCH] leds: New PCEngines Alix LED driver using gpio interface Andres Salomon
2011-03-17 16:08 ` Grant Likely
2011-03-17 17:24 ` Ed W
2011-03-17 17:52 ` Andres Salomon
2011-03-17 17:59 ` Ed W
2011-03-17 18:17 ` Grant Likely
2011-03-18 18:12 ` kernel
2011-03-18 18:32 ` Ed W [this message]
2011-03-18 22:48 ` Grant Likely
2011-03-19 16:51 ` [PATCH] leds: New PCEngines Alix system driver (enables LEDs via gpio interface) kernel
2011-03-19 17:21 ` Ed W
2011-03-24 3:52 ` Grant Likely
2011-03-19 17:46 ` [PATCH] gpio: Show explicit dependency between GPIO_CS5535 and MFD_CS5535 kernel
2011-03-19 19:59 ` Andres Salomon
2011-03-17 18:22 ` Feedback please: [PATCH] leds: New PCEngines Alix LED driver using gpio interface Andres Salomon
2011-03-17 18:12 ` Grant Likely
2011-03-17 17:04 ` Ed W
2011-03-17 18:07 ` Grant Likely
2011-03-06 16:51 kernel
2011-04-07 21:58 ` Andrew Morton
2011-04-07 22:41 ` Ed W
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=4D83A535.4090806@wildgooses.com \
--to=lists@wildgooses.com \
--cc=dilinger@queued.net \
--cc=grant.likely@secretlab.ca \
--cc=linux-geode@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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