From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08B4017FAA2; Mon, 17 Jun 2024 12:08:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718626106; cv=none; b=KTudOzHTXcBh7HDKQ3UgBhSmPhhfFMBJVjcBcZ60lIfehZW7I6Z4NU4GUHjOKLR7MQfyIdNb8ewKT2s0uTzS74znbEqt8GJD/DhSswqzlastxXdfNng/fxQavsA71gxi3zN8vhyXQW10rLVLWoonaXAZi/jzqS37Iz+mZPxGG/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718626106; c=relaxed/simple; bh=PsqCvI9iYJBn0w58OPhyl9OmctKHOFcdmv3uZUmC09A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=D7SU2ym3iFnWeE4xvutSc0bP1GQQxe2k0jesfugOBGHhULtIPixk0JCS9Nz3FQ4uPgz0Ot3dlfTk5Y8/xXjAywZSHSor6sqlTqp9fNbOEyCsy9Zp1CIS1hmtwbfAveyhC/U/PMnv55Zb0KgYNGFIqcJKmgDmWx1QW4BCjP07wpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=H8V4wQ7p; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="H8V4wQ7p" Received: by mail.gandi.net (Postfix) with ESMTPA id 7C3904000E; Mon, 17 Jun 2024 12:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718626101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GuKdc1xKXRp/qhXALkelzw1dzBSmgkA1O3cnHePaipU=; b=H8V4wQ7przmplXIacmPrH7kYoIPUsHhItcpsoiVJZrKxDNCVu4JQWHMh/Tli+FtaM218kV +nBREQhpYDYU+oAlJFGgUGm0kWJv+n+vMuhXYvA8vfc/u/ssARV/WvUhLJzfyrd8NuDt6E my+0iuoFvD4jL/T+xaxHsTjqJBszpu9HZ8F68fAg5flS6CTg8YsOTBou/CNbWg5m4Gqb5W 8CbGc6hov8ljgvvFknDxjtY/6URYCuFR3Jhn8KXv/6E0Od0QEJ8pylplCkDxDIMArooGVv M+zpZmHBg5/21+41x4BEh76cIFFRk+CaDcJXhbyyXEj24YBK1T7KGUT7Hlaaqw== From: Bastien Curutchet To: Peter Rosin , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Korsgaard , Wolfram Sang Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Herve Codina , Christopher Cordahi , Bastien Curutchet Subject: [PATCH v3 0/3] i2c: mux: gpio: Add 'settle-time-us' property Date: Mon, 17 Jun 2024 14:08:15 +0200 Message-ID: <20240617120818.81237-1-bastien.curutchet@bootlin.com> X-Mailer: git-send-email 2.45.0 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: bastien.curutchet@bootlin.com Hi all, The i2c-gpio-mux can be used to describe a multiplexer built upon several i2c isolators having an enable pin (such as LTC4310): +---------------+ +------+ +------+ | +-----------+ | | dev | | dev | | | GPIO_EN_A |-|-----------| +------+ +------+ | +-----------+ | +-----+---+ | | | | |--| isol. A |---------+---------+ | +-----+ | | +---------+ | SOC | I2C |---|--| | +-----+ | | +---------+ | | |--| isol. B |------+---------+---------+ | +-----------+ | +-----+---+ | | | | | GPIO_EN_B |-|-----------| +------+ +------+ +------+ | +-----------+ | | dev | | dev | | dev | +---------------+ +------+ +------+ +------+ These isolators often need some time between their enable pin's assertion and the first i2c transfer. If the first i2c transfer happens before this enabling time is reached, transfer fails. There is no available option to configure such a time in the i2c-gpio-mux driver. Add a optional property in the bindings called 'transition-delay-us'. If present, driver waits for this delay every time a new bus is selected, i.e. before returning from the bus_select() callback. Changes in v2: * Rewrite bindings' commit log * Express the 'transition delay' in us instead of ms Changes in v3: * Rename DT property to 'settle-time-us' * Use fsleep instead of udelay [v1] : https://lore.kernel.org/all/20240527113908.127893-1-bastien.curutchet@bootlin.com/ [v2] : https://lore.kernel.org/all/20240529091739.10808-1-bastien.curutchet@bootlin.com/ Bastien Curutchet (3): dt-bindings: i2c: gpio: Add 'settle-time-us' property i2c: mux: gpio: Re-order #include to match alphabetic order i2c: mux: gpio: Add support for the 'settle-time-us' property .../devicetree/bindings/i2c/i2c-mux-gpio.yaml | 3 +++ drivers/i2c/muxes/i2c-mux-gpio.c | 14 ++++++++++---- include/linux/platform_data/i2c-mux-gpio.h | 2 ++ 3 files changed, 15 insertions(+), 4 deletions(-) -- 2.45.0