Re: [PATCH 2/9] i2c: Allow specifying irq-index to be used in i2c_device_probe()

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

 



On Mon, 2018-05-21 at 12:07 +0300, Andy Shevchenko wrote:
> On Sun, 2018-05-20 at 15:28 +0200, Hans de Goede wrote:
> > Some types of interrupts are retrieved in i2c_device_probe() because
> > getting them might fail with -EPROBE_DEFER.
> > 
> > So far we've always assumed the first IRQ (index 0) in the firmware-
> > node
> > is the one we want.
> > 
> > At least with ACPI enumerated i2c-clients in some cases the
> > firmware-
> > node
> > is shared between multiple i2c-clients so we need to be able to
> > specify
> > the index rather then hardcoding it at 0.
> > 
> > This commit adds a new fwnode_irq_index member to i2c_board_info and
> > i2c_client which allows specifying the index.
> > 
> 
> FWIW,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>


> P.S. I would go with 'unsigned int' for the index.

Ah, it seems it is needed to be -1 in some cases. Discard my comment.

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux