Subject: Re: 答复: [RFC PATCH] powerpc/fsl: add timer wakeup source

From: Scott Wood <[email-masked]>
Date: Tue, 9 Oct 2012 13:18:20 -0500

On 10/09/2012 08:56:53 AM, Wang Dongsheng-B40534 wrote:
>=20
> > > > > I'm pretty sure /proc/ is NOT where we want this exposed.
> > > >
> > > > Should probably go under the sysfs directory of the mpic =20
> device.  Or
> > > > better, make a generic interface for timer-based suspend wakeup =20
> (if
> > > there
> > > > isn't one already).  This current approach sits in an unpleasant
> > middle
> > > > ground between generic and device-specific.
> > > >
> > > /sys/power/wakeup_timer_seconds how about this?
> > > I think it is a freescale generic interface, this interface =20
> control by
> > > FSL_SOC && SUSPEND.
>=20
> > There's no such thing as a "Freescale generic interface".  Linux =20
> APIs
> > are not organized by hardware vendor.  Either make a truly generic
> > interface, reuse an existing one, or do something that is attached =20
> to
> > the specific driver.
> Thanks, I think i can change mpic timer registration, i will use =20
> platform_driver_register.
> I will merge "mpic timer" and "timer wakeup". In "mpic timer" the =20
> wakeup function
> controls by SUSPEND. The sys path is =20
> "/sys/devices/soc8572.4/ffe41100.timer/wakeup_seconds".
> do you have any suggestions for this? or have a better idea about the =20
> sys path?

I'm not sure what you mean by the merging, but the path looks OK (I'd =20
prefer a dash rather than underscore, but I'm not sure what the usual =20
practice is in sysfs).

That said, this seems like something that could use a truly generic =20
interface.

-Scott=