Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp205053pxf; Wed, 17 Mar 2021 03:18:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdfUEnkcROdSNe/ayVM2tA6mWieQAvW9+JHf71fBcdxieIr+KZmol/yE0EPq9YKtoMEGgs X-Received: by 2002:a17:906:b4c:: with SMTP id v12mr34887699ejg.330.1615976301783; Wed, 17 Mar 2021 03:18:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615976301; cv=none; d=google.com; s=arc-20160816; b=arsjqjTgwOBTLCeldp8i8FmFzqcfk6ZBuX46dFX3w6PJIRgrbV/x78dqIxX166yoiy wce9dsxDjFuFJft/MVnAzhg/cy9DTLuFGdu38ciyBqk6xJqIOaUP6eNJ4k4E84z1WZQq t9EIn2+PRKbE25cXvh81nmTswHwfcsl5XmNn3KlerCDqCUGAoXbtFVG5CzXwQhdKI9X2 8UuHwj58wTkJOhyLEqq+eJ3jX2ZqFon48HVAGzJaeOGHqesjJOihrC+R2jB4yGMuZI1Z T3ESJpayEc1twfxfZHmihzi0HwAzUl129FEnKIaVaI+aoG0xQEmVD0S55kE4EzXPp3DP N0fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=l3LkHofuPB4JNYok8z8yhzgHLUYZRR9dtFNQOruNMUM=; b=YEIALbX9l1w83dSigMdyKu1lnJdWGItIiimGLaPPLfPd/HS2xwNYd0TTAE9q7qj9eN 2gMd4y5pLK46dLjGWUDMw3bcqTMIJcvOTdav177X6mxgFVY/lRJVRkWb2euejZ9mqfjE amnaI4SINQWHUxAaXw3ZCGOxAxq+mQoeWDh1Vv/cQXwFEfbsV3Fs+zXaEgb9F8WqEi+k KCIhY9kRf8PKjSUsppwPHX3eApkRlnqkWgNW0SqEensEc7CUPtS6SqhZtr+NMx4TQYeo mpZqLjx/i3V7LRQeouQBtoy7Ks/Zs+r/7I5F02CA5i1kg0bWPePNxzH2ErgxzQ/hj/0U V7ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si16094654ejz.464.2021.03.17.03.17.58; Wed, 17 Mar 2021 03:18:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbhCQKOK (ORCPT + 99 others); Wed, 17 Mar 2021 06:14:10 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:52705 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbhCQKNp (ORCPT ); Wed, 17 Mar 2021 06:13:45 -0400 X-Originating-IP: 79.22.58.175 Received: from uno.localdomain (host-79-22-58-175.retail.telecomitalia.it [79.22.58.175]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 54E8BC0006; Wed, 17 Mar 2021 10:13:41 +0000 (UTC) Date: Wed, 17 Mar 2021 11:14:12 +0100 From: Jacopo Mondi To: Laurent Pinchart Cc: Jacopo Mondi , Geert Uytterhoeven , Magnus Damm , Kieran Bingham , Rob Herring , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] dt-bindings: media: max9286: Describe gpio-hog Message-ID: <20210317101412.srdzao52nxsvtq3r@uno.localdomain> References: <20210315163028.173148-1-jacopo+renesas@jmondi.org> <20210315163028.173148-2-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Tue, Mar 16, 2021 at 12:15:16AM +0200, Laurent Pinchart wrote: > Hi Jacopo, > > Thank you for the patch. > > On Mon, Mar 15, 2021 at 05:30:25PM +0100, Jacopo Mondi wrote: > > The MAX9286 GMSL deserializer features gpio controller capabilities, > > as it provides 2 GPIO lines. > > > > As establishing a regulator that uses one of the GPIO lines and > > enabling/disabling it at run-time in the max9286 won't work due to > > a circular dependency on the gpio-controller/regulator creation, allow > > the usage of a gpio-hog for that purpose. > > > > The usage of the gpio-hog is required in designs where the MAX9286 > > GPIO lines control the remote cameras power. > > > > Signed-off-by: Jacopo Mondi > > That's really a workaround until we can find a good solution, do we have > to officially support it in the DT bindings ? > That's an interesting question. The 'good' solution implies resolving the circular dependency on the regulator/gpio-controller creation and I feel like it might take a while to find a proper solution. In the meantime, all designs like Eagle that control the camera power through a MAX9286 gpio have to rely on this. I'll go with the majority here: either we add this and upstream the gmsl .dtsi for eagle, or we keep out-of-tree patches :/ > > --- > > .../bindings/media/i2c/maxim,max9286.yaml | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml > > index ee16102fdfe7..9038300e373c 100644 > > --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml > > +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml > > @@ -177,6 +177,22 @@ properties: > > > > additionalProperties: false > > > > +patternProperties: > > + "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$": > > + type: object > > + properties: > > + gpio-hog: true > > + gpios: true > > + output-low: true > > + line-name: true > > + > > + required: > > + - gpio-hog > > + - gpios > > + - output-low > > + > > + additionalProperties: false > > + > > required: > > - compatible > > - reg > > -- > Regards, > > Laurent Pinchart