LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-27-2011, 01:05 AM   #1
Shum
LQ Newbie
 
Registered: Oct 2007
Posts: 23

Rep: Reputation: 0
Can't detect i2c device


I have a real time clock on my motherboard that I'd like to use. It's connected via the SMBus which is normally registered as i2c-0 during boot. I'm using this driver for it, it patches and compiles fine and registers the i2c driver during boot.

However I'm not having any luck instantiating the device. I've added the following to the code for my mainboard:
Code:
static struct i2c_board_info i2c_board_info[] __initdata = {
        {
                I2C_BOARD_INFO("rtc-isl12024", 0x57),
        },
};

... (in __init function)
        i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info));
My understanding is that this registers my driver with i2c bus 0 so when the kernel creates the SMBus adapter it should probe my driver. Instead this causes the SMBus to be registered as i2c-1 and my driver never gets probed.

I've also tried registering the device from user space. Instead of calling i2c_register_board_info during boot I run
Code:
echo rtc-isl12024 0x57 > /sys/bus/i2c/devices/i2c-0/new_device
This succeeds, ie. it returns 0 and doesn't complain about a write error like it does if I give it any other address, but it still doesn't probe my driver .

I'm doing this on a Gentoo 2.6.33 realtime kernel.
Any ideas? What could I be doing wrong?
 
  


Reply

Tags
kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conky - sensors-detect > modprobe i2c-nforce2 > WARNING: Error inserting i2c_core... macroron Slackware 2 07-12-2007 03:10 PM
I2C device driver mylinuxdna Linux - General 0 10-10-2005 02:16 AM
I2C to external device ojschubert Linux - Newbie 1 03-20-2005 06:26 PM
i2c and lm_sensors, sensors-detect johnnydangerous Fedora 2 03-15-2005 04:28 PM
I can't detect I2c-philips-par adapter? thaodt Linux - Software 0 06-07-2004 02:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration