Displaying 20 results from an estimated 75 matches for "i2c_adapter".
2012 Feb 14
1
[PATCH 2/7] drm/nouveau: do a better job at hiding the NIH i2c bit-banging algo
.../nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c
index 820ae7f..7a7e751 100644
--- a/drivers/gpu/drm/nouveau/nouveau_i2c.c
+++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c
@@ -242,7 +242,7 @@ i2c_addr(struct nouveau_i2c_chan *port, struct i2c_msg *msg)
}
static int
-i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
+nouveau_i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
{
struct nouveau_i2c_chan *port = (struct nouveau_i2c_chan *)adap;
struct i2c_msg *msg = msgs;
@@ -272,14 +272,14 @@ i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,...
2018 Jul 18
3
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...in patch 4 and 5 of this series, you're runtime resuming
pad->i2c->subdev.device->dev. Is this the PCI device or is it the i2c
device? I'm always confused by nouveau's structs. In nvkm_i2c_bus_ctor()
I can see that the device you're runtime resuming is the parent of the
i2c_adapter:
struct nvkm_device *device = pad->i2c->subdev.device;
[...]
bus->i2c.dev.parent = device->dev;
If the i2c_adapter is a child of the PCI device, it's sufficient
to runtime resume the i2c_adapter, i.e. bus->i2c.dev, and this will
implicitly runtime resume its parent.
Thanks,...
2018 Jul 18
1
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...9;re runtime resuming
> > pad->i2c->subdev.device->dev. Is this the PCI device or is it the i2c
> > device? I'm always confused by nouveau's structs. In nvkm_i2c_bus_ctor()
> > I can see that the device you're runtime resuming is the parent of the
> > i2c_adapter:
> >
> > struct nvkm_device *device = pad->i2c->subdev.device;
> > [...]
> > bus->i2c.dev.parent = device->dev;
> >
> > If the i2c_adapter is a child of the PCI device, it's sufficient
> > to runtime resume the i2c_adapter, i.e. bus->...
2012 Oct 18
13
[PATCH 00/10] extract dp helper functions
Hi all,
I've frustrated myself the last few days yelling at our link training code.
Comparing the i915 code to radeon and nouveau I've noticed the lack of a nice
set of dp helper functions. So I've started to extract a few.
There's lots more that we can do I think (link configuration selection, the i2c
over aux retry stuff which diverges already between i915 and radeon, maybe
2016 Feb 20
0
[PATCH v4 3/6] iccsense: implement for ina209, ina219 and ina3221
..._HDCP_EEPROM = 0x90,
NVBIOS_EXTDEV_NONE = 0xff,
diff --git a/drm/nouveau/include/nvkm/subdev/i2c.h b/drm/nouveau/include/nvkm/subdev/i2c.h
index 864d1ab..a63c5ac 100644
--- a/drm/nouveau/include/nvkm/subdev/i2c.h
+++ b/drm/nouveau/include/nvkm/subdev/i2c.h
@@ -108,6 +108,22 @@ nvkm_rdi2cr(struct i2c_adapter *adap, u8 addr, u8 reg)
}
static inline int
+nv_rd16i2cr(struct i2c_adapter *adap, u8 addr, u8 reg)
+{
+ u8 val[2];
+ struct i2c_msg msgs[] = {
+ { .addr = addr, .flags = 0, .len = 1, .buf = ® },
+ { .addr = addr, .flags = I2C_M_RD, .len = 2, .buf = val },
+ };
+
+ int ret = i2c_transf...
2018 Jul 18
0
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...this series, you're runtime resuming
> pad->i2c->subdev.device->dev. Is this the PCI device or is it the i2c
> device? I'm always confused by nouveau's structs. In nvkm_i2c_bus_ctor()
> I can see that the device you're runtime resuming is the parent of the
> i2c_adapter:
>
> struct nvkm_device *device = pad->i2c->subdev.device;
> [...]
> bus->i2c.dev.parent = device->dev;
>
> If the i2c_adapter is a child of the PCI device, it's sufficient
> to runtime resume the i2c_adapter, i.e. bus->i2c.dev, and this will
> implic...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...this controller
+ * @completion: completion of virtio I2C message
+ * @adap: I2C adapter for this controller
+ * @i2c_lock: lock for virtqueue processing
+ * @vq: the virtio virtqueue for communication
+ */
+struct virtio_i2c {
+ struct virtio_device *vdev;
+ struct completion completion;
+ struct i2c_adapter adap;
+ struct mutex i2c_lock;
+ struct virtqueue *vq;
+};
+
+static void virtio_i2c_msg_done(struct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vms...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...this controller
+ * @completion: completion of virtio I2C message
+ * @adap: I2C adapter for this controller
+ * @i2c_lock: lock for virtqueue processing
+ * @vq: the virtio virtqueue for communication
+ */
+struct virtio_i2c {
+ struct virtio_device *vdev;
+ struct completion completion;
+ struct i2c_adapter adap;
+ struct mutex i2c_lock;
+ struct virtqueue *vq;
+};
+
+static void virtio_i2c_msg_done(struct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vms...
2019 Jul 25
0
[PATCH 2/2] drm/nouveau: Don't retry infinitely when receiving no data on i2c over AUX
...diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
index b4e7404fe660..a11637b0f6cc 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
@@ -40,8 +40,7 @@ nvkm_i2c_aux_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
u8 *ptr = msg->buf;
while (remaining) {
- u8 cnt = (remaining > 16) ? 16 : remaining;
- u8 cmd;
+ u8 cnt, retries, cmd;
if (msg->flags & I2C_M_RD)
cmd = 1;
@@ -51,10 +50,19 @@ nvkm_i2c_aux_i2c_xfer(struct i2c_adapter *adap,...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...virtio I2C message for communication
+ * @adap: I2C adapter for this controller
+ * @i2c_lock: lock for virtqueue processing
+ * @vq: the virtio virtqueue for communication
+ */
+struct virtio_i2c {
+ struct virtio_device *vdev;
+ struct completion completion;
+ struct virtio_i2c_msg vmsg;
+ struct i2c_adapter adap;
+ struct mutex i2c_lock;
+ struct virtqueue *vq;
+};
+
+static void virtio_i2c_msg_done(struct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vms...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...virtio I2C message for communication
+ * @adap: I2C adapter for this controller
+ * @i2c_lock: lock for virtqueue processing
+ * @vq: the virtio virtqueue for communication
+ */
+struct virtio_i2c {
+ struct virtio_device *vdev;
+ struct completion completion;
+ struct virtio_i2c_msg vmsg;
+ struct i2c_adapter adap;
+ struct mutex i2c_lock;
+ struct virtqueue *vq;
+};
+
+static void virtio_i2c_msg_done(struct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vms...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...virtio I2C message for communication
+ * @adap: I2C adapter for this controller
+ * @i2c_lock: lock for virtqueue processing
+ * @vq: the virtio virtqueue for communication
+ */
+struct virtio_i2c {
+ struct virtio_device *vdev;
+ struct completion completion;
+ struct virtio_i2c_msg vmsg;
+ struct i2c_adapter adap;
+ struct mutex i2c_lock;
+ struct virtqueue *vq;
+};
+
+static void virtio_i2c_msg_done(struct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vms...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...virtio I2C message for communication
+ * @adap: I2C adapter for this controller
+ * @i2c_lock: lock for virtqueue processing
+ * @vq: the virtio virtqueue for communication
+ */
+struct virtio_i2c {
+ struct virtio_device *vdev;
+ struct completion completion;
+ struct virtio_i2c_msg vmsg;
+ struct i2c_adapter adap;
+ struct mutex i2c_lock;
+ struct virtqueue *vq;
+};
+
+static void virtio_i2c_msg_done(struct virtqueue *vq)
+{
+ struct virtio_i2c *vi = vq->vdev->priv;
+
+ complete(&vi->completion);
+}
+
+static int virtio_i2c_add_msg(struct virtqueue *vq,
+ struct virtio_i2c_msg *vms...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...tion of virtio I2C message
> + * @adap: I2C adapter for this controller
> + * @i2c_lock: lock for virtqueue processing
> + * @vq: the virtio virtqueue for communication
> + */
> +struct virtio_i2c {
> + struct virtio_device *vdev;
> + struct completion completion;
> + struct i2c_adapter adap;
> + struct mutex i2c_lock;
> + struct virtqueue *vq;
> +};
> +
> +static void virtio_i2c_msg_done(struct virtqueue *vq)
> +{
> + struct virtio_i2c *vi = vq->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_ms...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...tion of virtio I2C message
> + * @adap: I2C adapter for this controller
> + * @i2c_lock: lock for virtqueue processing
> + * @vq: the virtio virtqueue for communication
> + */
> +struct virtio_i2c {
> + struct virtio_device *vdev;
> + struct completion completion;
> + struct i2c_adapter adap;
> + struct mutex i2c_lock;
> + struct virtqueue *vq;
> +};
> +
> +static void virtio_i2c_msg_done(struct virtqueue *vq)
> +{
> + struct virtio_i2c *vi = vq->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_ms...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...@adap: I2C adapter for this controller
> + * @i2c_lock: lock for virtqueue processing
> + * @vq: the virtio virtqueue for communication
> + */
> +struct virtio_i2c {
> + struct virtio_device *vdev;
> + struct completion completion;
> + struct virtio_i2c_msg vmsg;
> + struct i2c_adapter adap;
> + struct mutex i2c_lock;
> + struct virtqueue *vq;
> +};
> +
> +static void virtio_i2c_msg_done(struct virtqueue *vq)
> +{
> + struct virtio_i2c *vi = vq->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_ms...
2020 Sep 04
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...tion of virtio I2C message
> + * @adap: I2C adapter for this controller
> + * @i2c_lock: lock for virtqueue processing
> + * @vq: the virtio virtqueue for communication
> + */
> +struct virtio_i2c {
> + struct virtio_device *vdev;
> + struct completion completion;
> + struct i2c_adapter adap;
> + struct mutex i2c_lock;
> + struct virtqueue *vq;
> +};
> +
> +static void virtio_i2c_msg_done(struct virtqueue *vq)
> +{
> + struct virtio_i2c *vi = vq->vdev->priv;
> +
> + complete(&vi->completion);
> +}
> +
> +static int virtio_i2c_add_ms...
2019 Jul 25
3
[PATCH 0/2] drm/nouveau: i2c over DP AUX fixes
This is another attempt at fixing an issue with
yes | sensors-detect
Causing some machines with nouveau loaded to hang if certain kinds of
displays are attached. I've also included one minor fix that I found
along the way of troubleshooting this issue.
Lyude Paul (2):
drm/nouveau: Fix missing elses in g94_i2c_aux_xfer
drm/nouveau: Don't retry infinitely when receiving no data on i2c
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...adap: I2C adapter for this controller
>> + * @i2c_lock: lock for virtqueue processing
>> + * @vq: the virtio virtqueue for communication
>> + */
>> +struct virtio_i2c {
>> +??? struct virtio_device *vdev;
>> +??? struct completion completion;
>> +??? struct i2c_adapter adap;
>> +??? struct mutex i2c_lock;
>> +??? struct virtqueue *vq;
>> +};
>> +
>> +static void virtio_i2c_msg_done(struct virtqueue *vq)
>> +{
>> +??? struct virtio_i2c *vi = vq->vdev->priv;
>> +
>> +??? complete(&vi->completion);
&...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...adap: I2C adapter for this controller
>> + * @i2c_lock: lock for virtqueue processing
>> + * @vq: the virtio virtqueue for communication
>> + */
>> +struct virtio_i2c {
>> +??? struct virtio_device *vdev;
>> +??? struct completion completion;
>> +??? struct i2c_adapter adap;
>> +??? struct mutex i2c_lock;
>> +??? struct virtqueue *vq;
>> +};
>> +
>> +static void virtio_i2c_msg_done(struct virtqueue *vq)
>> +{
>> +??? struct virtio_i2c *vi = vq->vdev->priv;
>> +
>> +??? complete(&vi->completion);
&...