i2c for omap5912,help me
Hi ,
I'm using an omap5912 and would like to light the led D3
on the board thru the i2c driver.
Now I can not see nothing in /proc/sys/dev/ and /dev, but I can see there is something about
i2c in /proc/bus/. I can not open the file,Could there
be something wrong with my opening the dev file ? I hope there is someone who knows my problem? Thanks in advance.
Below are the debug msg aswell as the code.
int adapter_nr = 0;
int file;
char filename[20];
sprintf(filename,"/dev/i2c-%d",adapter_nr);
if ((file = open(filename,O_RDWR)) < 0) {
printf("Error Opening File\n");
exit(1);
}the file value is allways 1,Who can help me?Thanks!
Hi,
Does this help?
http://oskfordummies.hp.infoseek.co.jp/howto/led.html
Regards,
Ishigami
-----Original Message-----
From: 李玮 [mailto:[email protected]]
Sent: Thursday, December 07, 2006 10:51 PM
To: [email protected]
Subject: i2c for omap5912,help me
Hi ,
I'm using an omap5912 and would like to light the led D3
on the board thru the i2c driver.
Now I can not see nothing in /proc/sys/dev/ and /dev, but I can see there is something about
i2c in /proc/bus/. I can not open the file,Could there
be something wrong with my opening the dev file ? I hope there is someone who knows my problem? Thanks in advance.
Below are the debug msg aswell as the code.
int adapter_nr = 0;
int file;
char filename[20];
sprintf(filename,"/dev/i2c-%d",adapter_nr);
if ((file = open(filename,O_RDWR)) < 0) {
printf("Error Opening File\n");
exit(1);
}the file value is allways 1,Who can help me?Thanks!
Quoted 2 lines
I'm using an omap5912 and would like to light the led D3
on the board thru the i2c driver.
In the kernel, <asm/arch/tps65010.h> exports
extern int tps65010_set_led(unsigned led, unsigned mode); extern int tps65010_set_gpio_out_value(unsigned gpio, unsigned value);
which are used for those LEDs. D3 is connected to TPS65010 GPIO 2...