From: Stephen Rothwell Date: Wed, 20 Feb 2013 04:47:49 +0000 (+1100) Subject: Merge remote-tracking branch 'pinctrl/for-next' X-Git-Tag: next-20130220~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=65c76ddacf45303a3c641ba41047f223a49225eb;p=karo-tx-linux.git Merge remote-tracking branch 'pinctrl/for-next' Conflicts: drivers/gpio/Kconfig drivers/pinctrl/pinctrl-nomadik.c include/linux/mfd/abx500/ab8500.h --- 65c76ddacf45303a3c641ba41047f223a49225eb diff --cc Documentation/devicetree/bindings/vendor-prefixes.txt index 4519dff3f506,15321373ec8d..19e1ef73ab0d --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@@ -52,9 -50,9 +52,10 @@@ simte sirf SiRF Technology, Inc. snps Synopsys, Inc. st STMicroelectronics + ste ST-Ericsson stericsson ST-Ericsson ti Texas Instruments +toshiba Toshiba Corporation via VIA Technologies, Inc. wlf Wolfson Microelectronics wm Wondermedia Technologies, Inc. diff --cc drivers/gpio/Kconfig index 054f7b4f323f,e5116fa85140..74e17f19cc33 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@@ -657,19 -657,6 +657,13 @@@ config GPIO_JANZ_TT This driver provides support for driving the pins in output mode only. Input mode is not supported. - config GPIO_AB8500 - bool "ST-Ericsson AB8500 Mixed Signal Circuit gpio functions" - depends on AB8500_CORE && BROKEN - help - Select this to enable the AB8500 IC GPIO driver - +config GPIO_PALMAS + bool "TI PALMAS series PMICs GPIO" + depends on MFD_PALMAS + help + Select this option to enable GPIO driver for the TI PALMAS + series chip family. + config GPIO_TPS6586X bool "TPS6586X GPIO" depends on MFD_TPS6586X diff --cc drivers/pinctrl/pinctrl-nomadik.c index 887ef566f3d0,b885c0911e83..3c80dd98304b --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@@ -1350,34 -1351,24 +1351,24 @@@ static int nmk_gpio_probe(struct platfo } res = platform_get_resource(dev, IORESOURCE_MEM, 0); - if (!res) { - ret = -ENOENT; - goto out; - } + if (!res) + return -ENOENT; irq = platform_get_irq(dev, 0); - if (irq < 0) { - ret = irq; - goto out; - } + if (irq < 0) + return irq; secondary_irq = platform_get_irq(dev, 1); - if (secondary_irq >= 0 && !pdata->get_secondary_status) { - ret = -EINVAL; - goto out; - } + if (secondary_irq >= 0 && !pdata->get_secondary_status) + return -EINVAL; - base = devm_request_and_ioremap(&dev->dev, res); - if (!base) - return -ENOMEM; + base = devm_ioremap_resource(&dev->dev, res); - if (IS_ERR(base)) { - ret = PTR_ERR(base); - goto out; - } ++ if (IS_ERR(base)) ++ return PTR_ERR(base); clk = devm_clk_get(&dev->dev, NULL); - if (IS_ERR(clk)) { - ret = PTR_ERR(clk); - goto out; - } + if (IS_ERR(clk)) + return PTR_ERR(clk); clk_prepare(clk); nmk_chip = devm_kzalloc(&dev->dev, sizeof(*nmk_chip), GFP_KERNEL); diff --cc include/linux/mfd/abx500/ab8500.h index 7c0df91e3378,fc0534483c72..9db0bda446a0 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@@ -290,9 -385,8 +388,9 @@@ struct ab8500_platform_data struct ab8500_regulator_reg_init *regulator_reg_init; int num_regulator; struct regulator_init_data *regulator; - struct ab8500_gpio_platform_data *gpio; + struct abx500_gpio_platform_data *gpio; struct ab8500_codec_platform_data *codec; + struct ab8500_sysctrl_platform_data *sysctrl; }; extern int ab8500_init(struct ab8500 *ab8500, @@@ -370,12 -464,48 +468,56 @@@ static inline int is_ab9540_2p0(struct return (is_ab9540(ab) && (ab->chip_id == AB8500_CUT2P0)); } + /* + * Be careful, the marketing name for this chip is 2.1 + * but the value read from the chip is 3.0 (0x30) + */ + static inline int is_ab9540_3p0(struct ab8500 *ab) + { + return (is_ab9540(ab) && (ab->chip_id == AB8500_CUT3P0)); + } + + static inline int is_ab8540_1p0_or_earlier(struct ab8500 *ab) + { + return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P0); + } + + static inline int is_ab8540_1p1_or_earlier(struct ab8500 *ab) + { + return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P1); + } + + static inline int is_ab8540_1p2_or_earlier(struct ab8500 *ab) + { + return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT1P2); + } + + static inline int is_ab8540_2p0_or_earlier(struct ab8500 *ab) + { + return is_ab8540(ab) && (ab->chip_id <= AB8500_CUT2P0); + } + + static inline int is_ab8540_2p0(struct ab8500 *ab) + { + return is_ab8540(ab) && (ab->chip_id == AB8500_CUT2P0); + } + + static inline int is_ab8505_2p0_earlier(struct ab8500 *ab) + { + return (is_ab8505(ab) && (ab->chip_id < AB8500_CUT2P0)); + } + + static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab) + { + return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0)); + } + +#ifdef CONFIG_AB8500_DEBUG +void ab8500_dump_all_banks(struct device *dev); +void ab8500_debug_register_interrupt(int line); +#else +static inline void ab8500_dump_all_banks(struct device *dev) {} +static inline void ab8500_debug_register_interrupt(int line) {} +#endif + #endif /* MFD_AB8500_H */