From: Greg KH <greg@kroah.com>
To: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
linux-kernel <linux-kernel@vger.kernel.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [UPDATED v3][PATCH 4/7] regulator: framework core
Date: Sat, 8 Mar 2008 19:16:17 -0800 [thread overview]
Message-ID: <20080309031617.GB24955@kroah.com> (raw)
In-Reply-To: <1205011139.13653.75.camel@localhost.localdomain>
On Sat, Mar 08, 2008 at 09:18:59PM +0000, Liam Girdwood wrote:
> On Fri, 2008-03-07 at 23:41 -0800, Greg KH wrote:
> > On Fri, Mar 07, 2008 at 10:19:51PM +0000, Liam Girdwood wrote:
> > > On Fri, 2008-03-07 at 08:10 -0800, Greg KH wrote:
> > > > On Thu, Mar 06, 2008 at 06:11:54PM +0000, Liam Girdwood wrote:
> > >
> > > > > +/**
> > > > > + * struct regulator_cdev
> > > > > + *
> > > > > + * Voltage / Current regulator class device. One for each regulator.
> > > > > + */
> > > > > +struct regulator_cdev {
> > > > > + struct regulator_desc *desc;
> > > > > + int use_count;
> > > > > +
> > > > > + struct list_head list;
> > > > > + struct list_head consumer_list;
> > > > > + struct blocking_notifier_head notifier;
> > > > > + struct mutex mutex; /* consumer lock */
> > > > > + struct module *owner;
> > > > > + struct class_device cdev;
> > > >
> > > > Can you change this to use a "struct device" instead? We are trying to
> > > > get rid of class_device, and there are only 3 users of it in the kernel
> > > > today (memorystick, infiniband, and scsi), and I have patches pending to
> > > > fix all of these. For 2.6.26 I would like to be rid of it finally.
> > > >
> > > > If you want, I would be glad to fix this up for you, it should be a
> > > > pretty simple replacement.
> > > >
> > >
> > > Yes please. Much appreciated :)
> >
> > Ok, it's below, on top of your patch series. If you want me to merge it
> > in, I can do that as well. It's a bit big, as I renamed "cdev" to "dev"
> > in your structure names and variable names as it isn't a class device
> > anymore.
>
> Thanks. I've now committed into Wolfson git. I'll give it a spin on real
> hardware early next week and then send to Andrew.
>
> >
> > > > > + struct regulation_constraints *constraints;
> > > > > + struct regulator_cdev *parent; /* for tree */
> > > >
> > > > And if when you convert, you can get rid of this pointer, it would not
> > > > be needed.
> > >
> > > Fwiw, the regulator-parent relationship is established by the platform
> > > code after the regulator driver has registered all the regulator
> > > devices. I assume we can just device_move() to re-parent.
> >
> > Ick, no, just pass the parent into the regulator_register() function.
> > Otherwise you will get some wierd uevents spit out (run udevmonitor to
> > see what I mean.) You should set up the parent linkage before you
> > register the device with the driver core.
>
> Sorry, I think the 'parent' naming is a little confusing. The device
> parent would be set at register time and the 'supply' would be set later
> during platform power config.
Heh, we both are confused here. Your statement is exactly what I was
recommending :)
Feel free to CC: me on your next round of patches if you want me to
review them.
thanks,
greg k-h
prev parent reply other threads:[~2008-03-09 3:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 18:11 [UPDATED v3][PATCH 4/7] regulator: framework core Liam Girdwood
2008-03-07 8:39 ` Andrew Morton
2008-03-08 17:24 ` Liam Girdwood
2008-03-08 18:30 ` Andrew Morton
2008-03-09 11:18 ` Liam Girdwood
2008-03-07 16:10 ` Greg KH
2008-03-07 22:19 ` Liam Girdwood
2008-03-08 7:41 ` Greg KH
2008-03-08 21:18 ` Liam Girdwood
2008-03-09 3:16 ` Greg KH [this message]
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=20080309031617.GB24955@kroah.com \
--to=greg@kroah.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lg@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.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