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 46EFEC531DC for ; Fri, 23 Aug 2024 13:45:41 +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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ume1kDbmwm/gc9DUAKqcuXKYCh92rtcN1bT0exEyFMM=; b=jQoO+6gZoq/wGh6GKjD54WPah0 CggbO32tC66pylS7SdfWqen/vPfem4AU9ODJyVjwPieDDrexC3HYqvWvngIZDNk+scHlVOyD7tAR5 7XrYyJodklcT4yKsUfwKuTcohtddqawY6935rFlepTctKeDpCEVZfdehnJ3WwNmLY6hxEAQ9kiwLO kdSAgo7qN3qYCESFdmWjgGLZSSDwnxw4DrXAd5PG1xznBpcYsEh/d0XlPID92/agC+3AHarY5Og3x 8VYRMXC1xqJ7+F8FvfPrqr4ZQBpXsZncdrhq1CVuqM914GGEdan8a2xQs/aBZ56pSCSNU6QJbRkMH clKt4yVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shUbc-0000000Gvim-2JXz; Fri, 23 Aug 2024 13:45:32 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shUZu-0000000GvQ2-2tHq for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 13:43:47 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5befd2f35bfso2568653a12.2 for ; Fri, 23 Aug 2024 06:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724420624; x=1725025424; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Ume1kDbmwm/gc9DUAKqcuXKYCh92rtcN1bT0exEyFMM=; b=Ecvu11ffGFKhPUcPX35UWKNYRgE6SqQQKTYHWkMWFhuaxJs3sdN8CcLUn62YgxVldM HXzHkEdRvJ4azpsdmmq0tAZCoxWbG69r5EvAGBXu1jiEyr1qGcCQrQ8cB1ML3ysOd+p/ bKGJk4x5KdgcajvtqPKcgqm/c/+qwS8HBGM/DLcHZpSBSaT5TAR73lXxckgipqwcfDfD CgNyROClERBV40NoZF3eGEPxidmYInQ7slYVr5OiNx1kPeFnhvIxoygYgMfkH3O+Jwhl fQ7qbgJ3usf3qRM4+QOvQjCrWj9YLw6cIFhEEFsLaL9sQ12HsTaTEhpehKdaFbehRtKn PmHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420624; x=1725025424; h=in-reply-to:content-transfer-encoding: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=Ume1kDbmwm/gc9DUAKqcuXKYCh92rtcN1bT0exEyFMM=; b=CCpMouvTZ+rvzWSCEiT36x3I660iAr0pQewVp+p21B081d4n9vq+YKl7e2RuORjt/h fpS0PIzYMh/1D+fbPwrkY2TO5Wjpw4UlmMIZluE20IWnVFjg51QjDVmeZUTTo/exx3XG TdjHfld/LLIvOFngRBa2aafvJ11MChJFESfrvrcHQqRJK/vEKW+Jg+GqZsrNH1Kxbi/2 FUAeWqGNqDCHZypP4iElXwBnThW0LSh9j5TRm4r5glPqLc0Bm/gNWDWzQMCOvnajXBe9 8J8ay7JyXMmYpdQZTdbKXSlWRO57XRO24Hlmfcvm1HHjbK7WYxPzXqY+oNGTNl99W0IS 4G4Q== X-Forwarded-Encrypted: i=1; AJvYcCVunWhfwAIelZpSe+5rNOPvemaAiTdTl1poeFsUc9dDp17bpWrth/T8oiwZHxWsgy0VnYAPOik+Ae7rb+Q+Zhj3@lists.infradead.org X-Gm-Message-State: AOJu0YzsPAfYsmpx9aqDA6JDgPF2wBuzlSSEbdDjpf9GGWgzifmaPs6+ 1iBl6/CcISUpxAI81ZRNA1KMUd6fBavnUAHOxrYAT4seB4LkQ0AL X-Google-Smtp-Source: AGHT+IHkv19M7e8G9uSEo4T7jKRhNlTTjiPTlWEKNa6PzU2aS6HcQNrZT7CqJ7oV33O7LbaaAkrHSg== X-Received: by 2002:a05:6402:3489:b0:5be:facd:aa51 with SMTP id 4fb4d7f45d1cf-5c0891ab86emr1553255a12.31.1724420623614; Fri, 23 Aug 2024 06:43:43 -0700 (PDT) Received: from eichest-laptop ([2a02:168:af72:0:48ba:80d8:cf77:1f49]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c04a3cb0bdsm2103844a12.37.2024.08.23.06.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:43:42 -0700 (PDT) Date: Fri, 23 Aug 2024 15:43:41 +0200 From: Stefan Eichenberger To: Fabio Estevam Cc: o.rempel@pengutronix.de, kernel@pengutronix.de, andi.shyti@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, Frank.Li@nxp.com, francesco.dolcini@toradex.com, linux-i2c@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Eichenberger Subject: Re: [PATCH v2 1/4] i2c: imx: only poll for bus busy in multi master mode Message-ID: References: <20240819072052.8722-1-eichest@gmail.com> <20240819072052.8722-2-eichest@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_064346_817935_0A04A346 X-CRM114-Status: GOOD ( 29.92 ) 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 Hi Fabio, On Thu, Aug 22, 2024 at 08:07:44AM -0300, Fabio Estevam wrote: > Hi Stefan and Oleksij, > > On Wed, Aug 21, 2024 at 8:01 AM Fabio Estevam wrote: > > > This fixes a pca953x probe error on an imx8mp board running linux-stable 6.6: > > > > [ 1.893260] pca953x 2-0020: failed writing register > > [ 1.898258] pca953x 2-0020: probe with driver pca953x failed with error -11 > > > > Could you please add a Fixes tag and Cc stable so that this can reach > > the stable kernels? > > > > Tested-by: Fabio Estevam > > I am sorry, but I have to withdraw my Tested-by tag. > > For debugging purposes, I kept 'fw_devlink=off' in the kernel command > line and that's what made it work. > > Removing 'fw_devlink=off' I still get the probe failure, even with all > the series from Stefan applied: > > [ 1.849097] pca953x 2-0020: supply vcc not found, using dummy regulator > [ 1.855857] pca953x 2-0020: using no AI > [ 1.859965] i2c i2c-2: write failed with -6 > [ 1.865578] pca953x 2-0020: failed writing register: -6 > > In my case, I can get the pca953x driver to probe successfully in one > of the following cases: > > 1. Select pca953x as a module instead of built-in > > or > > 2. Pass 'fw_devlink=off' in the kernel command line > > or > > 3. Register the i2c-imx driver as module_platform_driver(): > > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -1586,17 +1586,7 @@ static struct platform_driver i2c_imx_driver = { > .id_table = imx_i2c_devtype, > }; > > -static int __init i2c_adap_imx_init(void) > -{ > - return platform_driver_register(&i2c_imx_driver); > -} > -subsys_initcall(i2c_adap_imx_init); > - > -static void __exit i2c_adap_imx_exit(void) > -{ > - platform_driver_unregister(&i2c_imx_driver); > -} > -module_exit(i2c_adap_imx_exit); > +module_platform_driver(i2c_imx_driver); > > or > > 4. Use the NXP vendor kernel imx_6.1.22_2.0.0 kernel > > Stefan, do you get the arbitration errors if you try methods 2 or 3 above? I have tried method 3 an it did not work for me. I still have the same issue as before that sometimes the timeout occurs and the ads1015 will not ack anymore. So the patch series is still the only way I found so far to get rid of the problem. I also checked the datasheet of a pca953x device (PCAL6416A) and it doesn't seem to have a timeout mechanism. Therefore, I don't think we are affected by the same issue. Regards, Stefan