regression: ASUS C201 doesnt power off since "mfd: rk808: Convert to device managed resources"
Sebastian Reichel
sebastian.reichel at collabora.com
Sun Jul 21 13:56:29 PDT 2024
Hi,
On Sat, Jul 20, 2024 at 10:14:13PM GMT, Urja wrote:
> Since 4fec8a5a85c ("mfd: rk808: Convert to device managed
> resources") my ASUS C201 no longer powers off. It acts like it's
> going to (turning the display off), but leaves the power led on
> and I need to long press the power button.
>
> I read the patch but I don't even know what "device managed
> resources" means, so I'm not sure how to fix it. (And with
> everything that happened after that commit (like rk806 support..),
> carrying a simple revert doesnt seem like an option - didn't try
> tho.)
>
> Sorry about this being such a late report, it took me a long time
> to have the time to bisect an issue that's only a minor annoyance
> in my life (how often do I need to poweroff the laptop that I
> usually run 24/7? right).
Device managed resources are resources (e.g. GPIOs, interrupts,
memory allocations), which are bound to the 'struct device' and
will automatically be released together with the device without
any manual handling in the device driver. Functions doing this
are usually prefixed with 'devm_'
I don't see anything wrong with the patch (except that I should
have done the pm_power_off to devm_register_sys_off_handler()
conversion in an extra patch. Shutdown / Poweroff is working
on rk806 based systems and the code modified by this patch is
not chip specific, so something must be special about the way
the ASUS C201 works.
As a first step to understand what is going on can you check if
rk808_power_off() is being called at all during shutdown (i.e.
using ftrace or add a simple log print at the start of the
function)?
Greetings,
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240721/b6dfabea/attachment.sig>
More information about the linux-arm-kernel
mailing list