From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EEEF3CF6D28 for ; Wed, 2 Oct 2024 14:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ArJKboNdEUouLVjZmQiavzaztbu9wUmpBbz3Qd2ETsk=; b=Xy/QDDcMxUCl7FAoJQjdc9r6gs wJMCU0n3L6dlQle3/Ch3DYnNHSTSQ0+QOKq0zdm4UT0IDLLiQT8HBvvYsyeOuNB8PNFR7TO4lniV9 ZV9z6Iq+Rd6BI0XR8r/4rn4Nho6TJi+wEchaD0LWH8qZWEtg1KcDK/3NOKt159ZXsPxamzgyN8ks+ bIATvRTsFD5bzCdFS+qtZit6A0B7VgrqVCzzAbP0dqwmOgz90yhCcQ3eamWKgXS9dFWyaQjHvOcyE Sw4IPHnGm9OIf6g3RZwx/wFTY7DIre4FIE6ExDwlqd6wfbDEnEtZpMpDjPC9DBH6dmJOkVt8kPd/9 UkqpjBhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sw0nR-00000006Ujj-2vsN; Wed, 02 Oct 2024 14:57:45 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sw0m4-00000006U9e-3xre for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2024 14:56:23 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-37cd8972738so3566124f8f.3 for ; Wed, 02 Oct 2024 07:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727880978; x=1728485778; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ArJKboNdEUouLVjZmQiavzaztbu9wUmpBbz3Qd2ETsk=; b=dBSDQYyM2wcpx8nMHxYha9ha+yOMZEiv6Ow0l/ulx/jjudgjP03VYiIuYBL5I9mbdg R7q5ZjlshUY354wvX1biWrNLIEPkxZik9ib6uy3mtV068ab41Jvj4rgY+upGR+/t0lL0 +kOMnSUFbWCRLeIrj3t/hdOAxyD+paqfNdhK96MMdoSlesZwWiJlHzgyI2byZvwkY+ml cni7jvqkb9YeBTapaGlYnG6P49IemV7clvcHIxaF092IO+A1/FDW4U+7yEdzpsVfTFoy p3WLC4a58EwONWdPgvN0JdqS0WYC4QdKTxZrbYcqe+MjOyd/4Rv7xVRXyBOKMYwzMkJ+ VnAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727880978; x=1728485778; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ArJKboNdEUouLVjZmQiavzaztbu9wUmpBbz3Qd2ETsk=; b=D42lkrk5WwoknE7RtyRvzshlANFNS5pxgCkvrQE4iZ24fFS8keBir3pgNub0ntBhLK Y1TCn6kSrPWCT7qFLiqkkRxIeDjOTWyYmscZ5pUrd0r8qg80GxDhrjcGxEceMxm6q5nY 3k8BoBcwUtembABO8pMNpyYtWw1BLQtPp6lIFDo6HTrDMiVWQ1ijZPtp0k2zxer2HEaQ KWdks+rFtkB7xx/VN6xWcliDUQnjlaAaVY7Ei9GCSaiVdewa1sDa1nxlkyEFLGc+cFJo xjJyryHQlmXxkeW5pFBTdP1czD+EbQbR0DFWjbsS0yFW8F6bHffmtSUWIukgrooXueKr PPeQ== X-Forwarded-Encrypted: i=1; AJvYcCUxcC4CUWEePD2tfjllCo7SVziMOHiKCKe/BiJfTXtpumE959M+UJ/oWTaQGGGjijJQzVQGZSGNpgY+mOXhZtDa@lists.infradead.org X-Gm-Message-State: AOJu0Yy83ZMJf0ike33fAuLRepVgqf/8j8wslgOQsFf7GobIjaBU+SdE k1bc80vSAGVRWgkpcZLsfbH07laKCwFq4utE2lfIo7nDDX87J0qC X-Google-Smtp-Source: AGHT+IFSuWZxPxnR/PCz++pS/3Tgv8+0dPn8oiXivA0TR+4KO3wJwURaFqD7P8uc0QGMdxkXk/UdBw== X-Received: by 2002:adf:eece:0:b0:374:c8d1:70be with SMTP id ffacd0b85a97d-37cfba0a47fmr2127521f8f.38.1727880978326; Wed, 02 Oct 2024 07:56:18 -0700 (PDT) Received: from eichest-laptop (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd564d5b7sm14222365f8f.5.2024.10.02.07.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 07:56:18 -0700 (PDT) Date: Wed, 2 Oct 2024 16:56:16 +0200 From: Stefan Eichenberger To: Lucas Stach Cc: o.rempel@pengutronix.de, kernel@pengutronix.de, andi.shyti@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, Frank.Li@nxp.com, imx@lists.linux.dev, linux-kernel@vger.kernel.org, Stefan Eichenberger , linux-i2c@vger.kernel.org, francesco.dolcini@toradex.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 1/4] i2c: imx: only poll for bus busy in multi master mode Message-ID: References: <20241002112020.23913-1-eichest@gmail.com> <20241002112020.23913-2-eichest@gmail.com> <6378933c8d30bec2c3084e41c83b9d129d0d40d1.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6378933c8d30bec2c3084e41c83b9d129d0d40d1.camel@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241002_075621_130203_508C5DBD X-CRM114-Status: GOOD ( 23.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 02, 2024 at 04:40:32PM +0200, Lucas Stach wrote: > Am Mittwoch, dem 02.10.2024 um 13:19 +0200 schrieb Stefan Eichenberger: > > From: Stefan Eichenberger > > > > According to the i.MX8M Mini reference manual chapter "16.1.4.2 > > Generation of Start" it is only necessary to poll for bus busy and > > arbitration lost in multi master mode. This helps to avoid rescheduling > > while the i2c bus is busy and avoids SMBus devices to timeout. > > > This is a backward incompatible change, as far as I can see. Until now > the driver would properly handle a multi-mastered bus, without any > specific configuration. Now it requires the new multi-master DT > property to be set, which isn't even documented in the binding to be > understood by this driver. > > Are you sure that every single instance of a i.MX i2c bus is only > single mastered? > > If this is a worthwhile performance improvement I guess you need to > flip the logic around by adding a new single-master DT property (or > something along those lines), which should go through proper DT binding > review. You can then use this property for boards/busses to opt into > skipping the arbitration lost check. According to the discussion here the property documentation should not be added: https://lore.kernel.org/linux-i2c/2bbddaxyjkxfmlgmq3yqcbzo7dsb2pq5bvdatk2y4ig4iintkt@35btqkdv7sy3/ However, the point regarding single-master and multi-master is correct. We also discussed this internally and assumed the single-master use case is more likely to be the default and that this patch series would fix issues for other devices out there. However, your point is valid and if preferred I can change it to single-master with the next version. Francesco Dolcini I think you once had a discussion regarding multi master mode for i2c on i.MX devices? Maybe you can remember the details? Regards, Stefan