Re: [PATCH] iio: adc: meson_saradc: Better handle BL30 not releaseing the hardware

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

 



Hi Uwe,

On Thu, Feb 16, 2023 at 3:07 PM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
>
> meson_sar_adc_lock() might return an error if BL30 doesn't release its
> lock on the hardware. Just returning early from .remove() is wrong
> however as this keeps the clocks and regulators on which is never
> cleaned up later.
>
> So only skip hardware accesses with an error message if
> meson_sar_adc_lock() fails, but disable clocks and regulator and return
> zero to suppress another error message by the driver core.
The clocks and regulators are shared with the BL30 firmware.
In practice I have not seen meson_sar_adc_lock() fail yet.

I think it's enough to print an error message if locking fails, then
continue as if nothing happened. Unlocking obviously has to be skipped
as well in this case.
There's not much we can do to recover from this and I consider the
BL30 firmware to be hanging (or broken) if it doesn't release the
lock.


Best regards,
Martin




[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