Re: [PM] Patrick: which part of "maintainer" and "peer review" needs explaining to you?

Matt Porter
2003-08-25T16:57:29Z

On Mon, Aug 25, 2003 at 05:27:37PM +0100, Russell King wrote:
> On Mon, Aug 25, 2003 at 08:47:16AM -0700, Patrick Mochel wrote:
> > > There is a hell of a lot of work which now needs to be done to re-fix
> > > everything which was working. For example, there is no sign of any
> > > power management for platform devices currently. Could you give some
> > > clues as to what you'd like to see there?
> >
> > How about following the system device scheme: 1 call, with interrupts
> > disabled?
>
> I don't think that's going to work well when you have more conventional
> devices below a platform device which need to be power managed (eg, a
> USB host.)
>
> I think we need to expand the platform device support to include the
> notion of platform drivers. For example:
>
> struct platform_driver {
> int (*probe)(struct platform_device *);
> int (*remove)(struct platform_device *);
> int (*suspend)(struct platform_device *, u32);
> int (*resume)(struct platform_device *);
> struct device_driver drv;
> };

Alternatively, you could leave the platform model as is (it's only
for really dumb devices). On PPC, we have an OCP (on chip peripheral)
model that is mostly integrated into the device model now. OCP is
just another bus/driver type and so PM works in the normal fashion.
There's a driver API around it as well so we can cleanly share drivers
across various SoC implementations with different base address,
IRQ mappings, etc. It might be more useful to extende this across
the architectures that need it.

-Matt