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>
This commit is contained in:
Nikita Shubin
2021-11-10 12:42:27 +03:00
committed by Anup Patel
parent 1d462e0397
commit 2c964a2e15
3 changed files with 170 additions and 0 deletions

10
lib/utils/i2c/objects.mk Normal file
View File

@@ -0,0 +1,10 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2021 YADRO
#
# Authors:
# Nikita Shubin <n.shubin@yadro.com>
#
libsbiutils-objs-y += i2c/i2c.o