Message ID | 1430321701-13758-4-git-send-email-vladimir_zapolskiy@mentor.com |
---|---|
State | New |
Headers | show |
On Wed, Apr 29, 2015 at 5:35 PM, Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> wrote: > Adding a BGPIOF_READ_OUTPUT_REG_SET initialization flag to GPIO > generic MMIO driver makes possible to remove a private get() value > function from the driver. > > Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Patch applied, unless Jonas has a problem with it. Always CC: Jonas Jensen whenever patching Moxart stuff pls. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11 May 2015 at 11:52, Linus Walleij <linus.walleij@linaro.org> wrote: > Patch applied, unless Jonas has a problem with it. > Always CC: Jonas Jensen whenever patching Moxart stuff pls. Thanks! I just figured out I never completed my linux-gpio subscription though I would have found this eventually. Unfortunately my tree is not rebased since 3.17 so merged manually and tested (verified OK on UC-7112-LX): https://bitbucket.org/Kasreyn/linux-next/commits/5da653347ed802f5cdfd785d1dbaab2aa7432c1d Jonas -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Jonas, Linus, On 11.05.2015 15:17, Jonas Jensen wrote: > On 11 May 2015 at 11:52, Linus Walleij <linus.walleij@linaro.org> wrote: >> Patch applied, unless Jonas has a problem with it. >> Always CC: Jonas Jensen whenever patching Moxart stuff pls. will do, I got a list of addressees using scripts/get_maintainer.pl, probably updating MAINTAINERS record may be a good option here. > Thanks! > > I just figured out I never completed my linux-gpio subscription though > I would have found this eventually. > > Unfortunately my tree is not rebased since 3.17 so merged manually and > tested (verified OK on UC-7112-LX): > > https://bitbucket.org/Kasreyn/linux-next/commits/5da653347ed802f5cdfd785d1dbaab2aa7432c1d > > > Jonas > -- With best wishes, Vladimir -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-moxart.c b/drivers/gpio/gpio-moxart.c index c3ab46e..abd8676 100644 --- a/drivers/gpio/gpio-moxart.c +++ b/drivers/gpio/gpio-moxart.c @@ -39,17 +39,6 @@ static void moxart_gpio_free(struct gpio_chip *chip, unsigned offset) pinctrl_free_gpio(offset); } -static int moxart_gpio_get(struct gpio_chip *chip, unsigned offset) -{ - struct bgpio_chip *bgc = to_bgpio_chip(chip); - u32 ret = bgc->read_reg(bgc->reg_dir); - - if (ret & BIT(offset)) - return !!(bgc->read_reg(bgc->reg_set) & BIT(offset)); - else - return !!(bgc->read_reg(bgc->reg_dat) & BIT(offset)); -} - static int moxart_gpio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -68,8 +57,9 @@ static int moxart_gpio_probe(struct platform_device *pdev) return PTR_ERR(base); ret = bgpio_init(bgc, dev, 4, base + GPIO_DATA_IN, - base + GPIO_DATA_OUT, NULL, - base + GPIO_PIN_DIRECTION, NULL, 0); + base + GPIO_DATA_OUT, NULL, + base + GPIO_PIN_DIRECTION, NULL, + BGPIOF_READ_OUTPUT_REG_SET); if (ret) { dev_err(&pdev->dev, "bgpio_init failed\n"); return ret; @@ -78,7 +68,6 @@ static int moxart_gpio_probe(struct platform_device *pdev) bgc->gc.label = "moxart-gpio"; bgc->gc.request = moxart_gpio_request; bgc->gc.free = moxart_gpio_free; - bgc->gc.get = moxart_gpio_get; bgc->data = bgc->read_reg(bgc->reg_set); bgc->gc.base = 0; bgc->gc.ngpio = 32;
Adding a BGPIOF_READ_OUTPUT_REG_SET initialization flag to GPIO generic MMIO driver makes possible to remove a private get() value function from the driver. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> --- drivers/gpio/gpio-moxart.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)