devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dong Aisheng <b29396-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Zhao Richard-B20223
	<B20223-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	"linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org"
	<linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org"
	<s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org"
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
	<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	"kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org"
	<kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"lrg-l0cyMroinI0@public.gmane.org"
	<lrg-l0cyMroinI0@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org"
	<sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: Re: [PATCH v4 1/7] mfd: add syscon driver based on regmap
Date: Mon, 3 Sep 2012 16:02:00 +0800	[thread overview]
Message-ID: <20120903080159.GA1740@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <20120903030858.GF2362-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>

On Mon, Sep 03, 2012 at 11:09:01AM +0800, Shawn Guo wrote:
> On Mon, Sep 03, 2012 at 10:31:03AM +0800, Dong Aisheng wrote:
> > > 
> > > I think of_node_put should be moved out from here and put into
> > > syscon_node_to_regmap and syscon_regmap_lookup_by_compatible.
> > > 
> > I guess no, if you want to move of_node_put into syscon_regmap_lookup_by_phandle,
> > then syscon_regmap_lookup_by_phandle has the same issue.
> 
> I guess not.  syscon_regmap_lookup_by_phandle itself calls of_parse_phandle,
> and that's where the refcount gets incremented, so syscon_regmap_lookup_by_phandle
> should be responsible for calling of_node_put to get the refcount decremented.
> 
Yes, the of_node_put will be done in syscon_node_to_regmap which is called by
syscon_regmap_lookup_by_phandle,
The reason why we do it is as i said in my last reply.

I think one known issue is that syscon_node_to_regmap may not be suitable to
be used by the driver who still wants to use the regmap node after calling the
syscon_node_to_regmap.
I still do not find such using case but i'm not sure whether it may exist.

Probably the safe way currently to do is just as you said:
Not put the node in syscon_node_to_regmap and let user decide.
Ok, i will update it.

Regards
Dong Aisheng

  parent reply	other threads:[~2012-09-03  8:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 10:56 [PATCH v4 0/7] add syscon driver based on regmap for general registers access Dong Aisheng
2012-08-29 10:56 ` [PATCH v4 1/7] mfd: add syscon driver based on regmap Dong Aisheng
2012-08-31  1:26   ` Shawn Guo
2012-09-03  2:31     ` Dong Aisheng
2012-09-03  3:09       ` Shawn Guo
     [not found]         ` <20120903030858.GF2362-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-09-03  8:02           ` Dong Aisheng [this message]
     [not found] ` <1346237818-9498-1-git-send-email-b29396-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-08-29 10:56   ` [PATCH v4 2/7] ARM: imx6q: add iomuxc gpr support into syscon Dong Aisheng
2012-08-31  2:02     ` Shawn Guo
2012-09-03  2:46       ` Dong Aisheng
2012-08-29 10:56 ` [PATCH v4 3/7] ARM: imx6q: add anatop " Dong Aisheng
2012-08-29 10:56 ` [PATCH v4 4/7] regulator: anatop-regulator: convert to use syscon to access anatop register Dong Aisheng
2012-08-29 10:56 ` [PATCH v4 5/7] ARM: imx6q: convert to use syscon to access anatop registers Dong Aisheng
2012-08-29 10:56 ` [PATCH v4 6/7] ARM: dts: imx6q: add simple-bus compatible string for anatop Dong Aisheng
2012-08-29 10:56 ` [PATCH v4 7/7] mfd: anatop-mfd: remove anatop driver Dong Aisheng
2012-08-31  1:39   ` Shawn Guo
2012-09-03  2:34     ` Dong Aisheng

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=20120903080159.GA1740@shlinux2.ap.freescale.net \
    --to=b29396-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=B20223-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lrg-l0cyMroinI0@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).