[PATCH v8 10/11] OMAP: GPIO: Implement GPIO as a platform device

Varadarajan, Charulatha charu at ti.com
Tue Dec 7 02:08:08 EST 2010


On Tue, Dec 7, 2010 at 11:05, Varadarajan, Charulatha <charu at ti.com> wrote:
> Cory,
>
> On Tue, Dec 7, 2010 at 10:49, Cory Maccarrone <darkstar6262 at gmail.com> wrote:
>> On Thu, Nov 25, 2010 at 4:48 AM, Varadarajan, Charulatha <charu at ti.com> wrote:
>
> <<snip>>
>
>>> @@ -1642,6 +1502,13 @@ static int gpio_debounce(struct gpio_chip *chip, unsigned offset,
>>>        unsigned long flags;
>>>
>>>        bank = container_of(chip, struct gpio_bank, chip);
>>> +
>>> +       if (!bank->dbck) {
>>> +               bank->dbck = clk_get(bank->dev, "dbclk");
>>> +               if (IS_ERR(bank->dbck))
>>> +                       dev_err(bank->dev, "Could not get gpio dbck\n");
>>> +       }
>>> +
>>
>> I'm testing this on omap7xx, which doesn't have a dbclk.  Even with
>> dbck_flag set to false, this code still runs, causing these messages
>> to show up:
>
> Thanks for testing this series on OMAP7xx.
>
>>
>>    omap_gpio omap_gpio.5: Could not get gpio dbck
>>    omap_gpio omap_gpio.6: Could not get gpio dbck
>>
>> I think that 'if' should be:
>>
>>    if (bank->dbck_flag && !bank->dbck) {
>
> You are right. Will send a patch now.
>
>>
>> Also, see my comments in patch 4 - OMAP7xx: GPIO: Introduce support
>> for GPIO init, as there's dbck_flag entries there that are needed for
>> omap7xx.  Otherwise, seems to work well.

I noticed that gpio_debounce() calls _set_gpio_debounce() which is
handling only OMAP2+.
Hence I guess this should not be called for OMAP7xx at all. Now sure
how it was working earlier.

Anyways I can send the patch to fix the above mentioned warning.
Handling debounce feature
for OMAP1 needs to be fixed. I do not have a OMAP1 board here to fix
and verify the same.

>



More information about the linux-arm-kernel mailing list