aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2016-02-18 16:08:10 +0000
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-02-18 16:47:26 +0000
commit30f014726a0614f0e331c67604729723306007e1 (patch)
tree6bec36dd08e901ebdeb75c45aee137c0c52690f2
parent7c15fadf92770b731153fdceb9f0f3e181787588 (diff)
Consolidate the headers into a single one.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--clocks.c1
-rw-r--r--clocks.h23
-rw-r--r--display.c1
-rw-r--r--gpio.h23
-rw-r--r--powerdebug.c11
-rw-r--r--powerdebug.h19
-rw-r--r--regulator.c3
-rw-r--r--regulator.h23
-rw-r--r--sensor.c1
-rw-r--r--sensor.h23
10 files changed, 19 insertions, 109 deletions
diff --git a/clocks.c b/clocks.c
index 4e34e0c..c751ec1 100644
--- a/clocks.c
+++ b/clocks.c
@@ -34,7 +34,6 @@
#include "powerdebug.h"
#include "display.h"
-#include "clocks.h"
#include "tree.h"
#include "utils.h"
diff --git a/clocks.h b/clocks.h
deleted file mode 100644
index b205a28..0000000
--- a/clocks.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Power debug tool (powerdebug)
- *
- * Copyright (C) 2016, Linaro Limited.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-extern int clock_init(void);
-extern int clock_dump(char *clk);
diff --git a/display.c b/display.c
index 8aafc32..ed010b3 100644
--- a/display.c
+++ b/display.c
@@ -28,7 +28,6 @@
#include <regex.h>
#include "powerdebug.h"
#include "mainloop.h"
-#include "regulator.h"
#include "display.h"
enum { PT_COLOR_DEFAULT = 1,
diff --git a/gpio.h b/gpio.h
deleted file mode 100644
index 9f51386..0000000
--- a/gpio.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Power debug tool (powerdebug)
- *
- * Copyright (C) 2016, Linaro Limited.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-extern int gpio_init(void);
-extern int gpio_dump(void);
diff --git a/powerdebug.c b/powerdebug.c
index d4ce1f6..0f5c98a 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -27,11 +27,7 @@
#include <errno.h>
#include <ncurses.h>
#include <signal.h>
-#include "regulator.h"
#include "display.h"
-#include "clocks.h"
-#include "sensor.h"
-#include "gpio.h"
#include "mainloop.h"
#include "powerdebug.h"
@@ -102,13 +98,6 @@ static struct option long_options[] = {
{ 0, 0, 0, 0 }
};
-struct powerdebug_options {
- int flags;
- unsigned int ticktime;
- int selectedwindow;
- char *clkname;
-};
-
int getoptions(int argc, char *argv[], struct powerdebug_options *options)
{
int c;
diff --git a/powerdebug.h b/powerdebug.h
index 3603018..33463a0 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -20,3 +20,22 @@
*/
#define VERSION "0.7.3"
+
+struct powerdebug_options {
+ int flags;
+ unsigned int ticktime;
+ int selectedwindow;
+ char *clkname;
+};
+
+extern int clock_init(void);
+extern int clock_dump(char *clk);
+
+extern int regulator_init(void);
+extern int regulator_dump(void);
+
+extern int gpio_init(void);
+extern int gpio_dump(void);
+
+extern int sensor_dump(void);
+extern int sensor_init(void);
diff --git a/regulator.c b/regulator.c
index dc29769..b38ddab 100644
--- a/regulator.c
+++ b/regulator.c
@@ -20,9 +20,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-#include "regulator.h"
-
#define SYSFS_REGULATOR "/sys/class/regulator"
#define VALUE_MAX 16
diff --git a/regulator.h b/regulator.h
deleted file mode 100644
index b4b4f78..0000000
--- a/regulator.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Power debug tool (powerdebug)
- *
- * Copyright (C) 2016, Linaro Limited.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-extern int regulator_init(void);
-extern int regulator_dump(void);
diff --git a/sensor.c b/sensor.c
index b4e6ba1..008b662 100644
--- a/sensor.c
+++ b/sensor.c
@@ -31,7 +31,6 @@
#include "powerdebug.h"
#include "display.h"
-#include "sensor.h"
#include "tree.h"
#include "utils.h"
diff --git a/sensor.h b/sensor.h
deleted file mode 100644
index d731fe0..0000000
--- a/sensor.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Power debug tool (powerdebug)
- *
- * Copyright (C) 2016, Linaro Limited.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-extern int sensor_dump(void);
-extern int sensor_init(void);