Re: BGPIOF_READ_OUTPUT_REG_SET problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi


On Thu, Dec 17, 2015 at 10:00 AM, Linus Walleij
<linus.walleij@xxxxxxxxxx> wrote:
> On Wed, Dec 16, 2015 at 3:05 PM, Michael Trimarchi
> <michael@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>> I have get a problem using gpio and imx6q freescale architecture. I don't
>> really understand how should work your change and I have done a quick
>> fix for me. Can you explain what was the idea?
>>
>> Michael
>>
>> diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
>> index a3f0753..f9c6ff7 100644
>> --- a/drivers/gpio/gpio-generic.c
>> +++ b/drivers/gpio/gpio-generic.c
>> @@ -139,11 +139,14 @@ static int bgpio_get_set(struct gpio_chip *gc, unsigned int gpio)
>>  {
>>         struct bgpio_chip *bgc = to_bgpio_chip(gc);
>>         unsigned long pinmask = bgc->pin2mask(bgc, gpio);
>> +       unsigned long reg;
>>
>>         if (bgc->dir & pinmask)
>> -               return bgc->read_reg(bgc->reg_set) & pinmask;
>> +               reg = bgc->read_reg(bgc->reg_set) & pinmask;
>>         else
>> -               return bgc->read_reg(bgc->reg_dat) & pinmask;
>> +               reg = bgc->read_reg(bgc->reg_dat) & pinmask;
>> +
>> +       return !!(reg &  bgc->pin2mask(bgc, gpio));
>>  }
>
> This looks identical to this fix I have queued for fixes:
> https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-gpio.git/commit/?h=fixes&id=21f2856498ff09a03ebc8f9ff7581451a221d81b
>

Good, so I can confirm that it's urgent

Michael

> Yours,
> Linus Walleij



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux