search for: virtio_i2c

Displaying 19 results from an estimated 19 matches for "virtio_i2c".

2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...- Fix typo reported by Randy. Changes in v2: - Addressed comments received from Michael, Andy and Jason. drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses/Makefile | 3 + drivers/i2c/busses/i2c-virtio.c | 256 ++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/virtio_i2c.h | 31 +++++ include/uapi/linux/virtio_ids.h | 1 + 5 files changed, 302 insertions(+) create mode 100644 drivers/i2c/busses/i2c-virtio.c create mode 100644 include/uapi/linux/virtio_i2c.h diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 293e7a0..f2f6543 100644 ---...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...- Fix typo reported by Randy. Changes in v2: - Addressed comments received from Michael, Andy and Jason. drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses/Makefile | 3 + drivers/i2c/busses/i2c-virtio.c | 256 ++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/virtio_i2c.h | 31 +++++ include/uapi/linux/virtio_ids.h | 1 + 5 files changed, 302 insertions(+) create mode 100644 drivers/i2c/busses/i2c-virtio.c create mode 100644 include/uapi/linux/virtio_i2c.h diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 293e7a0..f2f6543 100644 ---...
2020 Sep 22
0
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...t; Changes in v2: > - Addressed comments received from Michael, Andy and Jason. > > drivers/i2c/busses/Kconfig | 11 ++ > drivers/i2c/busses/Makefile | 3 + > drivers/i2c/busses/i2c-virtio.c | 256 ++++++++++++++++++++++++++++++++++++++++ > include/uapi/linux/virtio_i2c.h | 31 +++++ > include/uapi/linux/virtio_ids.h | 1 + > 5 files changed, 302 insertions(+) > create mode 100644 drivers/i2c/busses/i2c-virtio.c > create mode 100644 include/uapi/linux/virtio_i2c.h > > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig >...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> +??? tristate "Virtio I2C Adapter" >> +??? depends on VIRTIO > > > I guess it should depend on some I2C module here. > The dependency of I2C is included in the Kconfig in its parent directory. So there is nothing special to add here. > >> >> +struct virtio_i2c_msg { >> +??? struct virtio_i2c_hdr hdr; >> +??? char *buf; >> +??? u8 status; > > > Any reason for separating status out of virtio_i2c_hdr? > The status is not from i2c_msg. So I put it out of virtio_i2c_hdr. > >> +}; >> + >> +/** >> + * st...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> +??? tristate "Virtio I2C Adapter" >> +??? depends on VIRTIO > > > I guess it should depend on some I2C module here. > The dependency of I2C is included in the Kconfig in its parent directory. So there is nothing special to add here. > >> >> +struct virtio_i2c_msg { >> +??? struct virtio_i2c_hdr hdr; >> +??? char *buf; >> +??? u8 status; > > > Any reason for separating status out of virtio_i2c_hdr? > The status is not from i2c_msg. So I put it out of virtio_i2c_hdr. > >> +}; >> + >> +/** >> + * st...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...gt; +#include <linux/jiffies.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/wait.h> + +#include <linux/virtio.h> +#include <linux/virtio_ids.h> +#include <linux/virtio_config.h> + +#define VIRTIO_I2C_MSG_OK 0 +#define VIRTIO_I2C_MSG_ERR 1 + +/** + * struct virtio_i2c_hdr - the virtio I2C message header structure + * @addr: i2c_msg addr, the slave address + * @flags: i2c_msg flags + * @len: i2c_msg len + */ +struct virtio_i2c_hdr { + __virtio16 addr; + __virtio16 flags; + __virtio16 len; +} __pa...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...gt; +#include <linux/jiffies.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/wait.h> + +#include <linux/virtio.h> +#include <linux/virtio_ids.h> +#include <linux/virtio_config.h> + +#define VIRTIO_I2C_MSG_OK 0 +#define VIRTIO_I2C_MSG_ERR 1 + +/** + * struct virtio_i2c_hdr - the virtio I2C message header structure + * @addr: i2c_msg addr, the slave address + * @flags: i2c_msg flags + * @len: i2c_msg len + */ +struct virtio_i2c_hdr { + __virtio16 addr; + __virtio16 flags; + __virtio16 len; +} __pa...
2020 Sep 07
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> +??? depends on VIRTIO >> >> >> I guess it should depend on some I2C module here. >> > The dependency of I2C is included in the Kconfig in its parent directory. > So there is nothing special to add here. Ok. > > >> >>> >>> +struct virtio_i2c_msg { >>> +??? struct virtio_i2c_hdr hdr; >>> +??? char *buf; >>> +??? u8 status; >> >> >> Any reason for separating status out of virtio_i2c_hdr? >> > The status is not from i2c_msg. You meant ic2_hdr? You embed status in virtio_i2c_msg anyw...
2020 Sep 04
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...de <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > +#include <linux/wait.h> > + > +#include <linux/virtio.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +#define VIRTIO_I2C_MSG_OK 0 > +#define VIRTIO_I2C_MSG_ERR 1 > + > +/** > + * struct virtio_i2c_hdr - the virtio I2C message header structure > + * @addr: i2c_msg addr, the slave address > + * @flags: i2c_msg flags > + * @len: i2c_msg len > + */ > +struct virtio_i2c_hdr { > + __virtio16 a...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...de <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > +#include <linux/wait.h> > + > +#include <linux/virtio.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +#define VIRTIO_I2C_MSG_OK 0 > +#define VIRTIO_I2C_MSG_ERR 1 > + > +/** > + * struct virtio_i2c_hdr - the virtio I2C message header structure > + * @addr: i2c_msg addr, the slave address > + * @flags: i2c_msg flags > + * @len: i2c_msg len > + */ > +struct virtio_i2c_hdr { > + __virtio16 a...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...de <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > +#include <linux/wait.h> > + > +#include <linux/virtio.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +#define VIRTIO_I2C_MSG_OK 0 > +#define VIRTIO_I2C_MSG_ERR 1 > + > +/** > + * struct virtio_i2c_hdr - the virtio I2C message header structure > + * @addr: i2c_msg addr, the slave address > + * @flags: i2c_msg flags > + * @len: i2c_msg len > + */ > +struct virtio_i2c_hdr { > + __virtio16 a...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...de <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > +#include <linux/wait.h> > + > +#include <linux/virtio.h> > +#include <linux/virtio_ids.h> > +#include <linux/virtio_config.h> > + > +#define VIRTIO_I2C_MSG_OK 0 > +#define VIRTIO_I2C_MSG_ERR 1 > + > +/** > + * struct virtio_i2c_hdr - the virtio I2C message header structure > + * @addr: i2c_msg addr, the slave address > + * @flags: i2c_msg flags > + * @len: i2c_msg len > + */ > +struct virtio_i2c_hdr { > + __le16 addr;...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...gt; +#include <linux/jiffies.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/wait.h> + +#include <linux/virtio.h> +#include <linux/virtio_ids.h> +#include <linux/virtio_config.h> + +#define VIRTIO_I2C_MSG_OK 0 +#define VIRTIO_I2C_MSG_ERR 1 + +/** + * struct virtio_i2c_hdr - the virtio I2C message header structure + * @addr: i2c_msg addr, the slave address + * @flags: i2c_msg flags + * @len: i2c_msg len + */ +struct virtio_i2c_hdr { + __le16 addr; + __le16 flags; + __le16 len; +}; + +/** + * stru...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...gt; +#include <linux/jiffies.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/wait.h> + +#include <linux/virtio.h> +#include <linux/virtio_ids.h> +#include <linux/virtio_config.h> + +#define VIRTIO_I2C_MSG_OK 0 +#define VIRTIO_I2C_MSG_ERR 1 + +/** + * struct virtio_i2c_hdr - the virtio I2C message header structure + * @addr: i2c_msg addr, the slave address + * @flags: i2c_msg flags + * @len: i2c_msg len + */ +struct virtio_i2c_hdr { + __le16 addr; + __le16 flags; + __le16 len; +}; + +/** + * stru...
2020 Sep 14
2
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...: hppa-linux-gcc (GCC) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp at intel.com> > Reported-by: Dan Carpenter <dan.carpenter at oracle.com> > > smatch warnings: > drivers/i2c/busses/i2c-virtio.c:160 virtio_i2c_xfer() error: we previously assumed 'vmsg' could be null (see line 137) > It's quite possible a false positive. Look at 122. But I agree that for-loop is not the best for such things to understand. Perhaps switching to do {} while () will make it better. > # https://github.com/...
2020 Sep 14
2
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...: hppa-linux-gcc (GCC) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp at intel.com> > Reported-by: Dan Carpenter <dan.carpenter at oracle.com> > > smatch warnings: > drivers/i2c/busses/i2c-virtio.c:160 virtio_i2c_xfer() error: we previously assumed 'vmsg' could be null (see line 137) > It's quite possible a false positive. Look at 122. But I agree that for-loop is not the best for such things to understand. Perhaps switching to do {} while () will make it better. > # https://github.com/...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> > The virtio device ID 34 is used for this I2C adpter since IDs > before 34 have been reserved by other virtio devices. Seems it's slightly different version to what I have reviewed internally. My comments below. (I admit that some of them maybe new) ... > +/** > + * struct virtio_i2c_hdr - the virtio I2C message header structure > + * @addr: i2c_msg addr, the slave address > + * @flags: i2c_msg flags > + * @len: i2c_msg len > + */ > +struct virtio_i2c_hdr { > + __virtio16 addr; > + __virtio16 flags; > + __virtio16 len; > +} __packed; As Misha noticed...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...0913 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp at intel.com> Reported-by: Dan Carpenter <dan.carpenter at oracle.com> smatch warnings: drivers/i2c/busses/i2c-virtio.c:160 virtio_i2c_xfer() error: we previously assumed 'vmsg' could be null (see line 137) # https://github.com/0day-ci/linux/commit/0a54ec771966748fcbc86256b830b5f786168b7d git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jie-Deng/i2c-virtio-add-a-virtio-i2c-fron...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...gt; > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot <lkp at intel.com> > > Reported-by: Dan Carpenter <dan.carpenter at oracle.com> > > > > smatch warnings: > > drivers/i2c/busses/i2c-virtio.c:160 virtio_i2c_xfer() error: we previously assumed 'vmsg' could be null (see line 137) > > > > It's quite possible a false positive. Look at 122. But I agree that for-loop is > not the best for such things to understand. Perhaps switching to do {} while () > will make it better. &g...