Merge tag 'v3.10.46' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / tools / gator / daemon / Hwmon.h
1 /**
2  * Copyright (C) ARM Limited 2013-2014. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 #ifndef HWMON_H
10 #define HWMON_H
11
12 #include "Driver.h"
13
14 class Buffer;
15 class HwmonCounter;
16
17 class Hwmon : public Driver {
18 public:
19         Hwmon();
20         ~Hwmon();
21
22         void setup();
23
24         bool claimCounter(const Counter &counter) const;
25         bool countersEnabled() const;
26         void resetCounters();
27         void setupCounter(Counter &counter);
28
29         int writeCounters(mxml_node_t *root) const;
30         void writeEvents(mxml_node_t *root) const;
31
32         void start();
33         void read(Buffer * buffer);
34
35 private:
36         HwmonCounter *findCounter(const Counter &counter) const;
37
38         HwmonCounter *counters;
39
40         // Intentionally unimplemented
41         Hwmon(const Hwmon &);
42         Hwmon &operator=(const Hwmon &);
43 };
44
45 #endif // HWMON_H