Files
OpenCellular/driver
Ben Lok a572c882e4 driver/temp_sensor: Add power control API for TMP432
Some boards didn't define the CONFIG_TEMP_SENSOR_POWER_GPIO (such as: Oak),
Due to the hardware design, the power of temp sensor is always on.
But, we can enable/disable the temperature measurement circuitry of tmp432 by
setup the shutdown (SD) bit. Add a new API: tmp432_set_power() to let upper
layer to control the power of tmp432 by SW approach for power saving.

BRANCH=none
BUG=chrome-os-partner:44170
TEST=manual
1. make BOARD=oak -j
2. Turn off the TMP432:
   > tmp432 power off
3. check whether tmp432 is shutdown:
   > tmp432
   ERROR: Temp sensor not powered.
   Not Powered
4. Turn on the TMP432:
   > tmp432 power on
5. check whether tmp432 is running:
   > tmp432
   Local:
     Temp        29C
     Therm Trip  85C
     High Alarm  85C
     Low Alarm    0C
   Remote1:
     Temp        27C
     Therm Trip  85C
     High Alarm  85C
     Low Alarm    0C
   Remote2:
     Temp        27C
     Therm Trip  85C
     High Alarm  85C
     Low Alarm    0C

   STATUS:  10000000
   CONFIG1: 00000000
   CONFIG2: 00111100

Change-Id: Iab95c4c0b0130baf3bce380a8132e08ded8d159e
Signed-off-by: Ben Lok <ben.lok@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/295058
Reviewed-by: Rong Chang <rongchang@chromium.org>
2015-09-03 04:24:33 -07:00
..
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00
2015-06-18 19:07:00 +00:00