Re: [linux-sunxi] Re: [PATCH 2/2] ehci-platform: Add support for controllers with multiple reset lines

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

 



Hi Hans,

Am Montag, den 16.11.2015, 18:13 +0100 schrieb Hans de Goede:
> On 16-11-15 18:01, Philipp Zabel wrote:
> > If there are two devices sharing the same reset line that is initially
> > held asserted, do the two drivers somehow have to synchronize before
> > releasing the reset together?
> 
> Not to my knowledge, I suggest that we simply treat this same as
> regulators / clocks where the first one to enable it actually gets
> it enabled (de-asserted in case of a reset), and the last one
> to disable (assert) it (so dropping the usage counter back to 0) leads
> to it being asserted again.
> 
> This seems to work well enough for clocks / regulators and phys, and
> at least for my use-case it should work fine for the shared reset too
> (I will test to make sure of course).
> 
> So from my pov a simple counter should suffice, does that work for you ?

I don't quite understand what counting will help with, then. The first
driver to call reset_control_deassert will deassert the reset, whether
you count or not.
But if the two drivers have deasserted an initially asserted reset, a
reset_control_assert for one of them will silently fail.

I fear the deassertion count maps well to the case where resets are used
just like clocks (when inactive modules are kept in reset), but I'm not
sure this is useful in the case of resets that are kept deasserted most
of the time, only to be asserted for a short pulse. Maybe we have to
differentiate between the two cases?

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux