Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1591161
| From | Jarkko Nikula <jarkko.nikula@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH v6 5/6] i2c: designware: add SLAVE mode functions |
| Date | 2017-03-02 16:00 +0100 |
| Message-ID | <tgAn1-3FV-39@gated-at.bofh.it> (permalink) |
| References | <tgf8S-5xo-3@gated-at.bofh.it> <tgf8T-5xo-57@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/01/17 17:59, Luis Oliveira wrote:
> - Changes in Kconfig to enable I2C_DESIGNWARE_SLAVE support
> - Slave functions added to core library file
> - Slave abort sources added to common source file
> - New driver: i2c-designware-slave added
> - Changes in the Makefile to compile the I2C_DESIGNWARE_SLAVE module
> when supported by the architecture.
>
> All the SLAVE flow is added but it is not enabled via platform
> driver.
>
> Signed-off-by: Luis Oliveira <lolivei@synopsys.com>
> ---
> V5->V6
> - Enable Slave mode using a different option (kbuild reported an error)
> - Identation fixes needed
> - Changed debug prints to dev_vdbg
> - Fixed slave enumeration
>
> drivers/i2c/busses/Kconfig | 14 +-
> drivers/i2c/busses/Makefile | 1 +
> drivers/i2c/busses/i2c-designware-common.c | 7 +
> drivers/i2c/busses/i2c-designware-core.h | 3 +
> drivers/i2c/busses/i2c-designware-slave.c | 403 +++++++++++++++++++++++++++++
> 5 files changed, 427 insertions(+), 1 deletion(-)
> create mode 100644 drivers/i2c/busses/i2c-designware-slave.c
>
...
> diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
> index 6357c7c78f6d..24641635aa20 100644
> --- a/drivers/i2c/busses/i2c-designware-common.c
> +++ b/drivers/i2c/busses/i2c-designware-common.c
> @@ -56,6 +56,13 @@ static char *abort_sources[] = {
> "trying to use disabled adapter",
> [ARB_LOST] =
> "lost arbitration",
> + [ABRT_SLAVE_FLUSH_TXFIFO] =
> + "read command so flush old data in the TX FIFO",
> + [ABRT_SLAVE_ARBLOST] =
> + "slave lost the bus while transmitting data to a remote master",
> + [ABRT_SLAVE_RD_INTX] =
> + "slave request for data to be transmitted and there is a 1 in "
> + "bit 8 of IC_DATA_CMD",
> };
I know ABRT_SLAVE_RD_INTX case is from the specification but I would
prefer here one-line error text so it will be easier to grep from sources.
I would like it to be also be more understandable. I don't know did I
understood it correctly but does it occur when attempting to read
controller while transmitting or something like that?
> diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h
> index b620d76ffc8d..6c70945cccea 100644
> --- a/drivers/i2c/busses/i2c-designware-core.h
> +++ b/drivers/i2c/busses/i2c-designware-core.h
> @@ -277,6 +277,7 @@ struct dw_i2c_dev {
> void (*disable)(struct dw_i2c_dev *dev);
> void (*disable_int)(struct dw_i2c_dev *dev);
> int (*init)(struct dw_i2c_dev *dev);
> + bool mode;
> };
>
As I mentioned add here comment for "mode" not in patch 4/6.
--
Jarkko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RESEND PATCH v6 0/6] i2c: designware: add I2C SLAVE support Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-01 17:20 +0100
[RESEND PATCH v6 1/6] i2c: designware: Cleaning and comment style fixes. Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-01 17:20 +0100
[RESEND PATCH v6 4/6] i2c: designware: introducing I2C_SLAVE definitions Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-01 17:20 +0100
Re: [RESEND PATCH v6 4/6] i2c: designware: introducing I2C_SLAVE definitions Jarkko Nikula <jarkko.nikula@linux.intel.com> - 2017-03-02 15:00 +0100
[RESEND PATCH v6 6/6] i2c: designware: enable SLAVE in platform module Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-01 17:20 +0100
[RESEND PATCH v6 2/6] i2c: designware: refactoring of the i2c-designware Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-01 17:20 +0100
Re: [RESEND PATCH v6 2/6] i2c: designware: refactoring of the i2c-designware Jarkko Nikula <jarkko.nikula@linux.intel.com> - 2017-03-02 15:00 +0100
[RESEND PATCH v6 5/6] i2c: designware: add SLAVE mode functions Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-01 17:20 +0100
Re: [RESEND PATCH v6 5/6] i2c: designware: add SLAVE mode functions Jarkko Nikula <jarkko.nikula@linux.intel.com> - 2017-03-02 16:00 +0100
Re: [RESEND PATCH v6 5/6] i2c: designware: add SLAVE mode functions Luis Oliveira <Luis.Oliveira@synopsys.com> - 2017-03-02 17:00 +0100
csiph-web