Messages in this thread | | | Date | Mon, 30 Jan 2017 22:53:01 +0100 | From | Pavel Machek <> | Subject | Re: [RFC 1/3] system-power: Add system power and restart framework |
| |
Hi!
> +struct system_power_chip; > + > +struct system_power_ops { > + int (*restart)(struct system_power_chip *chip, enum reboot_mode mode, > + char *cmd); > + int (*power_off_prepare)(struct system_power_chip *chip); > + int (*power_off)(struct system_power_chip *chip); > +}; > + > +struct system_power_chip { > + const struct system_power_ops *ops; > + struct list_head list; > + struct device *dev; > +};
Is it useful to have two structures? AFAICT one would do.
Do we always have struct device * to work with? IMO we have nothing suitable for example in the ACPI case. Would void * be more suitable?
Could you convert someting (acpi?) to the new framework as demonstration? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |