On Saturday 23 June 2007, Rafael J. Wysocki wrote: > On Saturday, 23 June 2007 03:32, Alan Stern wrote: > > A good way to identify a sleep state would be a pointer to a string > > containing the state's name. The PM core could use these pointers to > > export the states in sysfs. > > Well, I thought of exactly the same thing. There's an echo in the room ... > Perhaps we can generalize it a bit by defining: > > struct pm_sleep_state { > char *name; > }; I suppose having the core use only the name would be a bit radical; but on the other hand, I really like the resulting notion that the generic code must accordingly know *NOTHING* about the semantics of any such states. Having a struct sort of begs that it someday be expanded. > and make the platforms give us a NULL-terminated array of such things during > the initializatiion. And conceptually "typedef struct pm_sleep_state *suspend_state_t;"? Though eventually "suspend_state_t" should vanish. - Dave _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm