summaryrefslogtreecommitdiff
path: root/include/sbi_utils/i2c
AgeCommit message (Collapse)Author
2024-11-28lib: utils/i2c: Use fdt_driver for initializationSamuel Holland
The i2c driver subsystem does not need any extra data, so it can use `struct fdt_driver` directly. It always initializes the driver for a specific DT node. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-08-24lib: utils/i2c: Constify FDT pointers in parsing functionsSamuel Holland
Indicate that none of these functions modify the devicetree by constifying the parameter type. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2023-07-31include: sbi_utils: Remove driver pointer from struct i2c_adapterAnup Patel
The "driver" pointer in struct i2c_adapter is not used anywhere so let us remove it. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Xiang W <[email protected]>
2023-03-09lib: utils/i2c: Add minimal StarFive jh7110 I2C driverMinda Chen
Starfive JH7110 I2C IP is synopsys designware. Minimum StarFIve I2C driver to read/send bytes over I2C bus. This allows querying information and perform operation of onboard PMIC, as well as power-off and reset. Signed-off-by: Minda Chen <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2021-11-12lib: utils/i2c: Add simple FDT based I2C frameworkNikita Shubin
FDT based I2C framework on the top of I2C library. The drivers are probed on demand by fdt_i2c_adapter_get function. Tested-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Tested-by: Alexandre Ghiti <[email protected]> Signed-off-by: Nikita Shubin <[email protected]>
2021-11-12lib: utils/i2c: Add generic I2C configuration libraryNikita Shubin
Helper library to keep track of registered I2C adapters, identified by dts offset, basic send/read functions and adapter configuration (enable, set dividers, etc...). Tested-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Tested-by: Alexandre Ghiti <[email protected]> Signed-off-by: Nikita Shubin <[email protected]>