lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0807171807420.29856@t2.domain.actdsltmp>
Date:	Fri, 18 Jul 2008 02:20:42 -0700 (PDT)
From:	Trent Piepho <tpiepho@...escale.com>
To:	Anton Vorontsov <avorontsov@...mvista.com>
cc:	Grant Likely <grant.likely@...retlab.ca>,
	Richard Purdie <rpurdie@...ys.net>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Kumar Gala <galak@...nel.crashing.org>,
	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: [PATCH v3] leds: implement OpenFirmare GPIO LED driver

On Fri, 18 Jul 2008, Anton Vorontsov wrote:
> On Thu, Jul 17, 2008 at 01:18:18PM -0700, Trent Piepho wrote:
>> Basically what I did then in my patch then, refactor leds-gpio so most of
>> it is shared and there is a block of code that does platform binding and
>> another block that does of_platform binding.
>
> Ok. I must admit I'm quite burned out with OF gpio-leds. I was posting the
> bindings since April, probably four or five times. Last time a week ago,
> IIRC.
>
> During the months I received just a few replies, one from Grant ("Looks
> good to me."), few from Segher (with a lot of criticism, that I much
> appreciated and tried to fix all spotted issues), and one from Laurent
> (about active-low LEDs).

I'm sorry, I never saw those emails.  Were they all to linuxppc-dev?  I hate
reading that list, gmane, marc, and lkml.org don't archive it and
mail-archive.com isn't nearly as nice.

Is this the last version?
http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg18355.html

Why did you get rid of "linux,default-trigger" and the active-low property? 
I couldn't find any discussion about this.  When I first saw your current
patch I was going to add them, but I see you already had them and then
removed them.

I'd like to replace my "led-hack" stg patch with this, but I need
default-trigger to do that.  I don't need active-low or default-brightness,
but they seem like a good idea.  Actually, if you look closely at the patch
I posted, you'll see I had modified the existing leds-gpio driver to add a
default-brightness feature, though I don't need it anymore.  The requirement
changed from having an led on during kernel boot to having it flash.  I
have another hack for that, since there is no way to pass parameters to a
trigger.

>> leds {
>>  	compatible = "gpio-led";
>>  	led@6 {
>>  		gpios = <&mpc8572 6 0>;
>>  		label = "red";
>>  	};
>>  	led@7 {
>>  		gpios = <&mpc8572 7 0>;
>>  		label = "green";
>>  	};
>> };
>
> I like this. Or better what Grant suggested, i.e. move label to node
> name.

Ok, I used that.  It's like the new way partitions are defined in NOR flash
OF bindings.  My first example was more like the old way.  The led name can
come from a label property or if there is none then the node name is used. 
I don't think you can have colons or spaces in node names.  I don't have a
default trigger property, but I'd really like to have that.  I could add an
active low flag too.  Maybe compatible should be "gpio-leds", since you can
define more than one?

The patch is done and works for me.  One can select platform device and/or
of_platform device support via Kconfig.  I'll port it to the git kernel and
post it soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ