blob: 80cb40b7c88d44e966f07db9aa67f1b98c9fe43f [file] [log] [blame]
James Ban1028a372014-07-14 13:48:45 +09001/*
James Ban7524c1c2016-06-29 16:49:32 +09002 * da9211.h - Regulator device driver for DA9211/DA9212
3 * /DA9213/DA9214/DA9215
James Ban7bd39352015-06-30 13:39:39 +09004 * Copyright (C) 2015 Dialog Semiconductor Ltd.
James Ban1028a372014-07-14 13:48:45 +09005 *
James Ban7bd39352015-06-30 13:39:39 +09006 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
James Ban1028a372014-07-14 13:48:45 +090010 *
James Ban7bd39352015-06-30 13:39:39 +090011 * This program is distributed in the hope that it will be useful,
James Ban1028a372014-07-14 13:48:45 +090012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
James Ban7bd39352015-06-30 13:39:39 +090013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
James Ban1028a372014-07-14 13:48:45 +090015 */
16
17#ifndef __LINUX_REGULATOR_DA9211_H
18#define __LINUX_REGULATOR_DA9211_H
19
20#include <linux/regulator/machine.h>
21
22#define DA9211_MAX_REGULATORS 2
23
James Ban005547e2014-08-08 14:27:04 +090024enum da9211_chip_id {
25 DA9211,
James Ban7524c1c2016-06-29 16:49:32 +090026 DA9212,
James Ban005547e2014-08-08 14:27:04 +090027 DA9213,
James Ban7524c1c2016-06-29 16:49:32 +090028 DA9214,
James Ban7bd39352015-06-30 13:39:39 +090029 DA9215,
James Ban005547e2014-08-08 14:27:04 +090030};
31
James Ban1028a372014-07-14 13:48:45 +090032struct da9211_pdata {
33 /*
34 * Number of buck
35 * 1 : 4 phase 1 buck
36 * 2 : 2 phase 2 buck
37 */
38 int num_buck;
James Ban8c7dd8b2015-01-28 09:28:08 +090039 int gpio_ren[DA9211_MAX_REGULATORS];
James Ban076c3b82015-01-16 12:13:27 +090040 struct device_node *reg_node[DA9211_MAX_REGULATORS];
James Banbf3baca2014-08-27 11:47:07 +090041 struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
James Ban1028a372014-07-14 13:48:45 +090042};
43#endif