Re: [PATCH] i2c: change the id to let the i2c device work

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

 



Hi Mark,

On 10/12/2012 12:40, Mark Brown wrote:
On Fri, Oct 12, 2012 at 10:34:18AM +0800, Bo Shen wrote:
As the old method will use platform device id, change the id to
let the i2c device work

What are "the old method" and new method?  You're not explaining why
this is needed...

Maybe use the 'legacy method' will be better (I am not sure). Now, the Linux kernel is transferring to device tree which doesn't use platform device id. So, change the id to let the legacy code work.

May you understand.


  static struct platform_device at91sam9260_twi_device = {
  	.name			= "i2c-gpio",
-	.id			= -1,
+	.id			= 0,
  	.dev.platform_data	= &pdata,

This looks like a regression, if there's only one of a given type of
device in the system it should have no numeric ID in the display name so
having -1 is appropriate.


--
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