[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1204928391.13653.27.camel@localhost.localdomain>
Date: Fri, 07 Mar 2008 22:19:51 +0000
From: Liam Girdwood <lg@...nsource.wolfsonmicro.com>
To: Greg KH <greg@...ah.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-arm-kernel <linux-arm-kernel@...ts.arm.linux.org.uk>,
linux-kernel <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [UPDATED v3][PATCH 4/7] regulator: framework core
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 :)
> > + 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.
It may also be nice to have a link like /sys/power/regulator
-> /sys/devices/.../regulator
>
> > + void *reg_data; /* regulator_cdev data */
>
> Nor would this one. Actually I don't think you need this one today
> anyway...
>
Agreed, this is just driver_data for the regulator driver.
Many Thanks
Liam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists