mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@sirena.org.uk>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Liam Girdwood <lrg@kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	eric miao <eric.y.miao@gmail.com>
Subject: Re: Da903x regulator driver. Bug?
Date: Fri, 24 Oct 2008 20:44:16 +0100	[thread overview]
Message-ID: <20081024194415.GB6621@sirena.org.uk> (raw)
In-Reply-To: <490219B1.6010502@cam.ac.uk>

On Fri, Oct 24, 2008 at 07:53:37PM +0100, Jonathan Cameron wrote:

> >> is 2 layers down rather than one requiring quite a few changes
> >> to   
> >>  struct device *da9034_dev = rdev_get_dev(rdev)->parent->parent;
> >> from
> >>     struct device *da9034_dev = rdev_get_dev(rdev)->parent;

> >> So either a change to the regulator framework is needed to
> >> allow mfd's or these extra ->parent lines need to go in in lots
> >> of places.

> >> Which do people prefer?

> > Could you fix in a similar method to the wm8350/wm8400. 

> Based on a quick look, I think this involves carrying around
> an additional copy of the device pointer inside the driver data.

> If so that would indeed work.

Yes, I'm actively using these.  I had been considering going back and
removing the extra layer of platform device from the code for WM8350 and
WM8400 since there is now less benefit to it but I would probably still
continue to use the driver_data to store the pointer to the wm8350 data
since I find that gives clear code.

The current situation was a minimal adaption to avoid churn in the core
API close to release - previously the regulator had been forced to be a
platform device but this was changed since we have to allocate a new
device when registering the regulator in order to have the class work in
sysfs.

  reply	other threads:[~2008-10-24 19:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 15:47 Jonathan Cameron
2008-10-24 17:23 ` Jonathan Cameron
2008-10-24 18:24   ` Liam Girdwood
2008-10-24 18:53     ` Jonathan Cameron
2008-10-24 19:44       ` Mark Brown [this message]
2008-10-27 15:29 ` [PATCH] da903x regulator bug fix Jonathan Cameron
2008-10-28  1:01   ` Eric Miao
2008-10-28  1:02     ` Eric Miao
2008-10-28 10:40       ` Jonathan Cameron
2008-10-28 11:03       ` Jonathan Cameron
2008-10-28 11:19         ` Liam Girdwood
2008-10-28 12:21           ` Eric Miao

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=20081024194415.GB6621@sirena.org.uk \
    --to=broonie@sirena.org.uk \
    --cc=Jonathan.Cameron@gmail.com \
    --cc=eric.y.miao@gmail.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@kernel.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

all inboxes | Powered by JetHome®