Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570135
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 1/3] system-power: Add system power and restart framework |
| Date | 2017-01-30 23:00 +0100 |
| Message-ID | <t5s9s-K5-25@gated-at.bofh.it> (permalink) |
| References | <t5nMt-6G1-15@gated-at.bofh.it> <t5opc-6Tg-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 0/3] Add system power and restart framework Thierry Reding <thierry.reding@gmail.com> - 2017-01-30 18:50 +0100
[RFC 1/3] system-power: Add system power and restart framework Thierry Reding <thierry.reding@gmail.com> - 2017-01-30 19:00 +0100
Re: [RFC 1/3] system-power: Add system power and restart framework Pavel Machek <pavel@ucw.cz> - 2017-01-30 23:00 +0100
Re: [RFC 1/3] system-power: Add system power and restart framework Thierry Reding <thierry.reding@gmail.com> - 2017-01-31 18:50 +0100
Re: [RFC 1/3] system-power: Add system power and restart framework Pavel Machek <pavel@ucw.cz> - 2017-02-01 12:20 +0100
csiph-web