mfd: cs5535-mfd: Request shared IO regions centrally
authorLee Jones <lee.jones@linaro.org>
Mon, 21 Oct 2019 07:49:49 +0000 (08:49 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 11 Nov 2019 08:45:03 +0000 (08:45 +0000)
commit2d4ba9173aecc7e69ae6b842564437b9209c7a71
treeeee6d76577f2dfe89c0bab42abca3820a4b1cf48
parent2129e56e95f877c71989e7d0391de47f3907a261
mfd: cs5535-mfd: Request shared IO regions centrally

Prior to this patch, IO regions were requested via an MFD subsytem-level
.enable() call-back and similarly released by a .disable() call-back.
Double requests/releases were avoided by a centrally handled usage count
mechanism.

This complexity can all be avoided by handling IO regions only once during
.probe() and .remove() of the parent device.  Since this is the only
legitimate user of the aforementioned usage count mechanism, this patch
will allow it to be removed from MFD core in subsequent steps.

Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
drivers/mfd/cs5535-mfd.c