power: smb135x-charger: fixed charging enabled indication
The current driver checks if charging is enabled by reading a status bit.
Note that when CHARGING_ENABLED property is set to being disabled the
driver puts DC and USB path in suspend state (CHARGING_ENABLED property
being set to disabled actually means do not draw any current from any
chargers). It does not disable charging. Hence reading the status bit to
report whether charging is enabled/disabled is incorrect. Instead return
the chg_enabled variable tracked in the chip structure that tracks
the CHARGING_ENABLED property.
Change-Id: Iee1761b8230414c41947c5964e50393cc223a6ce
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment