diff mbox

gpio/davinci: add interrupt support for GPIOs 16-31

Message ID 1434647449-5393-1-git-send-email-vitalya@ti.com
State New
Headers show

Commit Message

Vitaly Andrianov June 18, 2015, 5:10 p.m. UTC
Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
"binten" register (offset 8). Previous versions of GPIO only
used bit 0, which enables GPIO 0-15 interrupts.

Signed-off-by: Reece Pollack <x0183204@ti.com>
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
 drivers/gpio/gpio-davinci.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Linus Walleij July 14, 2015, 2:01 p.m. UTC | #1
On Thu, Jun 18, 2015 at 7:10 PM, Vitaly Andrianov <vitalya@ti.com> wrote:

> Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
> "binten" register (offset 8). Previous versions of GPIO only
> used bit 0, which enables GPIO 0-15 interrupts.
>
> Signed-off-by: Reece Pollack <x0183204@ti.com>
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>

Sekhar/Kevin: OK with this? We don't have a maintainer
listed for davinci GPIO so I assume it's you guys...

Should this be tagged for stable?

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
Sekhar Nori July 16, 2015, 9:04 a.m. UTC | #2
On Tuesday 14 July 2015 07:31 PM, Linus Walleij wrote:
> On Thu, Jun 18, 2015 at 7:10 PM, Vitaly Andrianov <vitalya@ti.com> wrote:
> 
>> Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
>> "binten" register (offset 8). Previous versions of GPIO only
>> used bit 0, which enables GPIO 0-15 interrupts.
>>
>> Signed-off-by: Reece Pollack <x0183204@ti.com>
>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> 
> Sekhar/Kevin: OK with this? We don't have a maintainer
> listed for davinci GPIO so I assume it's you guys...

Hi Linus, I had reviewed this patch and there was a v2 send based on my
comments on July 03.

> Should this be tagged for stable?

Not sure about that. It affects Keystone devices. Vitaly?

Thanks,
Sekhar
--
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
Vitaly Andrianov July 16, 2015, 5:41 p.m. UTC | #3
On 07/16/2015 05:04 AM, Sekhar Nori wrote:
> On Tuesday 14 July 2015 07:31 PM, Linus Walleij wrote:
>> On Thu, Jun 18, 2015 at 7:10 PM, Vitaly Andrianov <vitalya@ti.com> wrote:
>>
>>> Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
>>> "binten" register (offset 8). Previous versions of GPIO only
>>> used bit 0, which enables GPIO 0-15 interrupts.
>>>
>>> Signed-off-by: Reece Pollack <x0183204@ti.com>
>>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
>>
>> Sekhar/Kevin: OK with this? We don't have a maintainer
>> listed for davinci GPIO so I assume it's you guys...
>
> Hi Linus, I had reviewed this patch and there was a v2 send based on my
> comments on July 03.
>
>> Should this be tagged for stable?
>
> Not sure about that. It affects Keystone devices. Vitaly?
>
> Thanks,
> Sekhar
>
We used this patch for a long time. So, I guess it is stable.
Thanks,
Vitaly
--
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
Sekhar Nori July 17, 2015, 5:02 a.m. UTC | #4
On Thursday 16 July 2015 11:11 PM, Vitaly Andrianov wrote:
> 
> 
> On 07/16/2015 05:04 AM, Sekhar Nori wrote:
>> On Tuesday 14 July 2015 07:31 PM, Linus Walleij wrote:
>>> On Thu, Jun 18, 2015 at 7:10 PM, Vitaly Andrianov <vitalya@ti.com>
>>> wrote:
>>>
>>>> Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
>>>> "binten" register (offset 8). Previous versions of GPIO only
>>>> used bit 0, which enables GPIO 0-15 interrupts.
>>>>
>>>> Signed-off-by: Reece Pollack <x0183204@ti.com>
>>>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
>>>
>>> Sekhar/Kevin: OK with this? We don't have a maintainer
>>> listed for davinci GPIO so I assume it's you guys...
>>
>> Hi Linus, I had reviewed this patch and there was a v2 send based on my
>> comments on July 03.
>>
>>> Should this be tagged for stable?
>>
>> Not sure about that. It affects Keystone devices. Vitaly?
>>
>> Thanks,
>> Sekhar
>>
> We used this patch for a long time. So, I guess it is stable.

You misunderstood. Should this patch be marked for backporting to older
kernels because it fixes a critical issue on devices otherwise working
in that kernel? See Documentation/stable_kernel_rules.txt

Thanks,
Sekhar
--
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
Vitaly Andrianov July 17, 2015, 12:18 p.m. UTC | #5
On 07/17/2015 01:02 AM, Sekhar Nori wrote:
> On Thursday 16 July 2015 11:11 PM, Vitaly Andrianov wrote:
>>
>>
>> On 07/16/2015 05:04 AM, Sekhar Nori wrote:
>>> On Tuesday 14 July 2015 07:31 PM, Linus Walleij wrote:
>>>> On Thu, Jun 18, 2015 at 7:10 PM, Vitaly Andrianov <vitalya@ti.com>
>>>> wrote:
>>>>
>>>>> Interrupts for GPIOs 16 through 31 are enabled by bit 1 in the
>>>>> "binten" register (offset 8). Previous versions of GPIO only
>>>>> used bit 0, which enables GPIO 0-15 interrupts.
>>>>>
>>>>> Signed-off-by: Reece Pollack <x0183204@ti.com>
>>>>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
>>>>
>>>> Sekhar/Kevin: OK with this? We don't have a maintainer
>>>> listed for davinci GPIO so I assume it's you guys...
>>>
>>> Hi Linus, I had reviewed this patch and there was a v2 send based on my
>>> comments on July 03.
>>>
>>>> Should this be tagged for stable?
>>>
>>> Not sure about that. It affects Keystone devices. Vitaly?
>>>
>>> Thanks,
>>> Sekhar
>>>
>> We used this patch for a long time. So, I guess it is stable.
>
> You misunderstood. Should this patch be marked for backporting to older
> kernels because it fixes a critical issue on devices otherwise working
> in that kernel? See Documentation/stable_kernel_rules.txt
>
> Thanks,
> Sekhar
>
Sorry. As I understand from the stable_kernel_rules.txt this patch _IS_ 
_NOT_ for "-stable"

Thanks,
Vitaly
--
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 mbox

Patch

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index c5e05c8..c90629f 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -546,6 +546,8 @@  static int davinci_gpio_irq_setup(struct platform_device *pdev)
 		chips[0].gpio_irq = bank_irq;
 		chips[0].gpio_unbanked = pdata->gpio_unbanked;
 		binten = BIT(0);
+		if (pdata->gpio_unbanked > 16)
+			binten |= BIT(1);
 
 		/* AINTC handles mask/unmask; GPIO handles triggering */
 		irq = bank_irq;