/* * Pinctrl driver for Rockchip SoCs * * Copyright (c) 2013 MundoReader S.L. * Author: Heiko Stuebner <heiko@sntech.de> * * With some ideas taken from pinctrl-samsung: * Copyright (c) 2012 Samsung Electronics Co., Ltd. * http://www.samsung.com * Copyright (c) 2012 Linaro Ltd * http://www.linaro.org * * and pinctrl-at91: * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */#include<linux/module.h>#include<linux/platform_device.h>#include<linux/io.h>#include<linux/bitops.h>#include<linux/gpio.h>#include<linux/of_address.h>#include<linux/of_irq.h>#include<linux/pinctrl/machine.h>#include<linux/pinctrl/pinconf.h>#include<linux/pinctrl/pinctrl.h>#include<linux/pinctrl/pinmux.h>#include<linux/pinctrl/pinconf-generic.h>#include<linux/irqchip/chained_irq.h>#include<linux/clk.h>#include<dt-bindings/pinctrl/rockchip.h>#include"core.h"#include"pinconf.h"/* GPIO control registers */#define GPIO_SWPORT_DR 0x00#define GPIO_SWPORT_DDR 0x04#define GPIO_INTEN 0x30#define GPIO_INTMASK 0x34#def