This reverts commit 28652f3b71d2eeb780d61085907c8a04d5ced116.
Change log from v1:
- add is_binary_power_count to toggle the power_count under phy mutex
- no funcitonal changes on other components
= v1 description:
This can contribute a race condition between is_phy_pwr_on and phy_power_on/off.
Instead of it, we must rely on mutex with power_count in phy_power_on/off more
precisely. And, in order to fix the origina issue caused by multiple power on/
off, we must use power_count as a flag.
So, the final approach is same as moving "is_phy_pwr_on" under mutex.
Bug: 139262967
Change-Id: Ia2ca0a1187b97e0f5b9e46d8e8465ac0b28d2862
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>