Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp155784imm; Mon, 1 Oct 2018 08:02:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV624mURH5I0NPN1J5JMO4Uttb8z3CK8PlDcrXDq9WQsK3j3F2DbktaWEJg3COaJkV4h08pRa X-Received: by 2002:a63:ad44:: with SMTP id y4-v6mr10503545pgo.138.1538406149316; Mon, 01 Oct 2018 08:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538406149; cv=none; d=google.com; s=arc-20160816; b=iWBviAbC79yAkQdDMxAI/6s6aeKX7ndXNVa2BIK6p/jJ13u+gfkWxgjMJH1E2ZYY6Q OZbjYenynnkPedenCapz4FK80DLXNcBgkE2ACZ2OwHfY43GkaYV6ddqbQLmS/2/t3bWv T/nXBF2e2dVj17+nWP/50BKzT11W1ezFUxURfssTbUxYW+UAk/6C62mCrPDuqrAJsPh3 FdgcnWOKYMOs1ox80Ov1A/KwoeDcFaZZ+Gi9J380uy2JR04UEYMLkVvkVPZx/xM0sFq1 kUy5nDk4be7KZ6To1fqHvrDfAsmSLzcHoWgohcZNhnd68jttTv3Mcw6JmyErLsBFJ2NO /5VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2yhqKKc+NR2fMhKwgVC8d3xnIVddy4/jUN940eqmbos=; b=erXDW+Rd1fLaBKUCNhfUzFTHHW3G8cF0ltPwzZRilpv+dL/1z5xeuoRcegWG98xj2j upcnNN71QiYoydA+nkIy5SSgsTSHHe46Isrvv4FXHuKsncqe3cf0Qw7oIz5kuKB+W5a/ ELckuAlzLT4lxhF7oTULSyY+QrfWRUspOqqfLRtHMlAvWYRnmsN7UYKZY/aI0o08hdKh aPwZtXaafqs1C5KotoahnCNgww660POXgHqzGQZa5CPEn3d+Pt/etrZUwbSPOAPHO2qL dGYj5y9YhIzTisSf2gus9uBbc8OAD4MmPQ9J9FQtw4EwtDnAf2Cv8iqxdLe4+ricwmJP oCOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="l/YUKbf0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si12586813plz.220.2018.10.01.08.02.14; Mon, 01 Oct 2018 08:02:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="l/YUKbf0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729550AbeJAVkJ (ORCPT + 99 others); Mon, 1 Oct 2018 17:40:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:56538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbeJAVkJ (ORCPT ); Mon, 1 Oct 2018 17:40:09 -0400 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 446D721473; Mon, 1 Oct 2018 15:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538406115; bh=ClBDrPF5Q4xSCvH44ZD/l+zTbgG5KrtCl05Z2LfAN2w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=l/YUKbf0bWO8IwgR09BHQn6oZA61vJ5YEIYylv9F0Ul+xFimwWz4z2YPwbWbysdx7 UY2b5CdUlxTphw9B5mwSwHC36kdy9JyaI8kKNsjSQ2JutdIWQWyyK2htXbV/FI+yYy KBJLeJrGR23xJT+Pol2WsCwEJbifPFoG13HGh24Q= Received: by mail-qt1-f179.google.com with SMTP id m15-v6so14271475qtp.8; Mon, 01 Oct 2018 08:01:55 -0700 (PDT) X-Gm-Message-State: ABuFfohTreeIdAPDYT3Oh4gsJ1/syxogHR3hOhNgM5jmSwKf/bne1F3F xfzAcUYL3rf1op0rIColGn1Yx1qBcS+5sO0tpA== X-Received: by 2002:ac8:190e:: with SMTP id t14-v6mr8894810qtj.327.1538406114379; Mon, 01 Oct 2018 08:01:54 -0700 (PDT) MIME-Version: 1.0 References: <20180920204751.29117-1-ricardo.ribalda@gmail.com> <20180920204751.29117-3-ricardo.ribalda@gmail.com> <20180927182311.GA27227@bogus> In-Reply-To: From: Rob Herring Date: Mon, 1 Oct 2018 10:01:42 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/7] [media] ad5820: DT new optional field enable-gpios To: Ricardo Ribalda Delgado Cc: Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab , Linux Media Mailing List , "linux-kernel@vger.kernel.org" , Hans Verkuil , Laurent Pinchart , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 1, 2018 at 7:40 AM Ricardo Ribalda Delgado wrote: > > Hi > On Mon, Oct 1, 2018 at 2:36 PM Rob Herring wrote: > > > > On Mon, Oct 1, 2018 at 3:20 AM Ricardo Ribalda Delgado > > wrote: > > > > > > Hi Rob > > > On Thu, Sep 27, 2018 at 8:23 PM Rob Herring wrote: > > > > > > > > On Thu, Sep 20, 2018 at 10:47:47PM +0200, Ricardo Ribalda Delgado wrote: > > > > > Document new enable-gpio field. It can be used to disable the part > > > > > > > > enable-gpios > > > > > > > > > without turning down its regulator. > > > > > > > > > > Cc: devicetree@vger.kernel.org > > > > > Signed-off-by: Ricardo Ribalda Delgado > > > > > Acked-by: Pavel Machek > > > > > --- > > > > > Documentation/devicetree/bindings/media/i2c/ad5820.txt | 7 +++++++ > > > > > 1 file changed, 7 insertions(+) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/i2c/ad5820.txt b/Documentation/devicetree/bindings/media/i2c/ad5820.txt > > > > > index 5940ca11c021..9ccd96d3d5f0 100644 > > > > > --- a/Documentation/devicetree/bindings/media/i2c/ad5820.txt > > > > > +++ b/Documentation/devicetree/bindings/media/i2c/ad5820.txt > > > > > @@ -8,6 +8,12 @@ Required Properties: > > > > > > > > > > - VANA-supply: supply of voltage for VANA pin > > > > > > > > > > +Optional properties: > > > > > + > > > > > + - enable-gpios : GPIO spec for the XSHUTDOWN pin. Note that the polarity of > > > > > +the enable GPIO is the opposite of the XSHUTDOWN pin (asserting the enable > > > > > +GPIO deasserts the XSHUTDOWN signal and vice versa). > > > > > > > > shutdown-gpios is also standard and seems like it would make more sense > > > > here. Yes, it is a bit redundant to have both, but things just evolved > > > > that way and we don't want to totally abandon the hardware names (just > > > > all the variants). > > > > > > > > > > Sorry to insist > > > > > > The pin is called xshutdown, not shutdown and is inverse logic, > > > Wouldnt it make more sense to use the name > > > enable-gpios? > > > > Inverse of what? shutdown-gpios is the inverse of enable-gpios. By > > using shutdown-gpios you can just get rid of "Note that the polarity > > of the enable GPIO is the opposite of the XSHUTDOWN pin (asserting the > > enable GPIO deasserts the XSHUTDOWN signal and vice versa)." > > The pin is called XSHUTDOWN > > 0V means shutdown > > 3.3V means enable > > This is why I think is more clear to use enable as name in the device tree. Neither enable-gpios nor shutdown-gpios have a defined polarity. The polarity is part of the flags cell in the specifier. Rob