blob: 1633cfd4988bc1dd87c7abd77fea17233206f932 [file] [log] [blame]
Amit Arora17552782010-12-02 12:23:14 +05301/*******************************************************************************
Amit Kucheriac0e17fc2011-01-17 09:35:52 +02002 * Copyright (C) 2010, Linaro Limited.
Amit Arora17552782010-12-02 12:23:14 +05303 *
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
25struct regulator_info {
26 char name[NAME_MAX];
27 char state[VALUE_MAX];
28 char status[VALUE_MAX];
29 char type[VALUE_MAX];
30 char opmode[VALUE_MAX];
31 int microvolts;
32 int min_microvolts;
33 int max_microvolts;
34 int microamps;
35 int min_microamps;
36 int max_microamps;
37 int requested_microamps;
38 int num_users;
Daniel Lezcano691d5562011-03-26 22:05:57 +010039};
Amit Arora17552782010-12-02 12:23:14 +053040
Daniel Lezcano4aab2fe2011-03-26 22:05:53 +010041extern struct regulator_info *regulator_init(int *nr_regulators);
Daniel Lezcano408580e2011-03-26 22:05:59 +010042extern int regulator_read_info(struct regulator_info *reg_info, int nr_reg);
Daniel Lezcanofac6aea2011-03-26 22:05:58 +010043extern void regulator_print_info(struct regulator_info *reg_info,
44 int nr_reg, int verbose);