Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-29 Thread Federico Vaga
On Monday, October 29, 2018 2:04:13 PM CET Peter Korsgaard wrote: > > I think that something like this could be better > > > > (2) usleep_range(sleep_min, sleep_min * XXX); > > > > But. > > Since it is better to make this patch ready for xfer_irqless, then I will > > definitively go for

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-29 Thread Federico Vaga
On Monday, October 29, 2018 2:04:13 PM CET Peter Korsgaard wrote: > > I think that something like this could be better > > > > (2) usleep_range(sleep_min, sleep_min * XXX); > > > > But. > > Since it is better to make this patch ready for xfer_irqless, then I will > > definitively go for

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-29 Thread Peter Korsgaard
> "Federico" == Federico Vaga writes: Hi, >> >> Where does this 10 come from? >> > >> > It's true, it's just a random number. It can be zero as well, and we ask >> > the system to just sleep for that amount of time. >> > >> > (1) usleep_range(sleep_min, sleep_min); >> >> Or just

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-29 Thread Peter Korsgaard
> "Federico" == Federico Vaga writes: Hi, >> >> Where does this 10 come from? >> > >> > It's true, it's just a random number. It can be zero as well, and we ask >> > the system to just sleep for that amount of time. >> > >> > (1) usleep_range(sleep_min, sleep_min); >> >> Or just

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-29 Thread Federico Vaga
Hi Peter, On Friday, October 26, 2018 7:45:29 PM CET Peter Korsgaard wrote: > > "Federico" == Federico Vaga writes: > Hi, > > >> > - } else > >> > + } else { > >> > > >> > msg->buf[i2c->pos++] = oc_getreg(i2c, OCI2C_DATA); > >> > > >> > + } > >> >

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-29 Thread Federico Vaga
Hi Peter, On Friday, October 26, 2018 7:45:29 PM CET Peter Korsgaard wrote: > > "Federico" == Federico Vaga writes: > Hi, > > >> > - } else > >> > + } else { > >> > > >> > msg->buf[i2c->pos++] = oc_getreg(i2c, OCI2C_DATA); > >> > > >> > + } > >> >

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-26 Thread Peter Korsgaard
> "Federico" == Federico Vaga writes: Hi, >> > - } else >> > + } else { >> > >> > msg->buf[i2c->pos++] = oc_getreg(i2c, OCI2C_DATA); >> > >> > + } >> >> This looks unrelated to $SUBJECT. > Do you prefer a different patch just for styling? Yes

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-26 Thread Peter Korsgaard
> "Federico" == Federico Vaga writes: Hi, >> > - } else >> > + } else { >> > >> > msg->buf[i2c->pos++] = oc_getreg(i2c, OCI2C_DATA); >> > >> > + } >> >> This looks unrelated to $SUBJECT. > Do you prefer a different patch just for styling? Yes

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-25 Thread Federico Vaga
(sorry for the noise, peter's email I had does not exist, so I'm resending this email with the correct address) On Sunday, October 21, 2018 4:39:07 PM CEST Peter Korsgaard wrote: > On Mon, Jun 25, 2018 at 6:14 PM Federico Vaga wrote: > > This driver assumes that an interrupt line is always

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-25 Thread Federico Vaga
(sorry for the noise, peter's email I had does not exist, so I'm resending this email with the correct address) On Sunday, October 21, 2018 4:39:07 PM CEST Peter Korsgaard wrote: > On Mon, Jun 25, 2018 at 6:14 PM Federico Vaga wrote: > > This driver assumes that an interrupt line is always

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-24 Thread Federico Vaga
On Sunday, October 21, 2018 4:39:07 PM CEST Peter Korsgaard wrote: > On Mon, Jun 25, 2018 at 6:14 PM Federico Vaga wrote: > > This driver assumes that an interrupt line is always available for > > the I2C master. This is not always the case and this patch adds support > > for a polling version

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-24 Thread Federico Vaga
On Sunday, October 21, 2018 4:39:07 PM CEST Peter Korsgaard wrote: > On Mon, Jun 25, 2018 at 6:14 PM Federico Vaga wrote: > > This driver assumes that an interrupt line is always available for > > the I2C master. This is not always the case and this patch adds support > > for a polling version

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-21 Thread Peter Korsgaard
On Mon, Jun 25, 2018 at 6:14 PM Federico Vaga wrote: > > This driver assumes that an interrupt line is always available for > the I2C master. This is not always the case and this patch adds support > for a polling version based on workqueue. It probably makes sense to make it the switch between

Re: [PATCH 3/3] i2c:ocores: add polling interface

2018-10-21 Thread Peter Korsgaard
On Mon, Jun 25, 2018 at 6:14 PM Federico Vaga wrote: > > This driver assumes that an interrupt line is always available for > the I2C master. This is not always the case and this patch adds support > for a polling version based on workqueue. It probably makes sense to make it the switch between

[PATCH 3/3] i2c:ocores: add polling interface

2018-06-25 Thread Federico Vaga
This driver assumes that an interrupt line is always available for the I2C master. This is not always the case and this patch adds support for a polling version based on workqueue. Signed-off-by: Federico Vaga --- drivers/i2c/busses/i2c-ocores.c | 94 ++--- 1

[PATCH 3/3] i2c:ocores: add polling interface

2018-06-25 Thread Federico Vaga
This driver assumes that an interrupt line is always available for the I2C master. This is not always the case and this patch adds support for a polling version based on workqueue. Signed-off-by: Federico Vaga --- drivers/i2c/busses/i2c-ocores.c | 94 ++--- 1