On Mon, Jan 26, 2009 at 1:06 PM, Timur Tabi <timur@xxxxxxxxxxxxx> wrote: > On Sat, Jan 24, 2009 at 10:50 AM, Ben Dooks <ben-linux@xxxxxxxxx> wrote: >> you seem to have managed to short-circuit part of the device >> creation process. You do not need to pass the data via the device >> driver, you should pass it when creating the device. > > Yes, I think my code is broken. > >> If you look at i2c_board_info which can be passed into i2c_new_device >> or similar functions, there is a platform_data field you can fill out >> and this is passed in to your probe routine in the i2c device. > > I don't think this will work for me. I'm running this on a PowerPC > system, and we use a device tree to represent the I2C devices on the > various I2C buses. My driver does not call i2c_new_device. This is > done for me in of_register_i2c_devices(). As soon as my driver calls > i2c_add_driver(), my I2C probe function will be called, once for each > I2C device defined in the device tree. So I don't think I can update > the i2c_board_info structure. Is it possible to use of_find_i2c_device_by_node() during initialization of your I2S device and poke the OF specific info into the codec at that point? > >> >> -- >> Ben (ben@xxxxxxxxx, http://www.fluff.org/) >> >> 'a smiley only costs 4 bytes' >> -- >> 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 >> > > > > -- > Timur Tabi > Linux kernel developer at Freescale > -- > 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 > -- Jon Smirl jonsmirl@xxxxxxxxx -- 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