blob: d1f2073e4d5fe27431cd5bf042ce9618fc52a4db [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
James Ban707ce9e2017-10-30 11:32:38 +09003 * /DA9213/DA9223/DA9214/DA9224/DA9215/DA9225
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
Linus Walleij11da04af2018-02-12 14:17:02 +010024struct gpio_desc;
25
James Ban005547e2014-08-08 14:27:04 +090026enum da9211_chip_id {
27 DA9211,
James Ban7524c1c2016-06-29 16:49:32 +090028 DA9212,
James Ban005547e2014-08-08 14:27:04 +090029 DA9213,
James Ban707ce9e2017-10-30 11:32:38 +090030 DA9223,
James Ban7524c1c2016-06-29 16:49:32 +090031 DA9214,
James Ban707ce9e2017-10-30 11:32:38 +090032 DA9224,
James Ban7bd39352015-06-30 13:39:39 +090033 DA9215,
James Ban707ce9e2017-10-30 11:32:38 +090034 DA9225,
James Ban005547e2014-08-08 14:27:04 +090035};
36
James Ban1028a372014-07-14 13:48:45 +090037struct da9211_pdata {
38 /*
39 * Number of buck
40 * 1 : 4 phase 1 buck
41 * 2 : 2 phase 2 buck
42 */
43 int num_buck;
Linus Walleij11da04af2018-02-12 14:17:02 +010044 struct gpio_desc *gpiod_ren[DA9211_MAX_REGULATORS];
James Ban076c3b82015-01-16 12:13:27 +090045 struct device_node *reg_node[DA9211_MAX_REGULATORS];
James Banbf3baca2014-08-27 11:47:07 +090046 struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
James Ban1028a372014-07-14 13:48:45 +090047};
48#endif