Shared Resets

From: Lee Jones
Date: Thu Jun 02 2016 - 06:12:34 EST


Philipp, Hans,

After rebasing to the most recent upstream kernel tag (v4.6-rc1), I
witnessed some issues where a couple of USB PHY drivers where having
trouble requesting their reset lines. After some poking around, I
stumbled across Hans' shared reset patch. It looks reasonable at
first, but when I came to make the necessary driver changes, I
realised that your effectively insisting that drivers have platform
specific knowledge.

The way I see it, drivers should request, deassert and assert their
reset lines. Just as clock users, request, enable and disable their
clocks. Whether the reset lines (or clocks) are left on after an
assert (disable) because there are other users, should be of no
concern to the consumer, right?

I would like to see (and am happy to author) a different approach,
where knowledge of whether a reset line is shared or not is contained
in the framework, as it is in the clock case.

What are your thoughts?

Kind regards,
Lee

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog