Re: [PATCH] i2c: Fix modalias for ACPI enumerated I2C devices

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

 



On Sat, Oct 12, 2013 at 03:45:15PM +0200, Rafael J. Wysocki wrote:
> On Saturday, October 12, 2013 08:04:13 AM Mika Westerberg wrote:
> > On Sat, Oct 12, 2013 at 12:16:02AM +0200, Rafael J. Wysocki wrote:
> > > > I think that this is intentional. We don't want that the i2c modalias
> > > > matches with the ACPI device (like with the i2c:INTABCD). Instead use ACPI
> > > > IDs that are added to the driver to match with the ACPI device.
> > > 
> > > Well, I'm not really sure this was intentional, but I wonder how other bus
> > > types work in that respect?
> > 
> > We have the same for platform bus, if that's what you are asking.
> > 
> > It probably doesn't hurt to have this patch applied but it might cause
> > inadvertent match if for some reason there is an I2C client driver that
> > happens to have INTABCD I2C id in its list.
> 
> Well, if they have that id in their lists, they are supposed to be able to
> handle this device, aren't they?  What other reason may be there for them
> to put that id into their lists?

If we have two ACPI enumerated devices, they have following modalias:

  i2c-device0:	i2c:INTABCD:00
		acpi:INTABCD

  i2c-device1:	i2c:INTABCD:01
  		acpi:INTABCD

Likelihood that some random I2C driver has INTABCD:00 or INTABCD:01 ids in
their list is minimal. However, when you turn it to this:


  i2c-device0:	i2c:INTABCD
		acpi:INTABCD

  i2c-device1:	i2c:INTABCD
  		acpi:INTABCD

It might be possible that we get a match that isn't supposed to happen.
Well, OK it is pretty remote but anyway :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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