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

2019-02-11 Thread Federico Vaga
On Monday, February 11, 2019 11:25:26 AM CET Wolfram Sang wrote: > On Mon, Feb 11, 2019 at 09:31:20AM +0100, 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

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

2019-02-11 Thread Federico Vaga
On Monday, February 11, 2019 2:35:15 PM CET Peter Rosin wrote: > >>> @@ -294,7 +427,7 @@ static int ocores_init(struct device *dev, struct > >>> ocores_i2c *i2c) > >> > >> > >> > >>> > >>> > >>> > >>> /* Init the device */ > >>> oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); > >>> > >>> >

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

2019-02-11 Thread Peter Rosin
>>> @@ -294,7 +427,7 @@ static int ocores_init(struct device *dev, struct >>> ocores_i2c *i2c) >> >>> >>> >>> /* Init the device */ >>> oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); >>> >>> - oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_IEN | OCI2C_CTRL_EN); >>> + oc_setreg(i2c,

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

2019-02-11 Thread Federico Vaga
On Monday, February 11, 2019 11:43:45 AM CET Peter Rosin wrote: > On 2019-02-11 09:31, 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 v4 3/5] i2c:ocores: add polling interface

2019-02-11 Thread Peter Rosin
On 2019-02-11 09:31, 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. > > Report from Andrew Lunn: > > I did some timing tests for this. On my box, we

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

2019-02-11 Thread Wolfram Sang
On Mon, Feb 11, 2019 at 09:31:20AM +0100, 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. > > Report from Andrew Lunn: > > I did some timing tests for

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

2019-02-11 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. Report from Andrew Lunn: I did some timing tests for this. On my box, we request a udelay of 80uS. The kernel actually delays for