mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
Add a full binderized implementation for Power hal Many subsystems (e.g.wifi) could be living on an independent power island (sourced from VBatt directly) and might even have their own dedicated XTAL to source their clocks. Since these SOCs are capable of autonomously operating (while the platform is in one of the sleep states), they are still drawing power from the VBatt. Hence it is critical to understand the (SOC) level low power statistics as well when the battery level changes and be able to find any correlation in event of unexpected battery drain. This commit adds the support of the Power Hal 1.1 to wahoo based devices(that includes Muskie/walleye). This includes the new api for wlan specific power stats Bug: 29339696 Test: Manual Change-Id: Iee4e38f2d9ced31f8b6a333b535fa1d9a302ec26 Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#ifndef ANDROID_HARDWARE_POWER_V1_1_POWER_H
|
|
#define ANDROID_HARDWARE_POWER_V1_1_POWER_H
|
|
|
|
#include <android/hardware/power/1.1/IPower.h>
|
|
#include <hidl/MQDescriptor.h>
|
|
#include <hidl/Status.h>
|
|
#include <hardware/power.h>
|
|
|
|
namespace android {
|
|
namespace hardware {
|
|
namespace power {
|
|
namespace V1_1 {
|
|
namespace implementation {
|
|
|
|
using ::android::hardware::power::V1_0::Feature;
|
|
using ::android::hardware::power::V1_0::PowerHint;
|
|
using ::android::hardware::power::V1_1::IPower;
|
|
using ::android::hardware::Return;
|
|
using ::android::hardware::Void;
|
|
|
|
struct Power : public IPower {
|
|
// Methods from ::android::hardware::power::V1_0::IPower follow.
|
|
|
|
Power();
|
|
|
|
Return<void> setInteractive(bool interactive) override;
|
|
Return<void> powerHint(PowerHint hint, int32_t data) override;
|
|
Return<void> setFeature(Feature feature, bool activate) override;
|
|
Return<void> getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) override;
|
|
|
|
// Methods from ::android::hardware::power::V1_1::IPower follow.
|
|
Return<void> getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) override;
|
|
|
|
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
|
|
|
};
|
|
|
|
} // namespace implementation
|
|
} // namespace V1_1
|
|
} // namespace power
|
|
} // namespace hardware
|
|
} // namespace android
|
|
|
|
#endif // ANDROID_HARDWARE_POWER_V1_1_POWER_H
|