From patchwork Mon Sep 11 07:45:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9946747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C6AB602C9 for ; Mon, 11 Sep 2017 07:46:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F30ED28B47 for ; Mon, 11 Sep 2017 07:46:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7E2E28B4A; Mon, 11 Sep 2017 07:46:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB7FE28B47 for ; Mon, 11 Sep 2017 07:46:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751291AbdIKHp7 (ORCPT ); Mon, 11 Sep 2017 03:45:59 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:48632 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751250AbdIKHpy (ORCPT ); Mon, 11 Sep 2017 03:45:54 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2001:1bc8:1a6:d3d5::80:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 9C40360102; Mon, 11 Sep 2017 10:45:51 +0300 (EEST) Received: from sakke by valkosipuli.localdomain with local (Exim 4.89) (envelope-from ) id 1drJPi-0003hm-V5; Mon, 11 Sep 2017 10:45:51 +0300 Date: Mon, 11 Sep 2017 10:45:50 +0300 From: Sakari Ailus To: Pavel Machek Cc: Sakari Ailus , linux-media@vger.kernel.org, niklas.soderlund@ragnatech.se, robh@kernel.org, hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, linux-acpi@vger.kernel.org, mika.westerberg@intel.com, devicetree@vger.kernel.org, sre@kernel.org Subject: Re: [PATCH v9 23/24] dt: bindings: smiapp: Document lens-focus and flash properties Message-ID: <20170911074550.5lzfh5r5g4z7fyjo@valkosipuli.retiisi.org.uk> References: <20170908131235.30294-1-sakari.ailus@linux.intel.com> <20170908131822.31020-19-sakari.ailus@linux.intel.com> <20170908133652.GR18365@amd> <20170908134226.m5ts637dej7oa4jw@valkosipuli.retiisi.org.uk> <20170908214544.GB27428@amd> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170908214544.GB27428@amd> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Sep 08, 2017 at 11:45:44PM +0200, Pavel Machek wrote: > On Fri 2017-09-08 16:42:26, Sakari Ailus wrote: > > Hi Pavel, > > > > On Fri, Sep 08, 2017 at 03:36:52PM +0200, Pavel Machek wrote: > > > Hi! > > > > > > > Document optional lens-focus and flash properties for the smiapp driver. > > > > > > > > Signed-off-by: Sakari Ailus > > > > --- > > > > Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt > > > > index 855e1faf73e2..a052969365d9 100644 > > > > --- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt > > > > +++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt > > > > @@ -27,6 +27,8 @@ Optional properties > > > > - nokia,nvm-size: The size of the NVM, in bytes. If the size is not given, > > > > the NVM contents will not be read. > > > > - reset-gpios: XSHUTDOWN GPIO > > > > +- flash-leds: One or more phandles to refer to flash LEDs > > > > +- lens-focus: Phandle for lens focus > > > > > > Should we simply reference the generic documentation here? If it needs > > > changing, it will be easier changing single place. > > > > Good question. > > > > Ideally the properties at least would never change; we do have a common > > parser for the properties which is part of the patchset so in theory it > > would be possible to change the documentation in a backward-compatible way. > > > > I added these properties as well as all the other properties supported by > > the sensor driver are documented here. That has been the practice AFAIU, > > albeit omissions do happen occasionally. > > > > The issue I see with omitting the documentation here is that the user > > otherwise won't know whether a driver uses a given property or not: it > > shouldn't be necessary to read driver code to write DT source. > > I see... OTOH documentation in central place _is_ a bit more verbose: > > +- flash-leds: An array of phandles, each referring to a flash LED, a sub-node > + of the LED driver device node. > > What about: > > flash-leds, lens-focus: see > > ? How about this? I prefer to put them on separate lines as it's easier to read that way. diff --git a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt index a052969365d9..33f10a94c381 100644 --- a/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt +++ b/Documentation/devicetree/bindings/media/i2c/nokia,smia.txt @@ -27,8 +27,8 @@ Optional properties - nokia,nvm-size: The size of the NVM, in bytes. If the size is not given, the NVM contents will not be read. - reset-gpios: XSHUTDOWN GPIO -- flash-leds: One or more phandles to refer to flash LEDs -- lens-focus: Phandle for lens focus +- flash-leds: See ../video-interfaces.txt +- lens-focus: See ../video-interfaces.txt Endpoint node mandatory properties