* [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
@ 2020-06-23 6:31 Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 1/3] " Philippe Mathieu-Daudé
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-23 6:31 UTC (permalink / raw)
To: qemu-devel, BALATON Zoltan
Cc: Corey Minyard, qemu-ppc, Philippe Mathieu-Daudé,
David Gibson
This is v2 of Zoltan's patch:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
- rebased
- added docstring
- include hw/misc/auxbus.c fix
Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
BALATON Zoltan (2):
i2c: Match parameters of i2c_start_transfer and i2c_send_recv
i2c: Make i2c_start_transfer() direction argument a boolean
Philippe Mathieu-Daudé (1):
hw/misc/auxbus: Fix MOT/classic I2C mode
include/hw/i2c/i2c.h | 22 ++++++++++++++++++++--
hw/display/sm501.c | 4 ++--
hw/i2c/core.c | 36 ++++++++++++++++++------------------
hw/i2c/ppc4xx_i2c.c | 2 +-
hw/misc/auxbus.c | 10 +++++-----
5 files changed, 46 insertions(+), 28 deletions(-)
--
2.21.3
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2020-06-23 6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
@ 2020-06-23 6:31 ` Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 2/3] i2c: Make i2c_start_transfer() direction argument a boolean Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-23 6:31 UTC (permalink / raw)
To: qemu-devel, BALATON Zoltan
Cc: Corey Minyard, qemu-ppc, Philippe Mathieu-Daudé,
David Gibson
From: BALATON Zoltan <balaton@eik.bme.hu>
These functions have a parameter that decides the direction of
transfer but totally confusingly they don't match but inverted sense.
To avoid frequent mistakes when using these functions change
i2c_send_recv to match i2c_start_transfer.
Rename i2c_send_recv() as i2c_recv_send() and rename the 'send'
argument as 'is_recv' (its boolean opposite). Invert the logic
in i2c_recv_send() to not use inverted boolean value check.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20200621145235.9E241745712@zero.eik.bme.hu>
[PMD: Split patch, added docstring]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/i2c/i2c.h | 11 ++++++++++-
hw/display/sm501.c | 4 ++--
hw/i2c/core.c | 32 ++++++++++++++++----------------
hw/i2c/ppc4xx_i2c.c | 2 +-
hw/misc/auxbus.c | 4 ++--
5 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
index 4117211565..bc70c5b43d 100644
--- a/include/hw/i2c/i2c.h
+++ b/include/hw/i2c/i2c.h
@@ -75,7 +75,16 @@ int i2c_bus_busy(I2CBus *bus);
int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv);
void i2c_end_transfer(I2CBus *bus);
void i2c_nack(I2CBus *bus);
-int i2c_send_recv(I2CBus *bus, uint8_t *data, bool send);
+/**
+ * i2c_recv_send: receive from or send to an I2C bus.
+ *
+ * @bus: #I2CBus to be used
+ * @data: buffer with the data transferred
+ * @is_recv: indicates the transfer direction
+ *
+ * Returns: 0 on success, -1 on error
+ */
+int i2c_recv_send(I2CBus *bus, uint8_t *data, bool is_recv);
int i2c_send(I2CBus *bus, uint8_t data);
uint8_t i2c_recv(I2CBus *bus);
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index a7fc08c52b..56e35cf4ae 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -1040,8 +1040,8 @@ static void sm501_i2c_write(void *opaque, hwaddr addr, uint64_t value,
SM501_DPRINTF("sm501 i2c : transferring %d bytes to 0x%x\n",
s->i2c_byte_count + 1, s->i2c_addr >> 1);
for (i = 0; i <= s->i2c_byte_count; i++) {
- res = i2c_send_recv(s->i2c_bus, &s->i2c_data[i],
- !(s->i2c_addr & 1));
+ res = i2c_recv_send(s->i2c_bus, &s->i2c_data[i],
+ s->i2c_addr & 1);
if (res) {
SM501_DPRINTF("sm501 i2c : transfer failed"
" i=%d, res=%d\n", i, res);
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index 1aac457a2a..b83c2b5b89 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -175,26 +175,14 @@ void i2c_end_transfer(I2CBus *bus)
bus->broadcast = false;
}
-int i2c_send_recv(I2CBus *bus, uint8_t *data, bool send)
+int i2c_recv_send(I2CBus *bus, uint8_t *data, bool is_recv)
{
I2CSlaveClass *sc;
I2CSlave *s;
I2CNode *node;
int ret = 0;
- if (send) {
- QLIST_FOREACH(node, &bus->current_devs, next) {
- s = node->elt;
- sc = I2C_SLAVE_GET_CLASS(s);
- if (sc->send) {
- trace_i2c_send(s->address, *data);
- ret = ret || sc->send(s, *data);
- } else {
- ret = -1;
- }
- }
- return ret ? -1 : 0;
- } else {
+ if (is_recv) {
ret = 0xff;
if (!QLIST_EMPTY(&bus->current_devs) && !bus->broadcast) {
sc = I2C_SLAVE_GET_CLASS(QLIST_FIRST(&bus->current_devs)->elt);
@@ -206,19 +194,31 @@ int i2c_send_recv(I2CBus *bus, uint8_t *data, bool send)
}
*data = ret;
return 0;
+ } else {
+ QLIST_FOREACH(node, &bus->current_devs, next) {
+ s = node->elt;
+ sc = I2C_SLAVE_GET_CLASS(s);
+ if (sc->send) {
+ trace_i2c_send(s->address, *data);
+ ret = ret || sc->send(s, *data);
+ } else {
+ ret = -1;
+ }
+ }
+ return ret ? -1 : 0;
}
}
int i2c_send(I2CBus *bus, uint8_t data)
{
- return i2c_send_recv(bus, &data, true);
+ return i2c_recv_send(bus, &data, false);
}
uint8_t i2c_recv(I2CBus *bus)
{
uint8_t data = 0xff;
- i2c_send_recv(bus, &data, false);
+ i2c_recv_send(bus, &data, true);
return data;
}
diff --git a/hw/i2c/ppc4xx_i2c.c b/hw/i2c/ppc4xx_i2c.c
index c0a8e04567..f0b0de19b0 100644
--- a/hw/i2c/ppc4xx_i2c.c
+++ b/hw/i2c/ppc4xx_i2c.c
@@ -239,7 +239,7 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value,
}
}
if (!(i2c->sts & IIC_STS_ERR) &&
- i2c_send_recv(i2c->bus, &i2c->mdata[i], !recv)) {
+ i2c_recv_send(i2c->bus, &i2c->mdata[i], recv)) {
i2c->sts |= IIC_STS_ERR;
i2c->extsts |= IIC_EXTSTS_XFRA;
break;
diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index da361baa32..cef0d0d6d0 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -148,7 +148,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
ret = AUX_I2C_ACK;
while (len > 0) {
- if (i2c_send_recv(i2c_bus, data++, is_write) < 0) {
+ if (i2c_recv_send(i2c_bus, data++, is_write) < 0) {
ret = AUX_I2C_NACK;
break;
}
@@ -189,7 +189,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
bus->last_transaction = cmd;
bus->last_i2c_address = address;
while (len > 0) {
- if (i2c_send_recv(i2c_bus, data++, is_write) < 0) {
+ if (i2c_recv_send(i2c_bus, data++, is_write) < 0) {
i2c_end_transfer(i2c_bus);
break;
}
--
2.21.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] i2c: Make i2c_start_transfer() direction argument a boolean
2020-06-23 6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 1/3] " Philippe Mathieu-Daudé
@ 2020-06-23 6:31 ` Philippe Mathieu-Daudé
2020-06-23 6:31 ` [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-23 6:31 UTC (permalink / raw)
To: qemu-devel, BALATON Zoltan
Cc: Corey Minyard, qemu-ppc, Philippe Mathieu-Daudé,
David Gibson
From: BALATON Zoltan <balaton@eik.bme.hu>
Make the argument representing the direction of the transfer a
boolean type.
Rename the boolean argument as 'is_recv' to match i2c_recv_send().
Document the function prototype.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20200621145235.9E241745712@zero.eik.bme.hu>
[PMD: Split patch, added docstring]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/i2c/i2c.h | 11 ++++++++++-
hw/i2c/core.c | 4 ++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
index bc70c5b43d..a9e725bd6f 100644
--- a/include/hw/i2c/i2c.h
+++ b/include/hw/i2c/i2c.h
@@ -72,7 +72,16 @@ struct I2CBus {
I2CBus *i2c_init_bus(DeviceState *parent, const char *name);
void i2c_set_slave_address(I2CSlave *dev, uint8_t address);
int i2c_bus_busy(I2CBus *bus);
-int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv);
+/**
+ * i2c_start_transfer: start a transfer on an I2C bus.
+ *
+ * @bus: #I2CBus to be used
+ * @address: address of the slave
+ * @is_recv: indicates the transfer direction
+ *
+ * Returns: 0 on success, -1 on error
+ */
+int i2c_start_transfer(I2CBus *bus, uint8_t address, bool is_recv);
void i2c_end_transfer(I2CBus *bus);
void i2c_nack(I2CBus *bus);
/**
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index b83c2b5b89..6f091837c9 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -91,7 +91,7 @@ int i2c_bus_busy(I2CBus *bus)
* without releasing the bus. If that fails, the bus is still
* in a transaction.
*/
-int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv)
+int i2c_start_transfer(I2CBus *bus, uint8_t address, bool is_recv)
{
BusChild *kid;
I2CSlaveClass *sc;
@@ -144,7 +144,7 @@ int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv)
if (sc->event) {
trace_i2c_event("start", s->address);
- rv = sc->event(s, recv ? I2C_START_RECV : I2C_START_SEND);
+ rv = sc->event(s, is_recv ? I2C_START_RECV : I2C_START_SEND);
if (rv && !bus->broadcast) {
if (bus_scanned) {
/* First call, terminate the transfer. */
--
2.21.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode
2020-06-23 6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 1/3] " Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 2/3] i2c: Make i2c_start_transfer() direction argument a boolean Philippe Mathieu-Daudé
@ 2020-06-23 6:31 ` Philippe Mathieu-Daudé
2020-06-23 11:06 ` BALATON Zoltan
2020-07-04 16:54 ` [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2021-06-12 19:33 ` BALATON Zoltan
4 siblings, 1 reply; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-23 6:31 UTC (permalink / raw)
To: qemu-devel, BALATON Zoltan
Cc: Corey Minyard, Peter Maydell, Alistair Francis,
Philippe Mathieu-Daudé, qemu-ppc, Frederic Konrad,
David Gibson
Since its introduction in commit 6fc7f77fd2 i2c_start_transfer()
uses incorrectly the direction of the transfer. Fix it now.
Fixes: 6fc7f77fd2 ("introduce aux-bus")
Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
RFC because untested (probably never was anyway)
Cc: Frederic Konrad <konrad@adacore.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
---
hw/misc/auxbus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index cef0d0d6d0..dc4a5dd10d 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -141,7 +141,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
i2c_end_transfer(i2c_bus);
}
- if (i2c_start_transfer(i2c_bus, address, is_write)) {
+ if (i2c_start_transfer(i2c_bus, address, !is_write)) {
ret = AUX_I2C_NACK;
break;
}
@@ -172,7 +172,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
/*
* No transactions started..
*/
- if (i2c_start_transfer(i2c_bus, address, is_write)) {
+ if (i2c_start_transfer(i2c_bus, address, !is_write)) {
break;
}
} else if ((address != bus->last_i2c_address) ||
@@ -181,7 +181,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
* Transaction started but we need to restart..
*/
i2c_end_transfer(i2c_bus);
- if (i2c_start_transfer(i2c_bus, address, is_write)) {
+ if (i2c_start_transfer(i2c_bus, address, !is_write)) {
break;
}
}
--
2.21.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode
2020-06-23 6:31 ` [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode Philippe Mathieu-Daudé
@ 2020-06-23 11:06 ` BALATON Zoltan
2020-07-04 16:54 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 13+ messages in thread
From: BALATON Zoltan @ 2020-06-23 11:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Corey Minyard, Peter Maydell, Alistair Francis, qemu-devel,
qemu-ppc, Frederic Konrad, David Gibson
[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]
On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
> Since its introduction in commit 6fc7f77fd2 i2c_start_transfer()
> uses incorrectly the direction of the transfer. Fix it now.
>
> Fixes: 6fc7f77fd2 ("introduce aux-bus")
> Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
> Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
One of the above is probably enough, maybe Reported-by because I wasn't
sure what's the solution. I'm also happy with your changes to the whole
series, thanks for fixing it.
Regards,
BALATON Zoltan
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> RFC because untested (probably never was anyway)
> Cc: Frederic Konrad <konrad@adacore.com>
> Cc: Alistair Francis <alistair@alistair23.me>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/misc/auxbus.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
> index cef0d0d6d0..dc4a5dd10d 100644
> --- a/hw/misc/auxbus.c
> +++ b/hw/misc/auxbus.c
> @@ -141,7 +141,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
> i2c_end_transfer(i2c_bus);
> }
>
> - if (i2c_start_transfer(i2c_bus, address, is_write)) {
> + if (i2c_start_transfer(i2c_bus, address, !is_write)) {
> ret = AUX_I2C_NACK;
> break;
> }
> @@ -172,7 +172,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
> /*
> * No transactions started..
> */
> - if (i2c_start_transfer(i2c_bus, address, is_write)) {
> + if (i2c_start_transfer(i2c_bus, address, !is_write)) {
> break;
> }
> } else if ((address != bus->last_i2c_address) ||
> @@ -181,7 +181,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd, uint32_t address,
> * Transaction started but we need to restart..
> */
> i2c_end_transfer(i2c_bus);
> - if (i2c_start_transfer(i2c_bus, address, is_write)) {
> + if (i2c_start_transfer(i2c_bus, address, !is_write)) {
> break;
> }
> }
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode
2020-06-23 11:06 ` BALATON Zoltan
@ 2020-07-04 16:54 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-04 16:54 UTC (permalink / raw)
To: BALATON Zoltan
Cc: Corey Minyard, Peter Maydell, Alistair Francis, qemu-devel,
qemu-ppc, Frederic Konrad, David Gibson
On 6/23/20 1:06 PM, BALATON Zoltan wrote:
> On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
>> Since its introduction in commit 6fc7f77fd2 i2c_start_transfer()
>> uses incorrectly the direction of the transfer. Fix it now.
>>
>> Fixes: 6fc7f77fd2 ("introduce aux-bus")
>> Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
>> Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
>
> One of the above is probably enough, maybe Reported-by because I wasn't
> sure what's the solution. I'm also happy with your changes to the whole
> series, thanks for fixing it.
Hopefully the maintainer taking this series can simply remove
the Suggested-by tag directly. Else I can respin if it is easier.
>
> Regards,
> BALATON Zoltan
>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> RFC because untested (probably never was anyway)
>> Cc: Frederic Konrad <konrad@adacore.com>
>> Cc: Alistair Francis <alistair@alistair23.me>
>> Cc: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> hw/misc/auxbus.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
>> index cef0d0d6d0..dc4a5dd10d 100644
>> --- a/hw/misc/auxbus.c
>> +++ b/hw/misc/auxbus.c
>> @@ -141,7 +141,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd,
>> uint32_t address,
>> i2c_end_transfer(i2c_bus);
>> }
>>
>> - if (i2c_start_transfer(i2c_bus, address, is_write)) {
>> + if (i2c_start_transfer(i2c_bus, address, !is_write)) {
>> ret = AUX_I2C_NACK;
>> break;
>> }
>> @@ -172,7 +172,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd,
>> uint32_t address,
>> /*
>> * No transactions started..
>> */
>> - if (i2c_start_transfer(i2c_bus, address, is_write)) {
>> + if (i2c_start_transfer(i2c_bus, address, !is_write)) {
>> break;
>> }
>> } else if ((address != bus->last_i2c_address) ||
>> @@ -181,7 +181,7 @@ AUXReply aux_request(AUXBus *bus, AUXCommand cmd,
>> uint32_t address,
>> * Transaction started but we need to restart..
>> */
>> i2c_end_transfer(i2c_bus);
>> - if (i2c_start_transfer(i2c_bus, address, is_write)) {
>> + if (i2c_start_transfer(i2c_bus, address, !is_write)) {
>> break;
>> }
>> }
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2020-06-23 6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-06-23 6:31 ` [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode Philippe Mathieu-Daudé
@ 2020-07-04 16:54 ` Philippe Mathieu-Daudé
2021-06-12 19:33 ` BALATON Zoltan
4 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-04 16:54 UTC (permalink / raw)
To: qemu-devel, BALATON Zoltan; +Cc: Corey Minyard, qemu-ppc, David Gibson
ping?
On 6/23/20 8:31 AM, Philippe Mathieu-Daudé wrote:
> This is v2 of Zoltan's patch:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
>
> - rebased
> - added docstring
> - include hw/misc/auxbus.c fix
>
> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
>
> BALATON Zoltan (2):
> i2c: Match parameters of i2c_start_transfer and i2c_send_recv
> i2c: Make i2c_start_transfer() direction argument a boolean
>
> Philippe Mathieu-Daudé (1):
> hw/misc/auxbus: Fix MOT/classic I2C mode
>
> include/hw/i2c/i2c.h | 22 ++++++++++++++++++++--
> hw/display/sm501.c | 4 ++--
> hw/i2c/core.c | 36 ++++++++++++++++++------------------
> hw/i2c/ppc4xx_i2c.c | 2 +-
> hw/misc/auxbus.c | 10 +++++-----
> 5 files changed, 46 insertions(+), 28 deletions(-)
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2020-06-23 6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2020-07-04 16:54 ` [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
@ 2021-06-12 19:33 ` BALATON Zoltan
2021-06-14 9:56 ` Philippe Mathieu-Daudé
4 siblings, 1 reply; 13+ messages in thread
From: BALATON Zoltan @ 2021-06-12 19:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Corey Minyard, qemu-ppc, qemu-devel, David Gibson
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
Hello,
On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
> This is v2 of Zoltan's patch:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
>
> - rebased
> - added docstring
> - include hw/misc/auxbus.c fix
>
> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
What happened to this series? I did not find it in patchew, only my
original patch:
https://patchew.org/QEMU/20200621145235.9E241745712@zero.eik.bme.hu/
I still have this in one of my branches so I think it was not merged at
the end. Could this be resurrected or should I forget about it and live
with the inconsistency in parameters instead?
Regards,
BALATON Zoltan
> BALATON Zoltan (2):
> i2c: Match parameters of i2c_start_transfer and i2c_send_recv
> i2c: Make i2c_start_transfer() direction argument a boolean
>
> Philippe Mathieu-Daudé (1):
> hw/misc/auxbus: Fix MOT/classic I2C mode
>
> include/hw/i2c/i2c.h | 22 ++++++++++++++++++++--
> hw/display/sm501.c | 4 ++--
> hw/i2c/core.c | 36 ++++++++++++++++++------------------
> hw/i2c/ppc4xx_i2c.c | 2 +-
> hw/misc/auxbus.c | 10 +++++-----
> 5 files changed, 46 insertions(+), 28 deletions(-)
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2021-06-12 19:33 ` BALATON Zoltan
@ 2021-06-14 9:56 ` Philippe Mathieu-Daudé
2021-06-14 10:02 ` BALATON Zoltan
0 siblings, 1 reply; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-06-14 9:56 UTC (permalink / raw)
To: BALATON Zoltan; +Cc: Corey Minyard, qemu-ppc, qemu-devel, David Gibson
On 6/12/21 9:33 PM, BALATON Zoltan wrote:
> Hello,
>
> On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
>> This is v2 of Zoltan's patch:
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
>>
>> - rebased
>> - added docstring
>> - include hw/misc/auxbus.c fix
>>
>> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
>
> What happened to this series? I did not find it in patchew, only my
> original patch:
>
> https://patchew.org/QEMU/20200621145235.9E241745712@zero.eik.bme.hu/
>
> I still have this in one of my branches so I think it was not merged at
> the end. Could this be resurrected or should I forget about it and live
> with the inconsistency in parameters instead?
I suppose it was not queued because you asked to remove the
"Reported-by" tag :/ I agree with you it would be nice to get this in
the tree
for good. However 1 year passed, so it might need adjustment.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2021-06-14 9:56 ` Philippe Mathieu-Daudé
@ 2021-06-14 10:02 ` BALATON Zoltan
2021-06-14 16:48 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 13+ messages in thread
From: BALATON Zoltan @ 2021-06-14 10:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Corey Minyard, qemu-ppc, qemu-devel, David Gibson
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
On Mon, 14 Jun 2021, Philippe Mathieu-Daudé wrote:
> On 6/12/21 9:33 PM, BALATON Zoltan wrote:
>> Hello,
>>
>> On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
>>> This is v2 of Zoltan's patch:
>>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
>>>
>>> - rebased
>>> - added docstring
>>> - include hw/misc/auxbus.c fix
>>>
>>> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
>>
>> What happened to this series? I did not find it in patchew, only my
>> original patch:
>>
>> https://patchew.org/QEMU/20200621145235.9E241745712@zero.eik.bme.hu/
>>
>> I still have this in one of my branches so I think it was not merged at
>> the end. Could this be resurrected or should I forget about it and live
>> with the inconsistency in parameters instead?
>
> I suppose it was not queued because you asked to remove the
> "Reported-by" tag :/ I agree with you it would be nice to get this in
> the tree
I think I said only Reported-by is enough no need for Suggested-by as well
but I don't see this as a reason to drop these patches. So maybe just
nobody cared enough.
> for good. However 1 year passed, so it might need adjustment.
Should I try to rebase it or will you do it eventually?
Regards,
BALATON Zoltan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2021-06-14 10:02 ` BALATON Zoltan
@ 2021-06-14 16:48 ` Philippe Mathieu-Daudé
2021-06-14 19:34 ` Corey Minyard
0 siblings, 1 reply; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-06-14 16:48 UTC (permalink / raw)
To: BALATON Zoltan; +Cc: Corey Minyard, qemu-ppc, qemu-devel, David Gibson
On 6/14/21 12:02 PM, BALATON Zoltan wrote:
> On Mon, 14 Jun 2021, Philippe Mathieu-Daudé wrote:
>> On 6/12/21 9:33 PM, BALATON Zoltan wrote:
>>> Hello,
>>>
>>> On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
>>>> This is v2 of Zoltan's patch:
>>>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
>>>>
>>>> - rebased
>>>> - added docstring
>>>> - include hw/misc/auxbus.c fix
>>>>
>>>> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
>>>
>>> What happened to this series? I did not find it in patchew, only my
>>> original patch:
>>>
>>> https://patchew.org/QEMU/20200621145235.9E241745712@zero.eik.bme.hu/
>>>
>>> I still have this in one of my branches so I think it was not merged at
>>> the end. Could this be resurrected or should I forget about it and live
>>> with the inconsistency in parameters instead?
>>
>> I suppose it was not queued because you asked to remove the
>> "Reported-by" tag :/ I agree with you it would be nice to get this in
>> the tree
>
> I think I said only Reported-by is enough no need for Suggested-by as
> well but I don't see this as a reason to drop these patches. So maybe
> just nobody cared enough.
Ah OK now got it.
>> for good. However 1 year passed, so it might need adjustment.
>
> Should I try to rebase it or will you do it eventually?
Found the branch and clean rebase, so no change needed.
Corey, if you are busy, I could send a pull request if you provide
and Acked-by tag.
Regards,
Phil.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2021-06-14 16:48 ` Philippe Mathieu-Daudé
@ 2021-06-14 19:34 ` Corey Minyard
2021-06-16 15:09 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 13+ messages in thread
From: Corey Minyard @ 2021-06-14 19:34 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Corey Minyard, David Gibson, qemu-ppc, qemu-devel
On Mon, Jun 14, 2021 at 06:48:05PM +0200, Philippe Mathieu-Daudé wrote:
> On 6/14/21 12:02 PM, BALATON Zoltan wrote:
> > On Mon, 14 Jun 2021, Philippe Mathieu-Daudé wrote:
> >> On 6/12/21 9:33 PM, BALATON Zoltan wrote:
> >>> Hello,
> >>>
> >>> On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
> >>>> This is v2 of Zoltan's patch:
> >>>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
> >>>>
> >>>> - rebased
> >>>> - added docstring
> >>>> - include hw/misc/auxbus.c fix
> >>>>
> >>>> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
> >>>
> >>> What happened to this series? I did not find it in patchew, only my
> >>> original patch:
> >>>
> >>> https://patchew.org/QEMU/20200621145235.9E241745712@zero.eik.bme.hu/
> >>>
> >>> I still have this in one of my branches so I think it was not merged at
> >>> the end. Could this be resurrected or should I forget about it and live
> >>> with the inconsistency in parameters instead?
> >>
> >> I suppose it was not queued because you asked to remove the
> >> "Reported-by" tag :/ I agree with you it would be nice to get this in
> >> the tree
> >
> > I think I said only Reported-by is enough no need for Suggested-by as
> > well but I don't see this as a reason to drop these patches. So maybe
> > just nobody cared enough.
>
> Ah OK now got it.
>
> >> for good. However 1 year passed, so it might need adjustment.
> >
> > Should I try to rebase it or will you do it eventually?
>
> Found the branch and clean rebase, so no change needed.
>
> Corey, if you are busy, I could send a pull request if you provide
> and Acked-by tag.
I'm somewhat worried about the silent semantic change. I would much
prefer the functions to be renamed, as you mentioned in an email a while
ago. I think that you mentioned this in an email in the chain listed
above, and I think I pulled it for that reason.
-corey
>
> Regards,
>
> Phil.
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv
2021-06-14 19:34 ` Corey Minyard
@ 2021-06-16 15:09 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-06-16 15:09 UTC (permalink / raw)
To: minyard; +Cc: Corey Minyard, qemu-ppc, qemu-devel, David Gibson
On 6/14/21 9:34 PM, Corey Minyard wrote:
> On Mon, Jun 14, 2021 at 06:48:05PM +0200, Philippe Mathieu-Daudé wrote:
>> On 6/14/21 12:02 PM, BALATON Zoltan wrote:
>>> On Mon, 14 Jun 2021, Philippe Mathieu-Daudé wrote:
>>>> On 6/12/21 9:33 PM, BALATON Zoltan wrote:
>>>>> Hello,
>>>>>
>>>>> On Tue, 23 Jun 2020, Philippe Mathieu-Daudé wrote:
>>>>>> This is v2 of Zoltan's patch:
>>>>>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg714711.html
>>>>>>
>>>>>> - rebased
>>>>>> - added docstring
>>>>>> - include hw/misc/auxbus.c fix
>>>>>>
>>>>>> Supersedes: <20200621145235.9E241745712@zero.eik.bme.hu>
>>>>>
>>>>> What happened to this series? I did not find it in patchew, only my
>>>>> original patch:
>>>>>
>>>>> https://patchew.org/QEMU/20200621145235.9E241745712@zero.eik.bme.hu/
>>>>>
>>>>> I still have this in one of my branches so I think it was not merged at
>>>>> the end. Could this be resurrected or should I forget about it and live
>>>>> with the inconsistency in parameters instead?
>>>>
>>>> I suppose it was not queued because you asked to remove the
>>>> "Reported-by" tag :/ I agree with you it would be nice to get this in
>>>> the tree
>>>
>>> I think I said only Reported-by is enough no need for Suggested-by as
>>> well but I don't see this as a reason to drop these patches. So maybe
>>> just nobody cared enough.
>>
>> Ah OK now got it.
>>
>>>> for good. However 1 year passed, so it might need adjustment.
>>>
>>> Should I try to rebase it or will you do it eventually?
>>
>> Found the branch and clean rebase, so no change needed.
>>
>> Corey, if you are busy, I could send a pull request if you provide
>> and Acked-by tag.
>
> I'm somewhat worried about the silent semantic change. I would much
> prefer the functions to be renamed, as you mentioned in an email a while
> ago. I think that you mentioned this in an email in the chain listed
> above, and I think I pulled it for that reason.
OK, maybe the comment was sent after this series or I missed it.
Thanks for the reminder.
Phil.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-06-16 15:10 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 6:31 [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 1/3] " Philippe Mathieu-Daudé
2020-06-23 6:31 ` [PATCH v2 2/3] i2c: Make i2c_start_transfer() direction argument a boolean Philippe Mathieu-Daudé
2020-06-23 6:31 ` [RFC PATCH v2 3/3] hw/misc/auxbus: Fix MOT/classic I2C mode Philippe Mathieu-Daudé
2020-06-23 11:06 ` BALATON Zoltan
2020-07-04 16:54 ` Philippe Mathieu-Daudé
2020-07-04 16:54 ` [PATCH v2 0/3] i2c: Match parameters of i2c_start_transfer and i2c_send_recv Philippe Mathieu-Daudé
2021-06-12 19:33 ` BALATON Zoltan
2021-06-14 9:56 ` Philippe Mathieu-Daudé
2021-06-14 10:02 ` BALATON Zoltan
2021-06-14 16:48 ` Philippe Mathieu-Daudé
2021-06-14 19:34 ` Corey Minyard
2021-06-16 15:09 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.