Add libgpiod v2 compatible bitbang master

The API was completely re-invented with libgpiod 2.0. Hence we add a
new driver as we would otherwise only share boilerplate with the old
driver. The new API makes it easier to re-configure GPIO pins on-the-
fly. Which we will use to implement dual- and quad-i/o modes in the
future.

One downside of the new API is that there is no function to open a
chip by number anymore. So we have to emulate that behavior now for
backwards compatibility.

Change-Id: If6a02d98f15def51b61fe0c3f09092cf286a37eb
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/83
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
3 files changed