diff mbox series

ucfw: drop support for old libgpiod

Message ID 20211028113945.2983998-1-sbabic@denx.de
State Accepted
Headers show
Series ucfw: drop support for old libgpiod | expand

Commit Message

Stefano Babic Oct. 28, 2021, 11:39 a.m. UTC
This is now obsolete and it makes no sense to support build with very
old libgpiod.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 handlers/Config.in      | 12 ------------
 handlers/ucfw_handler.c |  8 --------
 2 files changed, 20 deletions(-)
diff mbox series

Patch

diff --git a/handlers/Config.in b/handlers/Config.in
index 14f8af9c..0dd899ad 100644
--- a/handlers/Config.in
+++ b/handlers/Config.in
@@ -304,16 +304,4 @@  config UCFWHANDLER
 comment "Microcontroller handler depends on libgpiod"
 	depends on !HAVE_LIBGPIOD
 
-config UCFW_OLD_LIBGPIOD
-	bool "Support older libgpiod version"
-	depends on HAVE_LIBGPIOD
-	depends on UCFWHANDLER
-	default n
-	help
-	  The libgpiod library changed the api gpiod_line_request_output.
-	  The old function was replaced by gpiod_line_request_flags_output
-	  while the new one dropped "flags" from the list of parameters.
-	  Rather there is no way to get this changes from the library
-	  at build time.
-
 endmenu
diff --git a/handlers/ucfw_handler.c b/handlers/ucfw_handler.c
index ea94486b..c4f31991 100644
--- a/handlers/ucfw_handler.c
+++ b/handlers/ucfw_handler.c
@@ -139,21 +139,13 @@  static int switch_mode(char *devreset, int resoffset, char *devprog, int progoff
 		goto freegpios;
 	}
 
-#ifdef CONFIG_UCFW_OLD_LIBGPIOD
-	status = gpiod_line_request_output(linereset, RESET_CONSUMER, false, 0);
-#else
 	status = gpiod_line_request_output(linereset, RESET_CONSUMER, 0);
-#endif
 	if (status) {
 		ret  =-ENODEV;
 		ERROR("Cannot request reset line");
 		goto freegpios;
 	}
-#ifdef CONFIG_UCFW_OLD_LIBGPIOD
-	status = gpiod_line_request_output(lineprog, PROG_CONSUMER, false, mode);
-#else
 	status = gpiod_line_request_output(lineprog, PROG_CONSUMER, mode);
-#endif
 	if (status) {
 		ret  =-ENODEV;
 		ERROR("Cannot request prog line");