Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1921569rbb; Tue, 27 Feb 2024 05:40:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW8/+inYwlrPHHhd1Ya8JIpcqjp0PA1lL78aUTiJn0G0aGqMklBpZLUpcXL3IqLSu+F2Wsj/jEDAcyj12la7iJKmqCUmG9/SVUDbpzjVQ== X-Google-Smtp-Source: AGHT+IG3k5yholYd7aS9dNdfbYBStyKlPA/wb1nG8zuiu6VYbFc8xGpYFOnxzGftRLzBKlWVjF/u X-Received: by 2002:a17:90a:e40b:b0:299:11ae:d507 with SMTP id hv11-20020a17090ae40b00b0029911aed507mr6611767pjb.1.1709041218301; Tue, 27 Feb 2024 05:40:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709041218; cv=pass; d=google.com; s=arc-20160816; b=qktxdqNBZtvtxOqQ+SxSmLKCaSBKJlmoyCmxq5W3D+UUi0MPXRH61J/kntwxBaMbv/ 5ovIWBJIDQQCsXcAmBI2qjDVbOxst5ootOrMdr3UU8mQ1dBWYI/xKc/sEAfYFntcDOg6 F/JgKUx9mAoACCeWOgZY62+Nl9iFtFBYQ+kyWCLOpG1EEvWp731pEg0D9I+JRvvIkjOu OU03jtBm42y2MgRDv097B61Rb8ktnXprfIfkPkXnywM5XGXsK1fq/d9y4f7Uhvuj/8wR xI2m/mCB7NGE0ZwhSq4y1j1DdqbTihMlbYwj9syVf8xOXR187favToE7RMazABLYTQzo R6xQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:to:cc:subject:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=4ugB9QxiL2b1VXZ64TujSRaUb9sqfq1WG8mbx8ms1t8=; fh=ybvdazfPRpN+rA9a+1hPI3iim/t7CtV9KNNGAMOJZww=; b=d8QZbnTXbiKVyZXbv8OG/g4vO2wcO7MDMKSuqKpxnwh0+Q3VM5bVkD2tHWslpHdEWM VqhQJ63Vwo1Mjy8Vp3LjPxfVTeK4hB76Y276hZcE9b54MjR7zZ7gTfVE3wtTA9rKStsT 3g28Dlmcw0p8vUnigU7IUpB9MbQYYX7oeUXdL3KZS6gzEnH6n85a3vE+RzJxlkj7zEkG IV9NDDfifn6ye9S1h7QWDimWnLYSOm90baJOBQoS0trgYwjyTgpVfCvCH02HNqDvIqq4 ndfQ6gNMolWWk6eeOn19ipzev5M/lb0VX86x+vSOq//koN0hXwoOzPaTEiVdGgFVUJJ1 w4AQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=L3nHvMeK; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-83327-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j4-20020a63fc04000000b005d8b81271dbsi5401810pgi.286.2024.02.27.05.40.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 05:40:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83327-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=L3nHvMeK; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-83327-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ED5A9283FBD for ; Tue, 27 Feb 2024 13:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9650113B7AA; Tue, 27 Feb 2024 13:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="L3nHvMeK" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 4523B78B61; Tue, 27 Feb 2024 13:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709041125; cv=none; b=kHkLaD4VVHf8/b8sICjEe7j42wRsna2DOYkWL8zuKA2QUTqcF13Q7XlMuXBNKmBHOJihk5T3JI3p06lHM2QVCbpHwftpi1cPxG6XeqiZI/t2VRbUoYin2JQzVnb+41nKskKZ+2qvwsyRTvAEGbPSPZ/Nu845SQoXxzAYoz0uuBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709041125; c=relaxed/simple; bh=Ad3s8txV/LRKTi3+KCXHUIgZVNfAZ9S2VAZ3ew4nrfE=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=cOeh57Dc1AWTwyOMGig60WauZRu/SvzKXRAio42hrVkBkOVHHEcEC+FWKmQDrix54IRwaZgF7jquNJYuKAXHP1cGkXyAf6VFLGTsMzkv3wlNwQ3AYSheOEbE0i8sTUsMu/KuhB6uCeBPzEVmV2Sfi7c4Wzroarp51ZOVywUcFu4= 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=L3nHvMeK; arc=none smtp.client-ip=217.70.183.193 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 Received: by mail.gandi.net (Postfix) with ESMTPSA id A454D24000A; Tue, 27 Feb 2024 13:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709041120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4ugB9QxiL2b1VXZ64TujSRaUb9sqfq1WG8mbx8ms1t8=; b=L3nHvMeKugiy6LAMcXCUL40zZFkFyG3stQRCERhiPdxJe3E0Hmzaxmc4okAgDcBr9U4dce MabFzn95ayqAVbsXsICU+hIghagnyW62tfkH76EGxaxLevNTkTGL7T6XXxpG7c70YJRida FsCqgDEloarSSvHd4W++4CkZQYK7cLR9DS9kgJNX3q+JzZ5uiocuE4/suGqZXVocBmi8S2 gL/nime4cLazyjWSWNAtEfsIqac3zN1ZGMiosIt069itDFdoNzDLaRnxFTn69FLMXouH+X PzS/pk0jhfoT+W4YHIa8JMziWyCDQXmifs9+5/3Jp5yBpS8z6kKpuNkqLvZG2A== Precedence: bulk X-Mailing-List: linux-kernel@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 Date: Tue, 27 Feb 2024 14:38:39 +0100 Message-Id: Subject: Re: [PATCH 09/13] i2c: nomadik: fetch timeout-usecs property from devicetree Cc: "Linus Walleij" , "Andi Shyti" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Thomas Bogendoerfer" , , , , , , "Gregory Clement" , "Vladimir Kondratiev" , "Thomas Petazzoni" , "Tawfik Bayouk" To: "Wolfram Sang" From: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: aerc 0.15.2 References: <20240215-mbly-i2c-v1-0-19a336e91dca@bootlin.com> <20240215-mbly-i2c-v1-9-19a336e91dca@bootlin.com> In-Reply-To: X-GND-Sasl: theo.lebrun@bootlin.com Hello, On Tue Feb 27, 2024 at 1:14 PM CET, Wolfram Sang wrote: > > + /* Slave response timeout */ > > + if (!of_property_read_u32(np, "timeout-usecs", &timeout_usecs)) > > + priv->timeout_usecs =3D timeout_usecs; > > + else > > + priv->timeout_usecs =3D 200 * USEC_PER_MSEC; > > I could imagine to add 'transfer_timeout_us' to struct i2c_timings. > Then, you could use 'i2c_parse_fw_timings' to obtain the value. What > values/value range do you use here? I can't find them in the DTS > additions. That sounds good. I have not used this prop in the DTS as it does not make much sense for an eval board. The target is production boards. An order of magnitude is a few transfers every 15ms. It means a timeout of 15ms divided by "a few". I don't have more precise values, but I could if you consider it useful. I've done some testing at 50~100=C2=B5s timeouts and it works as expected. = At those values timerslack is important to consider (default of 50=C2=B5s). This is at 400kHz clock frequency. Keep in mind the controllers support up to 3.4MHz (not yet upstreamed) so timeouts could in theory go lower if required by the usecase. My upcoming question is how to move forward on this series. I can do the patch to i2c_parse_fw_timings() in the next revision. That way it gets added alongside the first user of this feature. Would it work for you? Thanks, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com