[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdaL_EbGxBknoQMnnHCND=AKyY+qBZ5pTBC+-dVC2Ab4ZQ@mail.gmail.com>
Date: Sun, 30 Sep 2012 10:28:55 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Neil Zhang <zhangwm@...vell.com>
Cc: grant.likely@...retlab.ca, haojian.zhuang@...il.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] GPIO: gpio-pxa: fix bug when get gpio value
On Tue, Sep 25, 2012 at 2:03 PM, Neil Zhang <zhangwm@...vell.com> wrote:
> We need to return 0 or 1 when get gpio value.
OK...
> static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
> {
> - return readl_relaxed(gpio_chip_base(chip) + GPLR_OFFSET) & (1 << offset);
> + u32 gplr = __raw_readl(gpio_chip_base(chip) + GPLR_OFFSET);
> + u32 mask = 1 << offset;
> +
> + return (gplr & mask) != 0;
So why are you switching the perfectly working readl_relaxed() call to
a __raw_readl()?
Please don't do this, and respin the patch.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists