|
|
|
Re: I2C (still) | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
I've recomplied the kernel, and I'm getting this now at boot (dmesg): i2c /dev entries driver i2c-gpio: probe failed: -19 Current kernel config: CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_ALGOBIT=y CONFIG_I2C_GPIO=y # Miscellaneous I2C Chip support CONFIG_I2C_DEBUG_CORE=y CONFIG_I2C_DEBUG_ALGO=y CONFIG_I2C_DEBUG_BUS=y CONFIG_I2C_DEBUG_CHIP=y Any ideas? Tamas On Wed, 19 Nov 2008 10:11:28 +1100, Aras Vaichas <arasv@xxxxxxxxxxxxxx> wrote: > viper@xxxxxxxxxxx wrote: >> Hi all, >> >> I'm still not able to use the i2c. I still don't know what's the matter. >> > ... > >> The result, when I try to run it: >> >> root@(none):/mnt/tmp# ./srf08_user >> Opening /dev/i2c >> Error opening /dev/i2c! Exiting (-1 - No such device). > > You test file looks OK. I fixed all the compilation errors with your > #includes, compiled it, and it works for me: > > /root # ./a.out > Opening /dev/i2c > Setting slave addr to 0x50 > Getting available IOCTLs > Requesting SW version: > Exiting. > > Your error indicates that something is wrong with creating the i2c-0 > device. > > > So start from the top and see where you've gone wrong: > > I'm using Linux 2.6.26.3. > > This is my config, and it looks similar to yours, except that I use the > algobit driver because I need to perform block writes (which fail with > the original method) > $ grep I2C .config > CONFIG_I2C=y > CONFIG_I2C_BOARDINFO=y > CONFIG_I2C_CHARDEV=y > CONFIG_I2C_HELPER_AUTO=y > CONFIG_I2C_ALGOBIT=y > CONFIG_I2C_GPIO=y > > In this release of the kernel it appears that the > arch/arm/mach-at91/at91rm9200_devices.c file automatically adds the i2c > device for you, so there is nothing that you have to do in your board > file (unless you wish to add some i2c peripherals). > > Check to see if the kernel has registered an i2c device: > > # dmesg | grep -i i2c > <7>PM: Adding info for platform:i2c-gpio > <6>i2c /dev entries driver > <7>PM: Adding info for No Bus:i2c-0 > <7>PM: Adding info for i2c:0-0068 > <7>PM: Adding info for No Bus:i2c-0 > <6>i2c-gpio i2c-gpio: using pins 57 (SDA) and 58 (SCL) > > Check to see if /sys knows anything about i2c in general > > # find /sys -iname "*i2c*" > /sys/devices/platform/i2c-gpio > /sys/devices/platform/i2c-gpio/i2c-adapter > /sys/devices/platform/i2c-gpio/i2c-adapter/i2c-0 > /sys/devices/platform/i2c-gpio/i2c-adapter/i2c-0/i2c-0 > /sys/bus/platform/devices/i2c-gpio > /sys/bus/platform/drivers/i2c-gpio > /sys/bus/platform/drivers/i2c-gpio/i2c-gpio > /sys/bus/i2c > /sys/class/i2c-adapter > /sys/class/i2c-adapter/i2c-0 > /sys/class/i2c-dev > /sys/class/i2c-dev/i2c-0 > /sys/module/i2c_algo_bit > > I remember that you aren't running udev, right? So you created the i2c > nodes yourself? > > # ll /dev/i2c* > crw-rw- ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM] [Linux ARM MSM] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Asterisk Internet PBX] [Linux API]
![]() |
![]() |