diff --git a/include/linux/powerop.h b/include/linux/powerop.h new file mode 100644 index 0000000..eebff76 --- /dev/null +++ b/include/linux/powerop.h @@ -0,0 +1,40 @@ +/* + * PowerOP core definitions + * + * Author: Todd Poynor + * Interface update by Eugeny S. Mints + * + * 2005 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ +#ifndef __POWEROP_H__ +#define __POWEROP_H__ + +struct powerop_named_op { + struct kobject kobj; /* hook to reference an op by a name */ + void *md_opt; /* arch dependent set of power parameters */ +}; + +struct powerop_driver { + char *name; + int (*set_point)(void *md_opt); + int (*get_point)(void *md_opt); +}; + +/* Interface to upper PMF layers */ +int powerop_set_point(powerop_named_op *opt); +int powerop_get_point(powerop_named_op *opt); + +/* Interface to an arch PM core */ +int powerop_driver_register(struct powerop_driver *p); +void powerop_driver_unregister(struct powerop_driver *p); + +/* Interface to handle named OP by PowerOP core layer */ +int powerop_register_point(const char *id, void *md_opt); +int powerop_unregister_point(const char *id); +int powerop_select_point(const char *id); + +#endif /* __POWEROP_H__ */ +