Tuesday, February 22, 2022

[SOLVED] How to enable appropriate driver for i2c device

Issue

I am currently learning about linux device drivers, specifically for using an i2c device with a beaglebone. I have href="https://www.amazon.ca/gp/product/B076L2CW3S/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1" rel="nofollow noreferrer">this LCD with a PCF8574AT on it. Searching through the linux drivers folders, I see that a driver gpio-pcf857x.c already exists.

My question is how do I associate this device with this driver? When I do ls -l /dev the major number for i2c-2 is 89 which is the i2c character driver. How do I change this driver association? What material should I research on this? Also, I can see the slave address when I do i2cdetect so I know it is connected.

Any help is greatly appreciated.


Solution

The solution is here for how to instantiate i2c devices in linux



Answered By - gabson
Answer Checked By - Mary Flores (WPSolving Volunteer)