Re: Options for adding I2C devices and how-to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, Sep 30, 2016 at 9:23 PM, vibnwis <vibnwis@xxxxxxxxx> wrote:

Many thanks Anish for answering my doubts.


You need to find out the device address of your device.
find out which device is not connected and connect your device on that bus and change the device tree to replace the device address.

Would you elaborate on device tree, please?

https://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf
check page 29/45
 
You can certainly use i2c_detect and i2c_get user space tools to work with your device. However is there is a existing kernel space i2c device on that bus then it will certain lead to bus hogging problems.

Besides i2c_detect and i2c_get user space tools. I think one can also change two existing GPIOs for SDA and SCLK respectively and using software logics to drive them as I2C bus. I presume the entire GPIOs are able to be mapped for user space, is it not?

yes. You can do that if those gpio's are not not currently used by any one else.
Be sure to check if there are any others using it currently or not.

> Feel free to add any comments or suggestions.
Please add information about your device and kernel version which you are trying to use. May be there is already a driver for it in open source.

I am doing some sort research at the moment. I like to know the whole picture before putting my hand on.  Hence, at the moment it is pure on papers. However, the kernel version should be 2.6.38 and above. Nevertheless, since I have Pandaboard rev B , and Raspberry 3, I will definitely things that available for these two. Does it make sense?

I would recommend to get your hands dirty. Start playing with userspace i2c tools
to get an idea and also there are many raspberry project out there to get you started with.
 

Thanks in advance.


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux