From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 738DF30649A for ; Wed, 22 Oct 2025 08:36:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761122206; cv=none; b=k3M0AX+U/c3ZEZKx9+v5bNo5A83Z7Rhe+QV+ZTAnndUEATK5UZVjh0d9or5vjEUNi+Xb1sTi7fhXKw06M76yyjIyrXeKRki59tUatrLu6pi0NZF9aqxoVMiU1NXqgZ7Y5qec+3xJTbpoUkqKxHAB7LWTTrcAu7GUI/GzcWBRx9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761122206; c=relaxed/simple; bh=0D0gLXUvdDmxAdocUXs6W1tqJuSvdfyUT5UsEyO8jcI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MW4PqNGWKy1IJcn4dn9TNAyfgU0qjL+w10uJqqv/cf8Y7SBtebiWBxfzwqtnfu1JY0vunUFlE8DT2KRyDJxUz7eFesj8I/RIoNVGuBMW/Pg/ooFLjx2acl4wTBj6M8qH6/GzlsxMzLhDOklC0z9aI5MOt4ynGzqZk2Hh6OI01bo= 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=mOj9Qf5W; arc=none smtp.client-ip=185.246.84.56 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="mOj9Qf5W" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id CB9F41A15CC; Wed, 22 Oct 2025 08:36:42 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 9CAEA606DC; Wed, 22 Oct 2025 08:36:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BCD85102F242A; Wed, 22 Oct 2025 10:36:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1761122201; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=0D0gLXUvdDmxAdocUXs6W1tqJuSvdfyUT5UsEyO8jcI=; b=mOj9Qf5WcnayPBzSXX649DoYuwGSolubhlFW+OdQTpyyKk/zWN5znus/K71A9CwH0SUdT7 3GDQn+Zb7vvsn7p9vHfSJsUDUk137AAIxs03skNEzO0yvbO+nirad4bdxEV+XpXCJhxA0m V+LChprJ3w5+QEZhJalo0NFca13HEOWEI2DcHJQwwuLriPS9qGqOif92JyA6LpNPPFk5VV pdYem0BPbi8c1rajPSVDpIo1+Q4t/XzJTrO2q0qHM+fLnCT3oGYHV5KnB6zwBsz3/lcr0G G1E0v9+DuGcwpy4PiTaXdilEK8pol5acwKxPk6bpr4PNc1SEO+kXL4qDQywaaQ== From: =?UTF-8?B?QmVub8OudA==?= Monin To: Wolfram Sang Cc: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jarkko Nikula , Mika Westerberg , Andy Shevchenko , Jan Dabros , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Hans Verkuil , Thomas Petazzoni , Gregory CLEMENT , =?UTF-8?B?VGjDqW8=?= Lebrun , Tawfik Bayouk , Vladimir Kondratiev , Dmitry Guzman , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Subject: Re: [PATCH 2/3] i2c: designware: Enable transfer with different target addresses Date: Wed, 22 Oct 2025 10:36:28 +0200 Message-ID: <5779084.ZASKD2KPVS@benoit.monin> In-Reply-To: References: <20251017-i2c-dw-v1-0-7b85b71c7a87@bootlin.com> <22296119.4csPzL39Zc@benoit.monin> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Last-TLS-Session-Version: TLSv1.3 On Monday, 20 October 2025 at 21:52:01 CEST, Wolfram Sang wrote: >=20 > > For your particular case, that will not help reaching the other segment= s as > > we wait for a STOP before changing the target address. So, it should not > > fail but do a write to segment 0 in your eeprom. >=20 > So, this patch replaces a repeated start with a stop + start > combination? Please don't do this. It will give users a false impression > that proper repeated start is supported. Honestly reporting that the HW > does not support is the better option, so the user can decide what to do > then. >=20 This patch replaces a -EINVAL in the middle of the transfer by a STOP-then-START, but you are right, the expectation is to have a single STOP at the end of a combined transfer. I somehow overlooked that part. =20 Maybe I could add support for the I2C_M_STOP flag instead? Or does an adapter has to support all the protocol mangling if flagged with I2C_FUNC_PROTOCOL_MANGLING? =20 That would still allow to group multiple accesses to device that support a STOP in a transaction when done via i2c_dev I2C_RDWR ioctl, in a single-mas= ter configuration. Best regards, =2D-=20 Beno=C3=AEt Monin, Bootlin Embedded Linux and Kernel engineering https://bootlin.com