On 4/20/22 21:47, Rafael J. Wysocki wrote:
+ spin_unlock(&platform_power_off_lock);
+
+ if (ret)
+ return ret;
+
+ ret = register_power_off_handler(&priv->power_off_nb);
+ if (ret)
+ priv->platform_power_off
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+ void (*platform_power_off_cb)(void);
+ void (*simple_power_off_cb)(void *data);
+ void *simple_power_off_cb_data;
>>> Is there any particular reason to put these callbacks here and not
>>> directly into struct sys_off_han
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+/**
+ * devm_register_prioritized_power_off_handler - Register prioritized
power-off callback
+ * @dev: Device that registers callback
+ * @priority: Callback's priority
+ * @callback: Callback function
On 4/20/22 21:47, Rafael J. Wysocki wrote:
+ POWEROFF_PREPARE,
+};
+
+/**
+ * struct power_off_data - Power-off callback argument
+ *
+ * @cb_data: Callback data.
+ */
+struct power_off_data {
+ void *cb_data;
+};
+
+/**
>
On Mon, Apr 18, 2022 at 3:44 AM Dmitry Osipenko
wrote:
>
> On 4/15/22 21:14, Rafael J. Wysocki wrote:
> > Honestly, I would prefer this to be split so as to make it easier to
> > review if nothing else.
>
> I'll try to split it in v8.
>
> > On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko
> > wrot
On 4/15/22 21:14, Rafael J. Wysocki wrote:
> Honestly, I would prefer this to be split so as to make it easier to
> review if nothing else.
I'll try to split it in v8.
> On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko
> wrote:
>>
>> SoC platforms often have multiple ways of how to perform system
Honestly, I would prefer this to be split so as to make it easier to
review if nothing else.
On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko
wrote:
>
> SoC platforms often have multiple ways of how to perform system's
> power-off and restart operations. Meanwhile today's kernel is limited to
> a
SoC platforms often have multiple ways of how to perform system's
power-off and restart operations. Meanwhile today's kernel is limited to
a single option. Add combined power-off+restart handler call chain API,
which is inspired by the restart API. The new API provides both power-off
and restart fu