Jukka Laitinen
5d025eb235
lib: fix pointer of type 'void *' used in arithmetic
...
Using "void *" in arithmetic causes errors with strict compiler settings:
"error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]"
Avoid these by calculating on "char *" where 1-byte data size is assumed.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae >
Reviewed-by: Dong Du <Dd_nirvana@sjtu.edu.cn >
Reviewed-by: Xiang W <wxjstz@126.com >
Reviewed-by: Anup Patel <anup@brainfault.org >
2022-01-21 21:58:12 +05:30
Nikita Shubin
13a1158d24
lib: utils/i2c: Add minimal SiFive I2C driver
...
Minimum SiFive 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.
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com >
Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com >
Tested-by: Alexandre Ghiti <alexandre.ghiti@canonical.com >
Signed-off-by: Nikita Shubin <n.shubin@yadro.com >
2021-11-12 10:29:08 +05:30
Nikita Shubin
6ca6bcafb7
lib: utils/i2c: Add simple FDT based I2C framework
...
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 <heinrich.schuchardt@canonical.com >
Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com >
Tested-by: Alexandre Ghiti <alexandre.ghiti@canonical.com >
Signed-off-by: Nikita Shubin <n.shubin@yadro.com >
2021-11-12 10:19:45 +05:30
Nikita Shubin
2c964a2e15
lib: utils/i2c: Add generic I2C configuration library
...
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 <heinrich.schuchardt@canonical.com >
Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com >
Tested-by: Alexandre Ghiti <alexandre.ghiti@canonical.com >
Signed-off-by: Nikita Shubin <n.shubin@yadro.com >
2021-11-12 10:17:50 +05:30