Messages in this thread | | | Date | Fri, 24 Oct 2008 20:44:16 +0100 | From | Mark Brown <> | Subject | Re: Da903x regulator driver. Bug? |
| |
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.
| |