]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
extres/regulator: Properly refcount gpio regulators
authorkevans <kevans@FreeBSD.org>
Thu, 14 Jun 2018 20:37:25 +0000 (20:37 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 14 Jun 2018 20:37:25 +0000 (20:37 +0000)
commit07d758272327677aa34045e6fe817ff572a8bc78
treeaf774323e1d6021a8677e6554ddabe488bb04d05
parent92db07d40514b110dec29665548da5ecfbc3e28f
extres/regulator: Properly refcount gpio regulators

regnode::enable_cnt is generally used to refcount regulator nodes. For
GPIOs, the refcount was done on the gpio_entry since more than one regulator
can share a GPIO.

GPIO regulators were not taking part in the node refcount, since they had
their own mechanism. This caused some fallout after manu started disabling
everybody's unused regulators in r331989.

Refcount it.

Glanced over by: manu
sys/dev/extres/regulator/regulator.c
sys/dev/extres/regulator/regulator.h
sys/dev/extres/regulator/regulator_fixed.c