From f67ee942197b7c5b1264a3882882cf945773db38 Mon Sep 17 00:00:00 2001 From: Chris Fiege Date: Wed, 30 Oct 2024 14:30:04 +0100 Subject: [PATCH] usb-sd-mux/FAST: Fix GPIO number-to-pin definition This change fixes the mapping between the GPIO numbers (as written on the device) and the IOs of the I2C port-expander. This mismatch was present since support for the FAST was added in ab421354c2bfeecd634a8ec54fb27e6a24c8c82a. It seems the swapping of the pins in the schematic has been overlooked (see https://github.com/linux-automation/usbsdmux/issues/83 for that particular part of the schematic) during tool development. Additionally early prototypes were missing the GPIO numbers in silkscreen - masking this problem. With this change we will break the pin assignment for all users of releases up to 24.01.1. Thus this must be added to the release notes. Signed-off-by: Chris Fiege --- usbsdmux/usbsdmux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usbsdmux/usbsdmux.py b/usbsdmux/usbsdmux.py index b21aa85..b4f1495 100644 --- a/usbsdmux/usbsdmux.py +++ b/usbsdmux/usbsdmux.py @@ -217,8 +217,8 @@ class UsbSdMuxFast(UsbSdMux): _card_inserted = 0x00 _card_removed = Tca6408.gpio_3 - gpio0 = Tca6408.gpio_4 - gpio1 = Tca6408.gpio_5 + gpio0 = Tca6408.gpio_5 + gpio1 = Tca6408.gpio_4 def __init__(self, sg): self._tca = Tca6408(sg)