lkml.org 
[lkml]   [2011]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] pch_gpio: Support interrupt function
Hi Grant,

(2011/07/05 1:31), Grant Likely wrote:

>> +#define PCH_IRQ_BASE 23
>
> Yikes! IRQ ranges should really be dynamically assigned. Don't hard
> code an irq base.

As we discussed before,
without specifying PCH_IRQ_BASE,
it seemed IRQ number collision issue occurred.
Thus, I added PCH_IRQ_BASE.


>> @@ -202,8 +345,36 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
>> goto err_gpiochip_add;
>> }
>>
>> + irq_base = irq_alloc_descs(-1, PCH_IRQ_BASE, GPIO_NUM_PINS, GFP_KERNEL);
>> + if (irq_base< 0) {
>> + dev_err(&pdev->dev, "PCH gpio: Failed to get IRQ base num\n");
>> + goto err_irq_alloc_descs;
>> + }
>> + chip->irq_base = irq_base;
>
> This looks like it will cause the driver probe to completely fail,
> even if the GPIO portion of the chip was setup correctly. I would
> think that if GPIO works the driver should at least enable that bit
> even if IRQs are broken.

Do you mean in case of failing irq_alloc_descs,
probe() shouldn't return ERROR but SUCCESS. Right ?

--
tomoya
OKI SEMICONDUCTOR CO., LTD.


\
 
 \ /
  Last update: 2011-07-05 05:59    [W:0.106 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site