• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Controlling green LED.  (Read 4359 times)
mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« on: October 04, 2009, 10:32:56 AM »

Is there a way to control the green LED on the sheeva?  (I have he blue one working very well as my "unread mail" indicator), and would like to utilise the green one too.

Is it even possible?  (is it hardwired?), or does it require kernel hacks?
« Last Edit: October 04, 2009, 10:42:37 AM by mgillespie » Logged

noman
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #1 on: October 07, 2009, 05:59:17 AM »

It's possible, but not that easy.

This is for the Rev 1.3
First you have to desolder R242 and put it on the place of R70.
You also have to patch the Kernel, but that's very easy, i have done it already.
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #2 on: October 07, 2009, 03:00:49 PM »

Is there any reason why the sysfs control for the blue LED is called plug:green:health? 
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #3 on: October 09, 2009, 09:55:31 AM »

It's possible, but not that easy.

This is for the Rev 1.3
First you have to desolder R242 and put it on the place of R70.
You also have to patch the Kernel, but that's very easy, i have done it already.

Do you have details of the kernel patch involved?  I need to weigh up the cost of not being able to use standard kernels anymore.... and all the hurt that cross compiling brings...
Logged

paulo_raca
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #4 on: October 12, 2009, 09:08:30 AM »

That`s pretty simple, actually.
Check arch/arm/mach-kirkwood/sheevaplug-setup.c
I think all you have to do is adding a new entry to sheevaplug_led_pins[].
You'll also need to know the right GPIO pin.

(That`s also the place to change the name of plug:green:health to anything you want)
Logged

noman
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #5 on: October 14, 2009, 07:01:19 AM »


Do you have details of the kernel patch involved?  I need to weigh up the cost of not being able to use standard kernels anymore.... and all the hurt that cross compiling brings...
Ack, you have to add the new "LED" to the struct gpio_led sheevaplug_led_pins[] and add the GPIO to the sheevaplug_mpp_config
Code:
static struct gpio_led sheevaplug_led_pins[] = {
{
.name = "plug:blue9:health",
.default_trigger = "default-on",
.gpio = 49,
.active_low = 1,
},
{
.name = "plug:green8:health",
.default_trigger = "default-on",
.gpio = 48,
.active_low = 1,
},
{
.name = "plug:green6:health",
.default_trigger = "default-on",
.gpio = 46,
.active_low = 1,
},
{
.name = "plug:green5:health",
.default_trigger = "default-on",
.gpio = 45,
.active_low = 1,
},
};
Code:
static unsigned int sheevaplug_mpp_config[] __initdata = {
MPP29_GPIO, /* USB Power Enable */
MPP49_GPIO, /* LED */
MPP48_GPIO,
MPP46_GPIO,
MPP45_GPIO,
0
};
Logged

snake
Newbie
*

Karma: 3
Posts: 37



View Profile
« Reply #6 on: October 14, 2009, 10:03:20 PM »

That`s pretty simple, actually.
Check arch/arm/mach-kirkwood/sheevaplug-setup.c
I think all you have to do is adding a new entry to sheevaplug_led_pins[].
You'll also need to know the right GPIO pin.

(That`s also the place to change the name of plug:green:health to anything you want)

Thanks for this information...  It helped me to control the individual colors in the tricolor LED mounted on my plugcomputer... Cheesy
Logged

tbm
Full Member
***

Karma: 7
Posts: 121



View Profile WWW
« Reply #7 on: October 15, 2009, 01:17:48 AM »

Is there any reason why the sysfs control for the blue LED is called plug:green:health? 

It is green on older versions of the SheevaPlug (such as mine).
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #8 on: October 15, 2009, 01:31:52 PM »

It is green on older versions of the SheevaPlug (such as mine).
So what colour is the other one - the one that isn't green for you (but is green  for me!)?  Do you have 2 LEDs on the top edge?
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #9 on: October 17, 2009, 01:29:52 PM »

My LEDs are Green (top; nearest the electrical connector) and Blue (bottom; nearest the ethernet and USB ports).  I think early Plugs had Green and Red.  Any other combinations out there?
Logged

Pages: [1]
Print
Jump to: