Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp45246rdb; Mon, 30 Oct 2023 23:09:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7wmpvruC8PVoRYj2ViwcIeSM8bIiWQbvZJJyNFkgJVxQ08QQRfmQLof/tczka/Dn1DJfn X-Received: by 2002:a05:6358:5e16:b0:169:7e97:6fd with SMTP id q22-20020a0563585e1600b001697e9706fdmr2828685rwn.5.1698732550768; Mon, 30 Oct 2023 23:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698732550; cv=none; d=google.com; s=arc-20160816; b=Ijn8TkJG+IeXkkjWW3iy2tvIa5q/doeYZCuj1SCSY3BcykCF06bIUjQXmKKaAJ49r6 xSBKxTVcWv+mPgb177WSsBTraEI33VmIet8T4cezdy4w2KYza6CPTsBfbhua67siLcr2 UztraReh9qhseoOBs5EQqZowvLlHoWtMjPwU2rB2brixetVyiFjcZZWUd/Qn28ukrHnF Qstnf0di9JGUkA2ncMYFiBcq86rCiTs77ICdbVy3PndDjnR8zVjJ9bSFpi41SbQgIfuX w+hz3Yny2G6v6Lh8sS2s4+Ff/jTFVvJmwAOVnRPNBPeWHOaiw0V27DOsmJhJq09A/+RH 3F1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=Ti+gd1S2oN/iUTNC/6buX1WfsVyGVF4t1qDxc027Lfs=; fh=RJx2M4jQKSdBO6rKcajEjINZkjNDUQP6u9UKPiTnBmk=; b=hw/cWnkJRYvSZYMeJljbIRu5nSxHtPgDUswfoVWNZtP7hqtYa8a2VvRyUwMvwHb3Lr MuYnQJHeVda5OrYs/J1mtfALzOdfq00EC0Nb6Ywu2FKPq8O7URFLzglU/1Z25QqXNjDR rKB95jb323PP+XV8z4xRJne5fEo3ZTGWBzjXggzUiaoTTY519r9PnlYzZlq9g/ztA3jI Ps6jyL64dZp2M03ULGD8DCeUi3gQnJsRFAF3qnSpfQ4oCxlZzh2QcTuKN+jw8uNjjQBu 3x3y5V/cYXGDjnWFYiofb1pyfmqBsOQoVSwzic3oNVhbfGA5T1DWH8LuYGbmgHyVzmLo c3zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wR8cLCNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t4-20020a63f344000000b00565e7a3342dsi572289pgj.256.2023.10.30.23.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 23:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wR8cLCNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DBB6D80A9AB5; Mon, 30 Oct 2023 23:09:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235234AbjJaGJB (ORCPT + 99 others); Tue, 31 Oct 2023 02:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232743AbjJaGI6 (ORCPT ); Tue, 31 Oct 2023 02:08:58 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C3DA2 for ; Mon, 30 Oct 2023 23:08:56 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-507be298d2aso7571350e87.1 for ; Mon, 30 Oct 2023 23:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698732534; x=1699337334; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ti+gd1S2oN/iUTNC/6buX1WfsVyGVF4t1qDxc027Lfs=; b=wR8cLCNi0End3WflouUxbog2XYuBN9Xjxy39wJBfuzu15k7naqYS+F9q0vvlXPNiIH 09G8OxvVVMr57FDbsb5ASbQGmyiltJYonZFTB8KxhXNCCXDeyKPJ4wakW6ULP58Nkldj l4ia6JPe8f5YqB4MNOzJXu7pbq5Mz9DHPNxdIHfOvuJKZXkIXitbk4Ie2OBBJ9C4tVKU Hfw/XcghbRvu0H4+KOB1bLpREWoBTwCiwGKgtmznfWLp9WDMTsUXuc76UtLs/jcFgia5 0mLPYLCe/nCnwy0yobju6vD96hZ+eWzZfsUjGy1K3UObjqPtcaI5uGGBhMtgecxd4TVX EpQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698732534; x=1699337334; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ti+gd1S2oN/iUTNC/6buX1WfsVyGVF4t1qDxc027Lfs=; b=hhBIG+ckHyV/cNOzG5gTs3mbbJ+PTUOJcNmEPmxdOYUzJ2ILbO8R9VxXTc2C4QQM1X KcenaYRPM+Het4j5LhPhQm4zzCGNj2K2o5dW5GO2fOw5VSxqHdiWjCdUsCOQ0fTI6iFv BK7AC8ALg8nQAF67RmFli/JFGd+St3ytJJQsUNG/LLzyeDnlr0Lb0gtrCyca4nuv+4+K lGmbfq4y/j9rFKps1ocgUkAxNLKLiZAVyDDy93BT6M+gdh4o4OlNTHuXGHOT/CNECxsf MC6QFoTWKpBJQ+qKwnn0T6CyQRG0Eykmp8HdbodvFgc4TSytaFJDZCjOSi3crkWLdJR7 NhqA== X-Gm-Message-State: AOJu0Yy/EXveVsPnX86owgELoC9iAYX7bFp0QM3ULCPHBJzNWtqMOTy0 PaPx8gwbpb8VxClfM8H+Y6QQMlFFDZtotQ23ZR8= X-Received: by 2002:a50:9e87:0:b0:53d:a1c0:410f with SMTP id a7-20020a509e87000000b0053da1c0410fmr8364052edf.2.1698732076574; Mon, 30 Oct 2023 23:01:16 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id d29-20020a50f69d000000b00522828d438csm531565edn.7.2023.10.30.23.01.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Oct 2023 23:01:16 -0700 (PDT) Message-ID: <22c74d90-19f8-4a68-ad01-1b7ed833cf91@linaro.org> Date: Tue, 31 Oct 2023 07:01:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/2] i2c: mv64xxx: add an optional bus-reset-gpios property Content-Language: en-US To: Chris Packham , "gregory.clement@bootlin.com" , "andi.shyti@kernel.org" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , Abel Vesa , Mark Brown Cc: "linux-i2c@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20231027033104.1348921-1-chris.packham@alliedtelesis.co.nz> <20231027033104.1348921-3-chris.packham@alliedtelesis.co.nz> <65911ec0-e073-435f-846a-c5501dd5d3a9@linaro.org> <9eebec9b-e6fd-4a22-89ea-b434f446e061@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDSzG1oZyM4k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=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 30 Oct 2023 23:09:08 -0700 (PDT) On 29/10/2023 21:48, Chris Packham wrote: > > On 28/10/23 00:37, Krzysztof Kozlowski wrote: >> On 27/10/2023 13:27, Krzysztof Kozlowski wrote: >>> On 27/10/2023 05:31, Chris Packham wrote: >>>> Some hardware designs have a GPIO used to control the reset of all the >>>> devices on and I2C bus. It's not possible for every child node to >>>> declare a reset-gpios property as only the first device probed would be >>>> able to successfully request it (the others will get -EBUSY). Represent >> Cc: Mark, >> >> Also this part is not true. If the bus is non-discoverable, then it is >> possible to have reset-gpios in each probed device. You can share GPIOs, >> so no problem with -EBUSY at all. > > Last time I checked you couldn't share GPIOs. If that's no longer the > case then I can probably make what I need to happen work. It still > creates an issue that I have multiple PCA954x muxes connected to a > common reset GPIO so as each mux is probed the PCA954x driver will > toggle the reset. That's probably OK as the PCA954x is sufficiently > stateless that the extra resets won't do any harm but if it were a more > complicated device then there would be issues. I know, but this is a broader problem, not really specific to this one device. I also argue that your I2C controller does not actually have this reset line. > > Having some kind of ref-counted reset controller that is implemented > with GPIOs is probably the better solution. I was kind of surprised that > nothing existed like that in drivers/reset. reset controller framework already supports this. The point is that GPIO reset is not a reset controller, so in terms of bindings "resets" property does not fit it. > >> The problem is doing reset: >> 1. in proper moment for all devices >> 2. without affecting other devices when one unbinds/remove() >> >> The (2) above is not solveable easy in kernel and we already had nice >> talks about it just few days ago: >> 1. Apple case: >> https://scanmail.trustwave.com/?c=20988&d=6qC75SLs-9PNM1ZHpLa6reGv82R6opEUmyI62vCytQ&u=https%3a%2f%2fsocial%2etreehouse%2esystems%2f%40marcan%2f111268780311634160 >> >> 2. my WSA884x: >> https://scanmail.trustwave.com/?c=20988&d=6qC75SLs-9PNM1ZHpLa6reGv82R6opEUmyJk3q3j7g&u=https%3a%2f%2flore%2ekernel%2eorg%2falsa-devel%2f84f9f1c4-0627-4986-8160-b4ab99469b81%40linaro%2eorg%2f > Apologies for the mangled links (they're more secure now at least that's > what our IS team have been sold). >> Last, >> I would like to apologize to you Chris. I understand that bringing such >> feedback at v5 is not that good. I had plenty of time to say something >> earlier, so this is not really professional from my side. I am sorry, >> just my brain did not connect all these topics together. >> >> I apologize. > > Actually I kind of expected this feedback. I figured I could start with > the driver that is currently causing me issues and once the dt-binding > was considered good enough it might migrate to the i2c core. > >> Best regards, Krzysztof