Rafael J. Wysocki schrieb: > I think we can introduce a "pm_safe" flag that will indicate if the driver > handles suspend/resume correctly. If we do it, we can flag all of the drivers > currently in the tree as "pm_safe" unless we know that they aren't. Next, > we can convert the core to fail the suspend for any driver that is not flagged > as "pm_safe". But I think that will take time. Why a new flag? IMHO it would be both more readable and more efficient to create a pm_generic_nosuspend() function which does "return -ENOSYS", and set that as the .suspend method on drivers known to break suspend/resume. New drivers should either have .suspend and .resume methods of their own or set .suspend = pm_generic_nosuspend. That way, NULL .suspend/.resume methods retain their current semantics ("don't know whether suspend would work, never thought about it"), error-returning ones would clearly signal "cannot suspend safely", and success-returning ones would equally clearly signal "suspend works ok". (Bugs nonwithstanding.) There could then be a policy parameter (Kconfig selectable to start) to abort suspend when encountering a driver without .suspend/.resume methods, or to proceed with a warning message. -- Tilman Schmidt E-Mail: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: NAK new drivers without proper power management?
- From: "Rafael J. Wysocki" <[email protected]>
- Re: NAK new drivers without proper power management?
- References:
- Re: NAK new drivers without proper power management?
- From: Arjan van de Ven <[email protected]>
- Re: NAK new drivers without proper power management?
- From: Nigel Cunningham <[email protected]>
- Re: NAK new drivers without proper power management?
- From: Pavel Machek <[email protected]>
- Re: NAK new drivers without proper power management?
- From: "Rafael J. Wysocki" <[email protected]>
- Re: NAK new drivers without proper power management?
- Prev by Date: Re: [PATCH 6/7] containers (V7): BeanCounters over generic process containers
- Next by Date: Re: Experimental driver for Ricoh Bay1Controller SD Card readers
- Previous by thread: Re: NAK new drivers without proper power management?
- Next by thread: Re: NAK new drivers without proper power management?
- Index(es):