[PATCH v2] mtd: intel-dg: wake card on operations
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Tue Oct 21 07:50:19 PDT 2025
On Tue, Oct 21, 2025 at 03:32:46PM +0300, Alexander Usyskin wrote:
> The Intel DG cards do not have separate power control for
> persistent memory.
> The memory is available when the whole card is awake.
>
> Enable runtime PM in mtd driver to notify parent graphics driver
> that whole card should be kept awake while nvm operations are
> performed through this driver.
> CC: Lucas De Marchi <lucas.demarchi at intel.com>
It's possible to make less noise in the commit message by moving Cc:s to...
> Signed-off-by: Alexander Usyskin <alexander.usyskin at intel.com>
> ---
...here. It will have the same effect on email, but commit message will be
cleaner.
> V2: Address review comments (Andrey S)
I think you meant Andy or Andriy here :-)
...
> + devm_pm_runtime_enable(device);
I consider this as a wrong pattern of devm_*() usage. If one uses devm_*() they
should check for errors and act accordingly. (One way can be a printed warning,
but again, the devm_*() call inside can be implemented differently. It might
make device be enabled for a moment and fail due to upper layer issues, such as
memory allocation. In such case the error is different because it comes from
a different layer and you effectively ignore it without a reason. Hence either
check for errors, or drop devm_*() here.)
--
With Best Regards,
Andy Shevchenko
More information about the linux-mtd
mailing list