da9211.h 1.2 KB
Newer Older
1
/*
2
 * da9211.h - Regulator device driver for DA9211/DA9212
3
 * /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
J
James Ban 已提交
4
 * Copyright (C) 2015  Dialog Semiconductor Ltd.
5
 *
J
James Ban 已提交
6 7 8 9
 * 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.
10
 *
J
James Ban 已提交
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
J
James Ban 已提交
13 14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
15 16 17 18 19 20 21 22 23
 */

#ifndef __LINUX_REGULATOR_DA9211_H
#define __LINUX_REGULATOR_DA9211_H

#include <linux/regulator/machine.h>

#define DA9211_MAX_REGULATORS	2

24 25
struct gpio_desc;

J
James Ban 已提交
26 27
enum da9211_chip_id {
	DA9211,
28
	DA9212,
J
James Ban 已提交
29
	DA9213,
30
	DA9223,
31
	DA9214,
32
	DA9224,
J
James Ban 已提交
33
	DA9215,
34
	DA9225,
J
James Ban 已提交
35 36
};

37 38 39 40 41 42 43
struct da9211_pdata {
	/*
	 * Number of buck
	 * 1 : 4 phase 1 buck
	 * 2 : 2 phase 2 buck
	 */
	int num_buck;
44
	struct gpio_desc *gpiod_ren[DA9211_MAX_REGULATORS];
45
	struct device_node *reg_node[DA9211_MAX_REGULATORS];
46
	struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
47 48
};
#endif