[lm-sensors] [PATCH v5 1/2] Use "request_muxed_region" in it87 watchdog drivers
alan at lxorguk.ukuu.org.uk
Thu Apr 14 22:41:16 CEST 2011
> request_muxed_region() is sorta gross: it's essentially acting like a
> lock, meant to be used for short periods of time, but it can fail if
> someone else decides it should.
Which is exactly how the hardware situation works. If some other driver
comes along and is rude then the only safe thing to do is to moan a bit.
> Would it make more sense to have drivers that need to use the current
> request_muxed_region() be able to force a region into a mux-only state
> at driver init? That would lead to much less contorted code to handle
> the off-chance that the request_muxed_region() fails.
> I realize the above example re-uses the 'request_muxed_region()' name,
> but at least this would be much more consistent with how
> request_region is used in other drivers.
I guess you'd need some kind of
r = add_muxed_resource()
that inserted/removed them from the resource tree ?
I think the basic resource tree code could be extended this way IFF
someone does the work, if not the current code actually should work just
More information about the lm-sensors