blob: e7489a2c1d77d5f556b48aa0e90a83ee7c09ba36 [file] [log] [blame]
// Copyright 2015 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THERMALD_ATH10K_INTERFACE_H_
#define THERMALD_ATH10K_INTERFACE_H_
#include <memory>
#include <string>
#include "base/macros.h"
#include "thermald/cooling_device.h"
#include "thermald/network_interface.h"
namespace thermald {
// Class to interact with an ath10k wireless interface.
class Ath10kInterface : public NetworkInterface {
public:
explicit Ath10kInterface(const std::string &name);
// Set the maximum TX duty cycle of the interface.
bool SetMaxTxDutyCycle(unsigned int value);
// Returns true if the interface has support for reading its temperature
// and thermal throttling.
bool HasThermalSupport() const;
// Returns true if the interface with the given name is an ath10k wireless
// interface, false otherwise.
static bool IsAth10kInterface(const std::string &name);
// Returns true if the interface with the given name is an ath10k wireless
// interface with thermal support.
static bool HasThermalSupport(const std::string &name);
private:
void DetermineCoolingDevice();
std::unique_ptr<CoolingDevice> cooling_device_;
unsigned int tx_duty_cycle_;
DISALLOW_COPY_AND_ASSIGN(Ath10kInterface);
};
} // namespace thermald
#endif // THERMALD_ATH10K_INTERFACE_H_