On Tue, Apr 10, 2012 at 5:56 AM, Oskar Andero <oskar.and...@gmail.com> wrote: > On 18:45 Thu 05 Apr , Peter Maydell wrote: >> On 2 April 2012 21:17, Oskar Andero <oskar.and...@gmail.com> wrote: >> > Signed-off-by: Oskar Andero <oskar.and...@gmail.com> >> > --- >> > hw/versatilepb.c | 80 >> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> > 1 files changed, 80 insertions(+), 0 deletions(-) >> >> This is just a cut-n-paste of the i2c device in hw/realview.c. >> Instead of duplicating the code we should pull it out into >> its own source file, give it a name which doesn't have 'realview' >> in it (since it's the same thing in all these boards) and >> then use that new device in all the boards which have it. > > Yes, you are absolutely right. I will create a new file, e.g. > i2c_generic.c or something. >
Does this I2C controller IP common to all these arm platforms have a name? i2c_generic.c sounds too generic a name for a specific implementation of I2C. Just browsing the linux source, the driver is called i2c-versatile, perhaps this should be the name of the device and this new file? Peter