lkml.org 
[lkml]   [2021]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 00/79] Address some issues with PM runtime at media subsystem
    From
    Date
    29.04.2021 13:18, Mauro Carvalho Chehab пишет:
    >> This is perfectly alright. Take a look at ov7740_remove() for example:
    >>
    >> pm_runtime_get_sync(&client->dev);
    >> pm_runtime_disable(&client->dev);
    >> pm_runtime_set_suspended(&client->dev);
    >> pm_runtime_put_noidle(&client->dev);
    >>
    >> ov7740_set_power(ov7740, 0);
    >>
    >> There's an explicit power-off after balancing the PM count and this will
    >> work regardless of the power state when entering this function.
    > Ok, but this should equally work:
    >
    > pm_runtime_disable(&client->dev);
    > pm_runtime_set_suspended(&client->dev);
    >
    > ov7740_set_power(ov7740, 0);
    >
    > as there's no additional cleanup made on this particular driver
    > between pm_runtime_get_sync() and pm_runtime_put_noidle().
    >

    The pm_runtime_get_sync() turns hardware ON by invoking
    ov7740_set_power(ov7740, 1), and thus, the ON->OFF is kept balanced in
    both RPM-available and RPM-unavailable cases. The RPM state of device
    should be reset after driver removal.

    It doesn't look like any additional cleanups are needed by that ov7740
    driver. The driver removal is opposite to the probe, hence it should be
    correct as-is.

    \
     
     \ /
      Last update: 2021-04-29 14:34    [W:4.386 / U:0.336 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site