RE: [RFC PATCH 1/2] iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Sean Nyekjaer <sean@xxxxxxxxxx>
> Sent: Thursday, April 15, 2021 7:51 PM
> To: Sa, Nuno <Nuno.Sa@xxxxxxxxxx>; jic23@xxxxxxxxxx; linux-
> iio@xxxxxxxxxxxxxxx
> Subject: Re: [RFC PATCH 1/2] iio: accel: add support for
> FXLS8962AF/FXLS8964AF accelerometers
> 
> 
> 
> On 15/04/2021 17.10, Sa, Nuno wrote:
> >> +	pm_runtime_enable(dev);
> >> +	pm_runtime_set_autosuspend_delay(dev,
> >> FXLS8962AF_AUTO_SUSPEND_DELAY_MS);
> >> +	pm_runtime_use_autosuspend(dev);
> > Maybe add devm_add_action_or_reset() here and after enabling
> the
> > regulator and we can then ditch ' fxls8962af_core_remove ()'...
> Thanks for the review :)
> I'm think not able to ditch the fxls8962af_core_remove() I still have
> the pm_runtime stuff or can they be removed via some devm_
> functions?
> 

I do not see why you can't do this:

pm_runtime_disable(dev);
pm_runtime_set_suspended(dev);
pm_runtime_put_noidle(dev);

In a devm handler... Anyways this is more a personal preference
to use this handler rather than the 'remove()' hook. So, if you
prefer to keep this and Jonathan is fine with it, it's also fine by
me...

- Nuno Sá




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux