* query regarding I2C controller on MPC8260
@ 2005-03-11 12:58 Vijay Padiyar
2005-03-11 20:39 ` Yuli Barcohen
0 siblings, 1 reply; 2+ messages in thread
From: Vijay Padiyar @ 2005-03-11 12:58 UTC (permalink / raw)
To: LinuxPPC Support
Hi there
I am using an MPC8260-based target board. My target is running U-Boot 1.1.2
as the bootloader and Linux-2.6.10 as the kernel with BusyBox-1.0. I wish to
use the I2C controller on the MPC8260 to access an external EEPROM connected
to it. I need to do this from *user space*.
>From what I understand, we can open the I2C device with the open command
from our application as follows:
ret = open ("/dev/i2c-0", O_RDWR);
After this, the device should be accessible using either standard I2C
functions or SMBus functions.
I read that if the I2C controller supports SMBus, it will be preferable to
access the device via the SMBus read/write functions, as they seem to be
more "efficient." What I want to know is, does the PowerPC I2C controller
support the SMBus protocol? I don't think it does, judging from the MPC8260
manual, but just want to be sure.
Also, do we need to create the /dev/i2c-0 device file manually or will it be
created on the fly?
Regards
Vijay Padiyar
http://www.vijaypadiyar.eu.tf
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: query regarding I2C controller on MPC8260
2005-03-11 12:58 query regarding I2C controller on MPC8260 Vijay Padiyar
@ 2005-03-11 20:39 ` Yuli Barcohen
0 siblings, 0 replies; 2+ messages in thread
From: Yuli Barcohen @ 2005-03-11 20:39 UTC (permalink / raw)
To: Vijay Padiyar; +Cc: linuxppc-embedded
>>>>> Vijay Padiyar writes:
Vijay> Hi there I am using an MPC8260-based target board. My target
Vijay> is running U-Boot 1.1.2 as the bootloader and Linux-2.6.10 as
Vijay> the kernel with BusyBox-1.0. I wish to use the I2C controller
Vijay> on the MPC8260 to access an external EEPROM connected to
Vijay> it. I need to do this from *user space*.
Vijay> From what I understand, we can open the I2C device with the
Vijay> open command from our application as follows:
Vijay> ret = open ("/dev/i2c-0", O_RDWR);
Vijay> After this, the device should be accessible using either
Vijay> standard I2C functions or SMBus functions.
Vijay> I read that if the I2C controller supports SMBus, it will be
Vijay> preferable to access the device via the SMBus read/write
Vijay> functions, as they seem to be more "efficient." What I want
Vijay> to know is, does the PowerPC I2C controller support the SMBus
Vijay> protocol? I don't think it does, judging from the MPC8260
Vijay> manual, but just want to be sure.
It does not support SMBus but since it's a full-featured I2C controller,
it's not a problem. SMBus emulation mode can be used on any I2C
controller.
Vijay> Also, do we need to create the /dev/i2c-0 device file
Vijay> manually or will it be created on the fly?
It depends on the /dev filesystem which you use. If it's devfs (or you
use udev), the file will be created on the fly, otherwise you have to
create it manually.
--
========================================================================
Yuli Barcohen | Phone +972-9-765-1788 | Software Project Leader
yuli@arabellasw.com | Fax +972-9-765-7494 | Arabella Software, Israel
========================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-11 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-11 12:58 query regarding I2C controller on MPC8260 Vijay Padiyar
2005-03-11 20:39 ` Yuli Barcohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox