Amit Arora | 1755278 | 2010-12-02 12:23:14 +0530 | [diff] [blame] | 1 | /******************************************************************************* |
Amit Kucheria | c0e17fc | 2011-01-17 09:35:52 +0200 | [diff] [blame] | 2 | * Copyright (C) 2010, Linaro Limited. |
Amit Arora | 1755278 | 2010-12-02 12:23:14 +0530 | [diff] [blame] | 3 | * |
| 4 | * This file is part of PowerDebug. |
| 5 | * |
| 6 | * All rights reserved. This program and the accompanying materials |
| 7 | * are made available under the terms of the Eclipse Public License v1.0 |
| 8 | * which accompanies this distribution, and is available at |
| 9 | * http://www.eclipse.org/legal/epl-v10.html |
| 10 | * |
| 11 | * Contributors: |
| 12 | * Amit Arora <amit.arora@linaro.org> (IBM Corporation) |
| 13 | * - initial API and implementation |
| 14 | *******************************************************************************/ |
| 15 | |
| 16 | #include <stdio.h> |
| 17 | #include <stdlib.h> |
| 18 | #include <unistd.h> |
| 19 | #include <string.h> |
| 20 | #include <dirent.h> |
| 21 | #include <getopt.h> |
| 22 | |
| 23 | #define VALUE_MAX 16 |
| 24 | |
Amit Arora | e7bbf78 | 2010-12-05 18:58:59 +0530 | [diff] [blame] | 25 | int numregulators; |
| 26 | |
Amit Arora | 1755278 | 2010-12-02 12:23:14 +0530 | [diff] [blame] | 27 | struct regulator_info { |
| 28 | char name[NAME_MAX]; |
| 29 | char state[VALUE_MAX]; |
| 30 | char status[VALUE_MAX]; |
| 31 | char type[VALUE_MAX]; |
| 32 | char opmode[VALUE_MAX]; |
| 33 | int microvolts; |
| 34 | int min_microvolts; |
| 35 | int max_microvolts; |
| 36 | int microamps; |
| 37 | int min_microamps; |
| 38 | int max_microamps; |
| 39 | int requested_microamps; |
| 40 | int num_users; |
| 41 | } *regulators_info; |
| 42 | |
| 43 | extern int numregulators; |
| 44 | extern int dump; |