This adds a gpio-latch driver recently added to Linux, see https://lore.kernel.org/lkml/20221007114647.2723457-2-s.hauer@xxxxxxxxxxxxxx/T/ This is basically the same driver adjusted for barebox. As a preparation we have to add some bitmap helpers needed for the driver. Sascha Hauer (4): bitmap: Implement bitmap_*zalloc() bitops: include linux/types.h bitops: implement assign_bit() gpio: Add gpio latch driver drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-latch.c | 195 ++++++++++++++++++++++++++++++++++++++ include/linux/bitmap.h | 7 ++ include/linux/bitops.h | 16 +++- lib/bitmap.c | 10 ++ 6 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 drivers/gpio/gpio-latch.c -- 2.30.2