Re: [cecd-devel] [PATCH 1/5] [realtek] use definitions from linux/i2c.h and linux/i2c-dev.h
Status: Beta
Brought to you by:
pbatard
From: Pete B. <pb...@gm...> - 2011-12-13 21:12:27
|
Hi Florian. Many thanks for the patches. I have committed 4-5, but I can't currently apply 1 as trying to use <linux/i2c.h> and <linux/i2c-dev.h> generates a lot of warnings and errors during compilation, which is the reason why I used a redef. I spent a bit more time trying to see if this was a toolchain or a Realtek header issue, to see if I could fix the problem, but I haven't been able to do so. Hopefully the current bit of kludge isn't for the best, and I'd like to avoid it if I can, but this may take some time. I'm hoping that keeping it in the realtek backend won't have much of an impact on your implementation. Thanks again for the patches! /Pete On 2011.12.13 16:42, Florian Fainelli wrote: > --- > libcec/linux_realtek_soc.c | 14 ++------------ > 1 files changed, 2 insertions(+), 12 deletions(-) > > diff --git a/libcec/linux_realtek_soc.c b/libcec/linux_realtek_soc.c > index 567279f..68a8484 100644 > --- a/libcec/linux_realtek_soc.c > +++ b/libcec/linux_realtek_soc.c > @@ -27,6 +27,8 @@ > #include<unistd.h> > #include<fcntl.h> > #include<linux/types.h> > +#include<linux/i2c.h> > +#include<linux/i2c-dev.h> > #include<sys/ioctl.h> > #include<errno.h> > > @@ -37,18 +39,6 @@ > /* I2C definitions */ > #define REALTEK_EDID_I2C_DEV "/dev/i2c/0" > #define REALTEK_EDID_I2C_ADDR 0x50 > -#define I2C_RDWR 0x0707 > -#define I2C_M_RD 0x01 > -struct i2c_msg { > - __u16 addr; > - __u16 flags; > - __u16 len; > - __u8 *buf; > -}; > -struct i2c_rdwr_ioctl_data { > - struct i2c_msg *msgs; > - int nmsgs; > -}; > > int realtek_cec_init(void) > { |