smb1355: Use comparator for die temperature
The current code relies on presence of an external thermistor
for reading 1355 die temperature.
Instead stepwise increment the threshold. The threshold
where the status changes indicates the die temp.
Note that we will need to enable die temp comparator source for
us to read the status bits. This will cause us to trigger two
interrupts every time the sweeping procedure is run.
This makes reading the temp_chan from adc unnecessary. Remove that
code.
Note that the stepwise increment of the threshold is run in a work
every 10 seconds and the latest is returned in charger_temp property.
It is run only when the parallel charging is enabled. Until any
results are available a value of -EINVAL is returned.
Change-Id: I22cda1f91b7dfa37970d4a6092f0c8696abd72b5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment