From: Linus Walleij Date: Mon, 21 Dec 2015 08:36:21 +0000 (+0100) Subject: Merge tag 'v4.4-rc6' into devel X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0529357f102b96f68bc199f858d1c3b07f4b674c;p=linux-beck.git Merge tag 'v4.4-rc6' into devel Linux 4.4-rc6 --- 0529357f102b96f68bc199f858d1c3b07f4b674c diff --cc drivers/pinctrl/bcm/pinctrl-bcm2835.c index 0bc1abcedbae,2e6ca69635aa..595f87028b19 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@@ -342,22 -342,23 +342,23 @@@ static int bcm2835_gpio_get(struct gpio return bcm2835_gpio_get_bit(pc, GPLEV0, offset); } - static int bcm2835_gpio_direction_output(struct gpio_chip *chip, - unsigned offset, int value) - { - return pinctrl_gpio_direction_output(chip->base + offset); - } - static void bcm2835_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { - struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev); + struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->parent); bcm2835_gpio_set_bit(pc, value ? GPSET0 : GPCLR0, offset); } + static int bcm2835_gpio_direction_output(struct gpio_chip *chip, + unsigned offset, int value) + { + bcm2835_gpio_set(chip, offset, value); + return pinctrl_gpio_direction_output(chip->base + offset); + } + static int bcm2835_gpio_to_irq(struct gpio_chip *chip, unsigned offset) { - struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->dev); + struct bcm2835_pinctrl *pc = dev_get_drvdata(chip->parent); return irq_linear_revmap(pc->irq_domain, offset); } diff --cc drivers/pinctrl/mediatek/pinctrl-mtk-common.c index a71f68362967,5c717275a7fa..9ddba444e127 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@@ -755,14 -755,10 +755,10 @@@ static int mtk_gpio_get(struct gpio_chi unsigned int reg_addr; unsigned int bit; unsigned int read_val = 0; - struct mtk_pinctrl *pctl = dev_get_drvdata(chip->dev); + struct mtk_pinctrl *pctl = dev_get_drvdata(chip->parent); - if (mtk_gpio_get_direction(chip, offset)) - reg_addr = mtk_get_port(pctl, offset) + - pctl->devdata->dout_offset; - else - reg_addr = mtk_get_port(pctl, offset) + - pctl->devdata->din_offset; + reg_addr = mtk_get_port(pctl, offset) + + pctl->devdata->din_offset; bit = BIT(offset & 0xf); regmap_read(pctl->regmap1, reg_addr, &read_val);