search for: virtio_i2c_msg

Displaying 20 results from an estimated 20 matches for "virtio_i2c_msg".

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. > >> +}; >> + >> +/** >> + * struct...
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. > >> +}; >> + >> +/** >> + * struct...
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 anyway....
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; +} __packed...
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; +} __packed...
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; +}; + +/** + * struct v...
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; +}; + +/** + * struct v...
2020 Sep 08
1
[PATCH] i2c: virtio: add a virtio i2c frontend driver
On 2020/9/7 13:40, Jason Wang wrote: > >> >> >>> >>>> >>>> +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...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...c.h> +#include <linux/io.h> +#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_i2c.h> + +/** + * struct virtio_i2c_msg - the virtio I2C message structure + * @hdr: the virtio I2C message header + * @buf: virtio I2C message data buffer + * @status: the processing result from the backend + */ +struct virtio_i2c_msg { + struct virtio_i2c_hdr hdr; + u8 *buf; + u8 status; +}; + +/** + * struct virtio_i2c - virtio I2C da...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...c.h> +#include <linux/io.h> +#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_i2c.h> + +/** + * struct virtio_i2c_msg - the virtio I2C message structure + * @hdr: the virtio I2C message header + * @buf: virtio I2C message data buffer + * @status: the processing result from the backend + */ +struct virtio_i2c_msg { + struct virtio_i2c_hdr hdr; + u8 *buf; + u8 status; +}; + +/** + * struct virtio_i2c - virtio I2C da...
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; &gt...
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 addr;...
2020 Sep 22
0
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...;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_i2c.h> > + > +/** > + * struct virtio_i2c_msg - the virtio I2C message structure > + * @hdr: the virtio I2C message header > + * @buf: virtio I2C message data buffer > + * @status: the processing result from the backend > + */ > +struct virtio_i2c_msg { > + struct virtio_i2c_hdr hdr; > + u8 *buf; > + u8 status; > +};...
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 addr;...
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 addr;...
2020 Sep 14
2
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...c_msg *msgs, int num) > 0a54ec77196674 Jie Deng 2020-09-11 110 { > 0a54ec77196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); > 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; > 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; > 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; > 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; > 0a54ec77196674 Jie Deng 2020-09-11 116 > 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); > 0a54ec77196674 Jie...
2020 Sep 14
2
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...c_msg *msgs, int num) > 0a54ec77196674 Jie Deng 2020-09-11 110 { > 0a54ec77196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); > 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; > 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; > 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; > 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; > 0a54ec77196674 Jie Deng 2020-09-11 116 > 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); > 0a54ec77196674 Jie...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...__virtio16 len; > +} __packed; As Misha noticed and somewhere I saw 0-day reports these should be carefully taken care of. ... > +static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) > +{ > + struct virtio_i2c *vi = i2c_get_adapdata(adap); > + struct virtio_i2c_msg *vmsg_o, *vmsg_i; > + struct virtqueue *vq = vi->vq; > + unsigned long time_left; > + int len, i, ret = 0; > + > + vmsg_o = kzalloc(sizeof(*vmsg_o), GFP_KERNEL); > + if (!vmsg_o) > + return -ENOMEM; > + > + mutex_lock(&vi->i2c_lock); > + vmsg_o->buf = NUL...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...ter *adap, struct i2c_msg *msgs, int num) 0a54ec77196674 Jie Deng 2020-09-11 110 { 0a54ec77196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; 0a54ec77196674 Jie Deng 2020-09-11 116 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); 0a54ec77196674 Jie Deng 2020-09-11 118 vm...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...) > > 0a54ec77196674 Jie Deng 2020-09-11 110 { > > 0a54ec77196674 Jie Deng 2020-09-11 111 struct virtio_i2c *vi = i2c_get_adapdata(adap); > > 0a54ec77196674 Jie Deng 2020-09-11 112 struct virtqueue *vq = vi->vq; > > 0a54ec77196674 Jie Deng 2020-09-11 113 struct virtio_i2c_msg *vmsg; > > 0a54ec77196674 Jie Deng 2020-09-11 114 unsigned long time_left; > > 0a54ec77196674 Jie Deng 2020-09-11 115 int len, i, ret = 0; > > 0a54ec77196674 Jie Deng 2020-09-11 116 > > 0a54ec77196674 Jie Deng 2020-09-11 117 mutex_lock(&vi->i2c_lock); >...