Docs: Adding details for chipset power data from BT/WiFi
Removing <p> tags from table
Bug: 26641290
Change-Id: I602f27452c619904031c88e78115ad69a129f055
diff --git a/src/devices/tech/power/batterystats.jd b/src/devices/tech/power/batterystats.jd
index d42bc33..cd9dd99 100644
--- a/src/devices/tech/power/batterystats.jd
+++ b/src/devices/tech/power/batterystats.jd
@@ -554,10 +554,10 @@
</table>
-<h2 id="wifi-reqs">Wi-Fi, Bluetooth, and cellular usage</h2>
+<h2 id="wifi-reqs">Bluetooth, cellular, and Wi-Fi usage</h2>
-<p>Support for battery usage data on Wi-Fi, Bluetooth, and cellular data
-requires that the device Wi-Fi, Bluetooth, and cellular chipsets implement radio
+<p>Support for battery usage data on Bluetooth, cellular, and Wi-Fi data
+requires the device Bluetooth, cellular, and Wif-Fi chipsets implement radio
support and the chipset firmware passes usage data to the framework. OEMs must
work with their chipset providers to facilitate in-field firmware updates on
existing chipsets and compatible firmware on new chipsets.</p>
@@ -565,7 +565,9 @@
<p>Additionally, OEMs must continue to configure and submit the power profile
for their devices. However, when the platform detects that Wi-Fi and Bluetooth
radio power data is available from the chipset, it uses chipset data instead of
-power profile data (cell radio power data is not yet used).</p>
+power profile data (cell radio power data is not yet used). For details, see
+<a href="{@docRoot}devices/tech/power/values.html#chipset-data">Devices with
+Bluetooth and Wi-Fi controllers</a>.</p>
<p class="note"><strong>Note</strong>: Prior to Android 6.0, power use for Wi-Fi
radio, Bluetooth radio, and cellular radio was tracked in the <em>m</em> (Misc)
diff --git a/src/devices/tech/power/values.jd b/src/devices/tech/power/values.jd
index e75d50a..61600fe 100644
--- a/src/devices/tech/power/values.jd
+++ b/src/devices/tech/power/values.jd
@@ -39,6 +39,11 @@
computes the mAh value, which is then used to estimate the amount of battery
drained by the application/subsystem.</p>
+<p>Devices with <a href="#chipset-data">Bluetooth and Wi-Fi controllers</a>
+running Android 6.0 and higher can provide additional power values obtained from
+chipset data.</p>
+
+
<h2 id="multiple-cpus">Devices with heterogeneous CPUs</h2>
<p>The power profile for devices with CPU cores of heterogeneous architecture
@@ -267,4 +272,78 @@
<td>3000mAh</td>
<td></td>
</tr>
-</table>
\ No newline at end of file
+</table>
+
+<h2 id="chipset-data">Devices with Bluetooth and Wi-Fi controllers</h2>
+<p>Devices with Bluetooth and Wi-Fi controllers running Android 6.0 and
+higher can be polled for the following energy use data:</p>
+<ul>
+<li>Time spent transmitting (in milliseconds).</li>
+<li>Time spent receiving (in milliseconds).</li>
+<li>Time spent idle (in milliseconds).</li>
+</ul>
+
+<p>Time values are not measured but are instead available from respective chip
+specifications and must be explicitly stated (for details, see
+<a href="{@docRoot}devices/tech/power/batterystats.html#wifi-reqs">Wi-Fi,
+Bluetooth, and cellular usage</a>). To convert time values to power values, the
+framework expects four (4) values for each controller in a resource overlay at
+<code>/frameworks/base/core/res/res/values/config.xml</code>.</p>
+
+ <table id="chipset-energy-data">
+
+ <tr>
+ <th width="10%">Controller</th>
+ <th width="40%">Values/Resource Names</th>
+ <th width="40%">Description</th>
+ </tr>
+
+ <tr>
+ <td>Bluetooth<</td>
+ <td>android:integer/config_bluetooth_idle_cur_ma</td>
+ <td>Average current draw (mA) of the Bluetooth controller when idle.</td>
+ </tr>
+
+ <tr>
+ <td>Bluetooth</td>
+ <td>android:integer/config_bluetooth_active_rx_cur_ma</td>
+ <td>Average current draw (mA) of the Bluetooth controller when receiving.</td>
+ </tr>
+
+ <tr>
+ <td>Bluetooth</td>
+ <td>android:integer/config_bluetooth_tx_cur_ma</td>
+ <td>Average current draw (mA) of the Bluetooth controller when transmitting.</td>
+ </tr>
+
+ <tr>
+ <td>Bluetooth</td>
+ <td>android:integer/config_bluetooth_operating_voltage_mv</td>
+ <td>Average operating voltage (mV) of the Bluetooth controller.</td>
+ </tr>
+
+ <tr>
+ <td>Wi-Fi</td>
+ <td>android:integer/config_wifi_idle_receive_cur_ma</td>
+ <td>Average current draw (mA) of the Wi-Fi controller when idle.</td>
+ </tr>
+
+ <tr>
+ <td>Wi-Fi</td>
+ <td>android:integer/config_wifi_active_rx_cur_ma</td>
+ <td>Average current draw (mA) of the Wi-Fi controller when receiving.</td>
+ </tr>
+
+ <tr>
+ <td>Wi-Fi</td>
+ <td>android:integer/config_wifi_tx_cur_ma</td>
+ <td>average current draw (mA) of the Wi-Fi controller when transmitting.</td>
+ </tr>
+
+ <tr>
+ <td>Wi-Fi</td>
+ <td>android:integer/config_wifi_operating_voltage_mv</td>
+ <td>Average operating voltage (mV) of the Wi-Fi controller.</td>
+ </tr>
+
+ </table>
\ No newline at end of file