From 3a199de4f7543f8012cefef6ce6150d17783b1ba Mon Sep 17 00:00:00 2001 From: Rene van der Meer Date: Sat, 30 Sep 2023 01:59:48 +0200 Subject: [PATCH] Add detection for pinctrl-bcm2712 driver --- src/gpio/ioctl.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gpio/ioctl.rs b/src/gpio/ioctl.rs index afbafa8d..835dc040 100644 --- a/src/gpio/ioctl.rs +++ b/src/gpio/ioctl.rs @@ -20,6 +20,7 @@ const PATH_GPIOCHIP: &str = "/dev/gpiochip"; const CONSUMER_LABEL: &str = "RPPAL"; const DRIVER_NAME: &[u8] = b"pinctrl-bcm2835\0"; const DRIVER_NAME_CM4: &[u8] = b"pinctrl-bcm2711\0"; +const DRIVER_NAME_BCM2712: &[u8] = b"pinctrl-bcm2712\0"; const NRBITS: u8 = 8; const TYPEBITS: u8 = 8; const SIZEBITS: u8 = 14; @@ -428,6 +429,7 @@ pub fn find_gpiochip() -> Result { let chip_info = ChipInfo::new(gpiochip.as_raw_fd())?; if chip_info.label[0..DRIVER_NAME.len()] == DRIVER_NAME[..] || chip_info.label[0..DRIVER_NAME_CM4.len()] == DRIVER_NAME_CM4[..] + || chip_info.label[0..DRIVER_NAME_BCM2712.len()] == DRIVER_NAME_BCM2712[..] { return Ok(gpiochip); }