简体   繁体   中英

linux i2c driver for pandaboard

I am trying to write linux i2c drivers for omap4460 panda board. Interfacing Hmc5883l sennsor to omap through i2c interface. Do I need to write only the client diver or both client and bus driver. I am using linux ubuntu on panda board. Kidly give me pointers where do i start with.

Thanks.

There is already a bus driver for omap4460 in the Linux kernel. You can look at the kernel messages to see if this driver is being enabled during boot. If your interest is just accessing the device, you can do that from user-space without having to write a client driver. There is a good tutorial here . But if you are writing a driver as an exercise or you need access to other kernel features in the driver, then you can look at any driver in the drivers/rtc directory of the kernel, there are loads of good examples there.

Just found driver for hmc5843 in drivers/staging/iio/magnetometer which is very similar to what you want, it might work straight away without any modifications if you are lucky.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM