3 * Copyright (C) 2014 ROCKCHIP, Inc.
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 #include <linux/device.h>
19 #define IO_DOMAIN_DBG(fmt, args...) printk( "IO_DOMAIN_DBG:\t"fmt, ##args)
21 #define IO_DOMAIN_DBG(fmt, args...) {while(0);}
24 #define io_domain_regulator_get(dev,id) regulator_get((dev),(id))
25 #define io_domain_regulator_put(regu) regulator_put((regu))
26 #define io_domain_regulator_get_voltage(regu) regulator_get_voltage((regu))
28 int io_domain_regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV);
30 #define IO_VOL_DOMAIN_3V3 2800000
31 #define IO_VOL_DOMAIN_1V8 1500000
35 const char *regulator_name;
36 struct regulator *regulator;
37 struct list_head node;
39 struct io_domain_port {
41 struct pinctrl_state *pins_default;
42 struct pinctrl_state *pins_1v8;
43 struct pinctrl_state *pins_3v3;
46 struct io_domain_device{
48 struct device_node *of_node;