All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	"Tomasz Figa" <tfiga@chromium.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Bingbu Cao" <bingbu.cao@intel.com>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	"linux-arm Mailing List" <linux-arm-kernel@lists.infradead.org>,
	"Sj Huang" <sj.huang@mediatek.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	"Louis Kuo" <louis.kuo@mediatek.com>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	matrix.zhu@aliyun.com
Subject: Re: [PATCH v14 2/2] media: i2c: Add OV02A10 image sensor driver
Date: Fri, 4 Sep 2020 16:55:56 +0300	[thread overview]
Message-ID: <CAHp75VezE2iGBarXke4P9z31SmymBgPH5fwoknt9vBfFTw0u=w@mail.gmail.com> (raw)
In-Reply-To: <1599226354.4733.69.camel@mhfsdcap03>

On Fri, Sep 4, 2020 at 4:38 PM Dongchun Zhu <dongchun.zhu@mediatek.com> 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, ...)?

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	devicetree <devicetree@vger.kernel.org>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Tomasz Figa" <tfiga@chromium.org>,
	"Louis Kuo" <louis.kuo@mediatek.com>,
	"Sj Huang" <sj.huang@mediatek.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Bingbu Cao" <bingbu.cao@intel.com>,
	matrix.zhu@aliyun.com,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"linux-arm Mailing List" <linux-arm-kernel@lists.infradead.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [PATCH v14 2/2] media: i2c: Add OV02A10 image sensor driver
Date: Fri, 4 Sep 2020 16:55:56 +0300	[thread overview]
Message-ID: <CAHp75VezE2iGBarXke4P9z31SmymBgPH5fwoknt9vBfFTw0u=w@mail.gmail.com> (raw)
In-Reply-To: <1599226354.4733.69.camel@mhfsdcap03>

On Fri, Sep 4, 2020 at 4:38 PM Dongchun Zhu <dongchun.zhu@mediatek.com> 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, ...)?

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dongchun Zhu <dongchun.zhu@mediatek.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	devicetree <devicetree@vger.kernel.org>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Tomasz Figa" <tfiga@chromium.org>,
	"Louis Kuo" <louis.kuo@mediatek.com>,
	"Sj Huang" <sj.huang@mediatek.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Bingbu Cao" <bingbu.cao@intel.com>,
	matrix.zhu@aliyun.com,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"linux-arm Mailing List" <linux-arm-kernel@lists.infradead.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [PATCH v14 2/2] media: i2c: Add OV02A10 image sensor driver
Date: Fri, 4 Sep 2020 16:55:56 +0300	[thread overview]
Message-ID: <CAHp75VezE2iGBarXke4P9z31SmymBgPH5fwoknt9vBfFTw0u=w@mail.gmail.com> (raw)
In-Reply-To: <1599226354.4733.69.camel@mhfsdcap03>

On Fri, Sep 4, 2020 at 4:38 PM Dongchun Zhu <dongchun.zhu@mediatek.com> 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, ...)?

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-04 13:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 12:01 [PATCH v14 0/2] media: i2c: Add support for OV02A10 sensor Dongchun Zhu
2020-09-02 12:01 ` Dongchun Zhu
2020-09-02 12:01 ` Dongchun Zhu
2020-09-02 12:01 ` [PATCH v14 1/2] media: dt-bindings: media: i2c: Document OV02A10 bindings Dongchun Zhu
2020-09-02 12:01   ` Dongchun Zhu
2020-09-02 12:01   ` Dongchun Zhu
2020-09-03 16:13   ` Rob Herring
2020-09-03 16:13     ` Rob Herring
2020-09-03 16:13     ` Rob Herring
2020-09-04  3:24     ` Dongchun Zhu
2020-09-04  3:24       ` Dongchun Zhu
2020-09-04  3:24       ` Dongchun Zhu
2020-09-02 12:01 ` [PATCH v14 2/2] media: i2c: Add OV02A10 image sensor driver Dongchun Zhu
2020-09-02 12:01   ` Dongchun Zhu
2020-09-02 12:01   ` Dongchun Zhu
2020-09-02 13:44   ` Andy Shevchenko
2020-09-02 13:44     ` Andy Shevchenko
2020-09-02 13:44     ` Andy Shevchenko
2020-09-02 13:51     ` Andy Shevchenko
2020-09-02 13:51       ` Andy Shevchenko
2020-09-02 13:51       ` Andy Shevchenko
2020-09-04 13:32       ` Dongchun Zhu
2020-09-04 13:32         ` Dongchun Zhu
2020-09-04 13:32         ` Dongchun Zhu
2020-09-04 13:55         ` Andy Shevchenko [this message]
2020-09-04 13:55           ` Andy Shevchenko
2020-09-04 13:55           ` Andy Shevchenko
2020-09-08  9:46           ` Sakari Ailus
2020-09-08  9:46             ` Sakari Ailus
2020-09-08  9:46             ` Sakari Ailus
2020-09-04 13:22     ` Dongchun Zhu
2020-09-04 13:22       ` Dongchun Zhu
2020-09-04 13:22       ` Dongchun Zhu
2020-09-04 14:05       ` Andy Shevchenko
2020-09-04 14:05         ` Andy Shevchenko
2020-09-04 14:05         ` Andy Shevchenko
2020-09-07 13:15         ` Tomasz Figa
2020-09-07 13:15           ` Tomasz Figa
2020-09-07 13:15           ` Tomasz Figa
2020-09-07 13:51           ` Andy Shevchenko
2020-09-07 13:51             ` Andy Shevchenko
2020-09-07 13:51             ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75VezE2iGBarXke4P9z31SmymBgPH5fwoknt9vBfFTw0u=w@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dongchun.zhu@mediatek.com \
    --cc=drinkcat@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=louis.kuo@mediatek.com \
    --cc=mark.rutland@arm.com \
    --cc=matrix.zhu@aliyun.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shengnan.wang@mediatek.com \
    --cc=sj.huang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.