linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* FW: LED driver
@ 2005-03-17  5:15 srinivas.surabhi
  2005-03-17  6:15 ` akash kaul
  2005-03-17  9:46 ` FW: " Hans Schillstrom
  0 siblings, 2 replies; 6+ messages in thread
From: srinivas.surabhi @ 2005-03-17  5:15 UTC (permalink / raw)
  To: linuxppc-embedded




-----Original Message-----
From: Srinivas Surabhi (WT01 - TELECOM SOLUTIONS)=0D
Sent: Thursday, March 17, 2005 7:53 AM
To: linuxppc-embedded@ozlabs.org
Subject: LED driver=0D

Hi,

I am working on the MPC8270 board having connected GPIO 3 lines
connected to 3 LEDs. So can any one help me in finding out the best
solution of controlling the LEDs from MVlinux (kernel and user space) or
any pointers who has done it before.=0D

Thanks & Rgds
SS=0D




Confidentiality Notice=0D

The information contained in this electronic message and any attachments to=
 this message are intended
for the exclusive use of the addressee(s) and may contain confidential or=
 privileged information. If
you are not the intended recipient, please notify the sender at Wipro or=
 Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: FW: LED driver
@ 2005-03-17 12:47 srinivas.surabhi
  2005-03-17 12:53 ` Hans Schillstrom
  0 siblings, 1 reply; 6+ messages in thread
From: srinivas.surabhi @ 2005-03-17 12:47 UTC (permalink / raw)
  To: hans.schillstrom; +Cc: linuxppc-embedded


Thanks a lot for your help. But in my sources I could not find=0D
immap_cpm2.h file. There is immap_8260.h file, I don't know it is
similar to that of immap_cpum2.h.=0D

Can you send the immap_cpum2.h file please?

I am working on kernel 2.4.20=0D

-Thanks once again..
SS

-----Original Message-----
From: Hans Schillstrom [mailto:hans.schillstrom@pwav.com]=0D
Sent: Thursday, March 17, 2005 3:17 PM
To: Srinivas Surabhi (WT01 - TELECOM SOLUTIONS)
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: FW: LED driver

Hi,
I have made a driver for our mpc8270 board=0D
It is based upon Denx led_driver and made for 2.6 kernel
(See atached file)

To control the leds you have to perfom some ioctl's
first create your devices=0D
mknod led0 c 151 0 ...

Example howto use it:

void led_off( int file )
{
  if (ioctl(file,STATUSLED_SET,0) < 0)
    perror("led off: ");
}
void led_blink( int file )
{
  if (ioctl(file,STATUSLED_SET,1) < 0)
    perror("led blink: ");
}
void led_on( int file )
{
  if (ioctl(file,STATUSLED_SET,2) < 0)
    perror("led on: ");
}
void led_per( int file, int period )
{
  if (ioctl(file,STATUSLED_PERIOD,period) < 0)
    perror("led on: ");
}

...

int led0 =3D open("/dev/led0",O_RDWR)
...
  led_blink(led0);	/* turn on green LED */
..
/Hans


On Thu, 2005-03-17 at 06:15, srinivas.surabhi@wipro.com wrote:
>=0D
> -----Original Message-----
> From: Srinivas Surabhi (WT01 - TELECOM SOLUTIONS)
> Sent: Thursday, March 17, 2005 7:53 AM
> To: linuxppc-embedded@ozlabs.org
> Subject: LED driver
>=0D
> Hi,
>=0D
> I am working on the MPC8270 board having connected GPIO 3 lines
> connected to 3 LEDs. So can any one help me in finding out the best
> solution of controlling the LEDs from MVlinux (kernel and user space)
or
> any pointers who has done it before.
>=0D
> Thanks & Rgds
> SS
>=0D
>=0D
>=0D
>=0D
> Confidentiality Notice
>=0D
> The information contained in this electronic message and any
attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential
or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro
or Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=0D



Confidentiality Notice=0D

The information contained in this electronic message and any attachments to=
 this message are intended
for the exclusive use of the addressee(s) and may contain confidential or=
 privileged information. If
you are not the intended recipient, please notify the sender at Wipro or=
 Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-17 12:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-17  5:15 FW: LED driver srinivas.surabhi
2005-03-17  6:15 ` akash kaul
2005-03-17  9:46 ` FW: " Hans Schillstrom
2005-03-17 11:35   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-03-17 12:47 srinivas.surabhi
2005-03-17 12:53 ` Hans Schillstrom

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).