mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-02-18 15:25:06 -05:00
Change search path for i2c devices on linux
Looking for devices by bus instead of class should fix issues where the class is named differently, e.g. i2c-dev instead of i2c-adapter.
This commit is contained in:
committed by
Adam Honse
parent
6612e8990f
commit
252ecf424e
@@ -265,8 +265,8 @@ void DetectI2CBusses()
|
||||
struct dirent * ent;
|
||||
int test_fd;
|
||||
|
||||
// Start looking for I2C adapters in /sys/class/i2c-adapter/
|
||||
strcpy(driver_path, "/sys/class/i2c-adapter/");
|
||||
// Start looking for I2C adapters in /sys/bus/i2c/devices/
|
||||
strcpy(driver_path, "/sys/bus/i2c/devices/");
|
||||
dir = opendir(driver_path);
|
||||
|
||||
if(dir == NULL)
|
||||
|
||||
Reference in New Issue
Block a user