Add support for VoltageMargin setting
Tested: Can set/get the voltage_margin setting
Change-Id: I8d1042a90ad75a312a30daae43e231edea195281
Signed-off-by: Gaurav Gandhi <gauravgandhi@google.com>
diff --git a/README.md b/README.md
index e43454a..7d58e73 100644
--- a/README.md
+++ b/README.md
@@ -461,7 +461,8 @@
Get the accel's VR setting value for the given chip and settings ID
-Currently 3 settings are supported. [0] IdleMode [1] PowerBrake [2] Loadline
+Currently 4 settings are supported. [0] IdleMode [1] PowerBrake [2] Loadline [3]
+VoutMargin
On success, the response contains 2 bytes containing the setting value.
diff --git a/handler_impl.hpp b/handler_impl.hpp
index d671cc2..3d027f9 100644
--- a/handler_impl.hpp
+++ b/handler_impl.hpp
@@ -108,7 +108,10 @@
{0x20, "memory_device"}};
const std::unordered_map<uint8_t, std::string> _vrSettingsMap{
- {0, "idle_mode_"}, {1, "power_brake_"}, {2, "loadline_"}};
+ {0, "idle_mode_"},
+ {1, "power_brake_"},
+ {2, "loadline_"},
+ {3, "vout_margin_"}};
const std::unordered_map<uint8_t, std::string> bmInstanceTypeStringMap = {
{0x00, "asset-tag"}, {0x01, "board-serial-number"},