From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Date: Thu, 28 Oct 2021 21:36:23 +0000 Subject: Re: [PATCH v2 08/45] kernel: Add combined power-off+restart handler call chain API Message-Id: List-Id: References: <20211027211715.12671-1-digetx@gmail.com> <20211027211715.12671-9-digetx@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: "Rafael J. Wysocki" Cc: Thierry Reding , Jonathan Hunter , Lee Jones , Mark Brown , Andrew Morton , Guenter Roeck , Russell King , Daniel Lezcano , Andy Shevchenko , Ulf Hansson , Catalin Marinas , Will Deacon , Guo Ren , Geert Uytterhoeven , Greg Ungerer , Joshua Thompson , Thomas Bogendoerfer , Nick Hu , Greentime Hu , Vincent Chen , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Len Brown , Santosh Shilimkar , Krzysztof Kozlowski , Linus Walleij , Chen-Yu Tsai , =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , Tony Lindgren , Liam Girdwood , Philipp Zabel , Vladimir Zapolskiy , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Pavel Machek , Linux ARM , Linux Kernel Mailing List , linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev , linux-riscv@lists.infradead.org, Linux-sh list , xen-devel@lists.xenproject.org, ACPI Devel Maling List , Linux OMAP Mailing List , openbmc@lists.ozlabs.org, linux-tegra , Linux PM 28.10.2021 12:53, Rafael J. Wysocki пишет: >> +/** >> + * struct power_handler - Machine power-off + restart handler >> + * >> + * Describes power-off and restart handlers which are invoked by kernel >> + * to power off or restart this machine. Supports prioritized chaining for >> + * both restart and power-off handlers. Callback's priority must be unique. >> + * Intended to be used by device drivers that are responsible for restarting >> + * and powering off hardware which kernel is running on. >> + * >> + * Struct power_handler can be static. Members of this structure must not be >> + * altered while handler is registered. >> + * >> + * Fill the structure members and pass it to register_power_handler(). >> + */ >> +struct power_handler { > The name of this structure is too generic IMV. There are many things > that it might apply to in principle. > > What about calling power_off_handler or sys_off_handler as it need not > be about power at all? I didn't like much the 'power' either, but couldn't come up with a better variant. Will change it in v3, thank you.