summaryrefslogtreecommitdiff
path: root/include/sbi_utils/gpio
AgeCommit message (Collapse)AuthorFilesLines
2022-05-13lib: utils/gpio: Generate FDT gpio driver list at compile-timeAnup Patel1-0/+2
Instead of having FDT gpio driver list hard-coded in the C source, we generate it using carray.sh at compile-time. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2021-11-03lib: utils/gpio: use list for driversNikita Shubin1-0/+8
Convert static array to sbi_list. This removes size limitation, makes add/remove more efficient and saves space. Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2021-07-17lib: utils/gpio: Add simple FDT based GPIO frameworkAnup Patel1-0/+34
We add a simple FDT based GPIO framework which is built on top of generic GPIO library. The phandle of FDT GPIO chip DT node is treated as unique GPIO chip ID required by the generic GPIO library. The FDT based GPIO chip drivers will be probed on-demand from fdt_gpio_pin_get() called by the GPIO client drivers. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2021-07-17lib: utils/gpio: Add generic GPIO configuration libraryAnup Patel1-0/+99
We add generic GPIO configuration library which is independent of hardware description format (FDT or ACPI). The OpenSBI platform support or GPIO drivers can register GPIO chip instances which can be discovered and used by different GPIO clients. Each GPIO chip instance has a unique ID which can be used by GPIO clients to lookup GPIO chip instance. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>