From: "Vijay Padiyar" <vijay_padiyar@hotmail.com>
To: "Yuli Barcohen" <yuli@arabellasw.com>,
"LinuxPPC Support" <linuxppc-embedded@ozlabs.org>
Subject: problem opening I2C device on MPC8260
Date: Sat, 12 Mar 2005 13:27:26 +0530 [thread overview]
Message-ID: <BAY1-DAV14F92D2B45266ECD1105A48B540@phx.gbl> (raw)
Hi there
I am running Linux-2.6.10 with BusyBox 1.0 on an MPC8260-based target. I'm
having problems opening the I2C controller device on the MPC8260.
I have now included I2C support in the kernel by setting the following
options:
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_ALGOBIT=y
None of the options under "I2C Hardware Bus support" and "Hardware Sensor
Chip support" are set. Do I need to enable any of these for MPC8260?
I have also mounted the Sysfs filesystem using 'mount -t sysfs sysfs /sys'.
When the kernel boots up, I can see the following message:
"i2c /dev entries driver"
which is from the I2C module initialization function i2c_dev_init() in
i2c-dev.c. This means that the I2C module has been loaded and initialized
correctly. However, the /sys/class/i2c-dev folder is found to be *empty*.
I have also created the following I2C device files in my /dev folder:
mknod i2c-0 c 89 0
mknod i2c0 c 89 0
mknod i2c-1 c 89 1
mknod i2c1 c 89 1
When I try to open the I2C device from a user program in root mode, I get an
error and the value of errno is ENODEV.
if ((fd = open("/dev/i2c-0", O_RDWR)) < 0)
{
printf ("Error: ");
if (errno == ENODEV)
printf ("No such device!\n");
}
Please tell me what I could be doing wrong? Is there anything I've missed in
setting up my configuration to use I2C? Is there anything more I need to do?
Regards
Vijay Padiyar
http://www.vijaypadiyar.eu.tf
next reply other threads:[~2005-03-12 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-12 7:57 Vijay Padiyar [this message]
2005-03-12 13:54 ` problem opening I2C device on MPC8260 Yuli Barcohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY1-DAV14F92D2B45266ECD1105A48B540@phx.gbl \
--to=vijay_padiyar@hotmail.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=yuli@arabellasw.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox