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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FAD2C433E2 for ; Tue, 8 Sep 2020 09:46:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F3572076C for ; Tue, 8 Sep 2020 09:46:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728893AbgIHJqv (ORCPT ); Tue, 8 Sep 2020 05:46:51 -0400 Received: from mga18.intel.com ([134.134.136.126]:7276 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728591AbgIHJqu (ORCPT ); Tue, 8 Sep 2020 05:46:50 -0400 IronPort-SDR: 88L+Y8oIvXvSH9OO6VoewxGm74/Ke/jS1sZJW6jzMyGMSjdlxWsskQJTMUfW8EzdQP4UGhoxHZ ig3R1OXHadGw== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="145812874" X-IronPort-AV: E=Sophos;i="5.76,405,1592895600"; d="scan'208";a="145812874" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 02:46:49 -0700 IronPort-SDR: JCsKZbWN6Vz7RQqkJklFsmCFoRp3eDltO1H9Br0I7dMd8eGpZYQvSQ/sNUdHZcUaYgBJuURuQp SpE2unAMwpsg== X-IronPort-AV: E=Sophos;i="5.76,405,1592895600"; d="scan'208";a="299732273" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2020 02:46:45 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 5DEE920765; Tue, 8 Sep 2020 12:46:43 +0300 (EEST) Date: Tue, 8 Sep 2020 12:46:43 +0300 From: Sakari Ailus To: Andy Shevchenko Cc: Dongchun Zhu , Andy Shevchenko , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Nicolas Boichat , Tomasz Figa , Matthias Brugger , Bingbu Cao , srv_heupstream , "moderated list:ARM/Mediatek SoC support" , linux-arm Mailing List , Sj Huang , Linux Media Mailing List , devicetree , Louis Kuo , Shengnan Wang =?utf-8?B?KOeOi+Wco+eUtyk=?= , matrix.zhu@aliyun.com Subject: Re: [PATCH v14 2/2] media: i2c: Add OV02A10 image sensor driver Message-ID: <20200908094643.GE27352@paasikivi.fi.intel.com> References: <20200902120122.24456-1-dongchun.zhu@mediatek.com> <20200902120122.24456-3-dongchun.zhu@mediatek.com> <20200902134421.GN1891694@smile.fi.intel.com> <20200902135145.GO1891694@smile.fi.intel.com> <1599226354.4733.69.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Andy, On Fri, Sep 04, 2020 at 04:55:56PM +0300, Andy Shevchenko wrote: > On Fri, Sep 4, 2020 at 4:38 PM Dongchun Zhu wrote: > > On Wed, 2020-09-02 at 16:51 +0300, Andy Shevchenko wrote: > > > On Wed, Sep 02, 2020 at 04:44:21PM +0300, Andy Shevchenko wrote: > > > > On Wed, Sep 02, 2020 at 08:01:22PM +0800, Dongchun Zhu wrote: > > > > > > > > + ret = fwnode_property_read_u32(dev_fwnode(dev), "rotation", &rotation); > > > > > > > > + ret = fwnode_property_read_u32_array(dev_fwnode(dev), > > > > > > > > + fwnode_property_read_u32_array(dev_fwnode(dev), > > > > > > > > + ret = fwnode_property_read_u32(dev_fwnode(dev), "clock-frequency", > > > > > > > > > Btw, can somebody explain, why it's fwnode API and not direct use of device property API? > > > > > > In all above cases I see no reason why not to use device property API directly. > > > > > > > From the fwnode API's usage: > > @fwnode: Firmware node to get the property of. > > > > It seems dev_fwnode(dev) could return dev->of_node->fwnode if CONFIG_OF > > is enabled, or return dev->fwnode if not. > > So?.. > > Shouldn't be the above an equivalent to device_property_*(dev, ...)? Yes. V4L2 does not have a dummy implementation for almost no V4L2 driver has no use without V4L2. -- Regards, Sakari Ailus