* Re: I2C -bus programming [not found] ` <4A8491E3.4070907-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2009-08-14 11:23 ` Jonathan Cameron [not found] ` <4A854936.5060409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 2+ messages in thread From: Jonathan Cameron @ 2009-08-14 11:23 UTC (permalink / raw) To: Kari Laine Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-i2c-u79uwXL29TY76Z2rM5mHXA Copied to i2c mailing list. > Dear List, > > this is my first post here and I am not sure if this is a suitable topic > here. Anyway I have a Velleman K8000 IO-card and it uses I2C over > parallel port to communicate. > > when I modprobe i2c-parport it does not complain. I tested without card > connected and it complained so it seems to find the card. > > modprobe pcf8591 > > modprobe i2c-core > > modprobe i2c-dev > > I am not sure I am doing it right. Should i2c-core probed first ? > > anyway now I have > > /dev/i2c-0 /dev/i2c-1 > > Now I don't know whether these i2c-devices refer to this Velleman board > or some other i2c-device which happen to be in the computer... > > If these devices probably refer to Velleman - then how I can refer > different i2c-devices on the board. > > > I am totally new to this i2c thing (reading spec at the moment but it > does not help much with Linux). > > I would be very greatfull if some could point me the way - thanks. > > Best Regards > Kari Laine > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <4A854936.5060409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: I2C -bus programming [not found] ` <4A854936.5060409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2009-09-12 9:12 ` Jean Delvare 0 siblings, 0 replies; 2+ messages in thread From: Jean Delvare @ 2009-09-12 9:12 UTC (permalink / raw) To: Kari Laine Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-i2c-u79uwXL29TY76Z2rM5mHXA Hi Kari, Kari Laine wrote: > this is my first post here and I am not sure if this is a suitable topic > here. Anyway I have a Velleman K8000 IO-card and it uses I2C over > parallel port to communicate. > > when I modprobe i2c-parport it does not complain. I tested without card > connected and it complained so it seems to find the card. This doesn't mean the card is handled properly. You must pass the proper card type parameter. The Velleman K8000 is type 2, so: modprobe i2c-parport type=2 Alternatively you can add: options i2c-parport type=2 to /etc/modprobe.conf or whatever modprobe configuration file your system uses. You didn't tell which kernel you are using, but kernel 2.6.17 and later wouldn't let you load i2c-parport without a type parameter. > modprobe pcf8591 > > modprobe i2c-core > > modprobe i2c-dev > > I am not sure I am doing it right. Should i2c-core probed first ? It doesn't matter. i2c-core gets loaded automatically when any other module needs it. > anyway now I have > > /dev/i2c-0 /dev/i2c-1 > > Now I don't know whether these i2c-devices refer to this Velleman board > or some other i2c-device which happen to be in the computer... You should install i2c-tools and use the command "i2cdetect -l". This will tell you what each i2c bus on your system is. Then you can try "i2cdetect <n>" where <n> is a bus number, to scan the bus in question. This is a good way to test whether the driver and device are working properly. > If these devices probably refer to Velleman - then how I can refer > different i2c-devices on the board. Depends on the device. In the case of the Philips PCF8591, which apparently you are using, sysfs attributes will be created somewhere under /sys/bus/i2c/drivers/pcf8591. Each device has a name of the form <bus number>-<device address>, for example "1-0048" for a PCF8591. The sysfs attributes in question are described in Documentation/hwmon/pcf8591 (or Documentation/i2c/chips/pcf8591 on kernels older than 2.6.30.) Hope this helps, -- Jean Delvare http://khali.linux-fr.org/wishlist.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-12 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4A8491E3.4070907@gmail.com>
[not found] ` <4A8491E3.4070907-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-08-14 11:23 ` I2C -bus programming Jonathan Cameron
[not found] ` <4A854936.5060409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-09-12 9:12 ` Jean Delvare
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).