答复: [PATCH v3 2/2] i2c: imx: Add Vybrid VF610 I2C controller support

Lu Jingchang-B35083 B35083 at freescale.com
Mon Aug 5 11:51:14 EDT 2013


> > > + [VF610_I2C] = {
> > > +         .devtype = VF610_I2C,
> > > +         .hwdata = &vf610_i2c_hwdata
> > > + },
> > >  };
> >
> > Why add this array?
> > You should reference imx_i2c_hwdata/vf610_i2c_hwdata directly here.
[Lu Jingchang-B35083]
The imx_i2c_devtype[] array is used to support platform that doesn't support dts currently. So the array is added to make the driver consistent. Thanks.

> >
> > >
> > >   if (of_id)
> > >           pdev->id_entry = of_id->data;
> >
> > This is wrong in the original driver code. This field should be changed
> > in a driver.
 [Lu Jingchang-B35083]
The assignment to id_entry is due to support both dts device and non-dts devices, just as you said, maybe this field shouldn't be changed out of platform driver core,
so I will try to change this but make the drive for both dts and non-dts still work well. Thanks.



Best Regards,
Jingchang


More information about the linux-arm-kernel mailing list