* [PATCH] i2c: aspeed: Fix initial values of master and slave state
@ 2018-07-02 21:20 ` Jae Hyun Yoo
0 siblings, 0 replies; 9+ messages in thread
From: Jae Hyun Yoo @ 2018-07-02 21:20 UTC (permalink / raw)
To: Brendan Higgins, Benjamin Herrenschmidt, Joel Stanley,
Andrew Jeffery, linux-i2c, openbmc, linux-arm-kernel,
linux-aspeed, linux-kernel
Cc: Jarkko Nikula, James Feist, Vernon Mauery, Jae Hyun Yoo
This patch changes the order of enum aspeed_i2c_master_state and
enum aspeed_i2c_slave_state defines to make their initial value to
ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
In case of multi-master use, if a slave data comes ahead of the
first master xfer, master_state starts from an invalid state so
this change fixes the issue.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
drivers/i2c/busses/i2c-aspeed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 60e4d0e939a3..2714c7fbe7c9 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -111,22 +111,22 @@
#define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
enum aspeed_i2c_master_state {
+ ASPEED_I2C_MASTER_INACTIVE,
ASPEED_I2C_MASTER_START,
ASPEED_I2C_MASTER_TX_FIRST,
ASPEED_I2C_MASTER_TX,
ASPEED_I2C_MASTER_RX_FIRST,
ASPEED_I2C_MASTER_RX,
ASPEED_I2C_MASTER_STOP,
- ASPEED_I2C_MASTER_INACTIVE,
};
enum aspeed_i2c_slave_state {
+ ASPEED_I2C_SLAVE_STOP,
ASPEED_I2C_SLAVE_START,
ASPEED_I2C_SLAVE_READ_REQUESTED,
ASPEED_I2C_SLAVE_READ_PROCESSED,
ASPEED_I2C_SLAVE_WRITE_REQUESTED,
ASPEED_I2C_SLAVE_WRITE_RECEIVED,
- ASPEED_I2C_SLAVE_STOP,
};
struct aspeed_i2c_bus {
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] i2c: aspeed: Fix initial values of master and slave state
@ 2018-07-02 21:20 ` Jae Hyun Yoo
0 siblings, 0 replies; 9+ messages in thread
From: Jae Hyun Yoo @ 2018-07-02 21:20 UTC (permalink / raw)
To: linux-arm-kernel
This patch changes the order of enum aspeed_i2c_master_state and
enum aspeed_i2c_slave_state defines to make their initial value to
ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
In case of multi-master use, if a slave data comes ahead of the
first master xfer, master_state starts from an invalid state so
this change fixes the issue.
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
---
drivers/i2c/busses/i2c-aspeed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 60e4d0e939a3..2714c7fbe7c9 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -111,22 +111,22 @@
#define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
enum aspeed_i2c_master_state {
+ ASPEED_I2C_MASTER_INACTIVE,
ASPEED_I2C_MASTER_START,
ASPEED_I2C_MASTER_TX_FIRST,
ASPEED_I2C_MASTER_TX,
ASPEED_I2C_MASTER_RX_FIRST,
ASPEED_I2C_MASTER_RX,
ASPEED_I2C_MASTER_STOP,
- ASPEED_I2C_MASTER_INACTIVE,
};
enum aspeed_i2c_slave_state {
+ ASPEED_I2C_SLAVE_STOP,
ASPEED_I2C_SLAVE_START,
ASPEED_I2C_SLAVE_READ_REQUESTED,
ASPEED_I2C_SLAVE_READ_PROCESSED,
ASPEED_I2C_SLAVE_WRITE_REQUESTED,
ASPEED_I2C_SLAVE_WRITE_RECEIVED,
- ASPEED_I2C_SLAVE_STOP,
};
struct aspeed_i2c_bus {
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] i2c: aspeed: Fix initial values of master and slave state
2018-07-02 21:20 ` Jae Hyun Yoo
(?)
@ 2018-07-11 5:47 ` Brendan Higgins
-1 siblings, 0 replies; 9+ messages in thread
From: Brendan Higgins @ 2018-07-11 5:47 UTC (permalink / raw)
To: jae.hyun.yoo
Cc: Benjamin Herrenschmidt, Joel Stanley, Andrew Jeffery, linux-i2c,
OpenBMC Maillist, Linux ARM, linux-aspeed,
Linux Kernel Mailing List, jarkko.nikula, james.feist,
vernon.mauery
On Mon, Jul 2, 2018 at 2:20 PM Jae Hyun Yoo
<jae.hyun.yoo@linux.intel.com> wrote:
>
> This patch changes the order of enum aspeed_i2c_master_state and
> enum aspeed_i2c_slave_state defines to make their initial value to
> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
> In case of multi-master use, if a slave data comes ahead of the
> first master xfer, master_state starts from an invalid state so
> this change fixes the issue.
>
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-aspeed.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
> index 60e4d0e939a3..2714c7fbe7c9 100644
> --- a/drivers/i2c/busses/i2c-aspeed.c
> +++ b/drivers/i2c/busses/i2c-aspeed.c
> @@ -111,22 +111,22 @@
> #define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
>
> enum aspeed_i2c_master_state {
> + ASPEED_I2C_MASTER_INACTIVE,
> ASPEED_I2C_MASTER_START,
> ASPEED_I2C_MASTER_TX_FIRST,
> ASPEED_I2C_MASTER_TX,
> ASPEED_I2C_MASTER_RX_FIRST,
> ASPEED_I2C_MASTER_RX,
> ASPEED_I2C_MASTER_STOP,
> - ASPEED_I2C_MASTER_INACTIVE,
> };
>
> enum aspeed_i2c_slave_state {
> + ASPEED_I2C_SLAVE_STOP,
> ASPEED_I2C_SLAVE_START,
> ASPEED_I2C_SLAVE_READ_REQUESTED,
> ASPEED_I2C_SLAVE_READ_PROCESSED,
> ASPEED_I2C_SLAVE_WRITE_REQUESTED,
> ASPEED_I2C_SLAVE_WRITE_RECEIVED,
> - ASPEED_I2C_SLAVE_STOP,
> };
>
> struct aspeed_i2c_bus {
> --
> 2.17.1
>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Thanks!
BTW, sorry for the delay, just got back from vacation. I will review
the rest tomorrow.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] i2c: aspeed: Fix initial values of master and slave state
@ 2018-07-11 5:47 ` Brendan Higgins
0 siblings, 0 replies; 9+ messages in thread
From: Brendan Higgins @ 2018-07-11 5:47 UTC (permalink / raw)
To: jae.hyun.yoo
Cc: Benjamin Herrenschmidt, Joel Stanley, Andrew Jeffery, linux-i2c,
OpenBMC Maillist, Linux ARM, linux-aspeed,
Linux Kernel Mailing List, jarkko.nikula, james.feist,
vernon.mauery
On Mon, Jul 2, 2018 at 2:20 PM Jae Hyun Yoo
<jae.hyun.yoo@linux.intel.com> wrote:
>
> This patch changes the order of enum aspeed_i2c_master_state and
> enum aspeed_i2c_slave_state defines to make their initial value to
> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
> In case of multi-master use, if a slave data comes ahead of the
> first master xfer, master_state starts from an invalid state so
> this change fixes the issue.
>
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-aspeed.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
> index 60e4d0e939a3..2714c7fbe7c9 100644
> --- a/drivers/i2c/busses/i2c-aspeed.c
> +++ b/drivers/i2c/busses/i2c-aspeed.c
> @@ -111,22 +111,22 @@
> #define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
>
> enum aspeed_i2c_master_state {
> + ASPEED_I2C_MASTER_INACTIVE,
> ASPEED_I2C_MASTER_START,
> ASPEED_I2C_MASTER_TX_FIRST,
> ASPEED_I2C_MASTER_TX,
> ASPEED_I2C_MASTER_RX_FIRST,
> ASPEED_I2C_MASTER_RX,
> ASPEED_I2C_MASTER_STOP,
> - ASPEED_I2C_MASTER_INACTIVE,
> };
>
> enum aspeed_i2c_slave_state {
> + ASPEED_I2C_SLAVE_STOP,
> ASPEED_I2C_SLAVE_START,
> ASPEED_I2C_SLAVE_READ_REQUESTED,
> ASPEED_I2C_SLAVE_READ_PROCESSED,
> ASPEED_I2C_SLAVE_WRITE_REQUESTED,
> ASPEED_I2C_SLAVE_WRITE_RECEIVED,
> - ASPEED_I2C_SLAVE_STOP,
> };
>
> struct aspeed_i2c_bus {
> --
> 2.17.1
>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Thanks!
BTW, sorry for the delay, just got back from vacation. I will review
the rest tomorrow.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] i2c: aspeed: Fix initial values of master and slave state
@ 2018-07-11 5:47 ` Brendan Higgins
0 siblings, 0 replies; 9+ messages in thread
From: Brendan Higgins @ 2018-07-11 5:47 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 2, 2018 at 2:20 PM Jae Hyun Yoo
<jae.hyun.yoo@linux.intel.com> wrote:
>
> This patch changes the order of enum aspeed_i2c_master_state and
> enum aspeed_i2c_slave_state defines to make their initial value to
> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
> In case of multi-master use, if a slave data comes ahead of the
> first master xfer, master_state starts from an invalid state so
> this change fixes the issue.
>
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
> ---
> drivers/i2c/busses/i2c-aspeed.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
> index 60e4d0e939a3..2714c7fbe7c9 100644
> --- a/drivers/i2c/busses/i2c-aspeed.c
> +++ b/drivers/i2c/busses/i2c-aspeed.c
> @@ -111,22 +111,22 @@
> #define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
>
> enum aspeed_i2c_master_state {
> + ASPEED_I2C_MASTER_INACTIVE,
> ASPEED_I2C_MASTER_START,
> ASPEED_I2C_MASTER_TX_FIRST,
> ASPEED_I2C_MASTER_TX,
> ASPEED_I2C_MASTER_RX_FIRST,
> ASPEED_I2C_MASTER_RX,
> ASPEED_I2C_MASTER_STOP,
> - ASPEED_I2C_MASTER_INACTIVE,
> };
>
> enum aspeed_i2c_slave_state {
> + ASPEED_I2C_SLAVE_STOP,
> ASPEED_I2C_SLAVE_START,
> ASPEED_I2C_SLAVE_READ_REQUESTED,
> ASPEED_I2C_SLAVE_READ_PROCESSED,
> ASPEED_I2C_SLAVE_WRITE_REQUESTED,
> ASPEED_I2C_SLAVE_WRITE_RECEIVED,
> - ASPEED_I2C_SLAVE_STOP,
> };
>
> struct aspeed_i2c_bus {
> --
> 2.17.1
>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Thanks!
BTW, sorry for the delay, just got back from vacation. I will review
the rest tomorrow.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] i2c: aspeed: Fix initial values of master and slave state
2018-07-11 5:47 ` Brendan Higgins
@ 2018-07-11 16:54 ` Jae Hyun Yoo
-1 siblings, 0 replies; 9+ messages in thread
From: Jae Hyun Yoo @ 2018-07-11 16:54 UTC (permalink / raw)
To: Brendan Higgins
Cc: Benjamin Herrenschmidt, Joel Stanley, Andrew Jeffery, linux-i2c,
OpenBMC Maillist, Linux ARM, linux-aspeed,
Linux Kernel Mailing List, jarkko.nikula, james.feist,
vernon.mauery
On 7/10/2018 10:47 PM, Brendan Higgins wrote:
> On Mon, Jul 2, 2018 at 2:20 PM Jae Hyun Yoo
> <jae.hyun.yoo@linux.intel.com> wrote:
>>
>> This patch changes the order of enum aspeed_i2c_master_state and
>> enum aspeed_i2c_slave_state defines to make their initial value to
>> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
>> In case of multi-master use, if a slave data comes ahead of the
>> first master xfer, master_state starts from an invalid state so
>> this change fixes the issue.
>>
>> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
>> ---
>> drivers/i2c/busses/i2c-aspeed.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
>> index 60e4d0e939a3..2714c7fbe7c9 100644
>> --- a/drivers/i2c/busses/i2c-aspeed.c
>> +++ b/drivers/i2c/busses/i2c-aspeed.c
>> @@ -111,22 +111,22 @@
>> #define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
>>
>> enum aspeed_i2c_master_state {
>> + ASPEED_I2C_MASTER_INACTIVE,
>> ASPEED_I2C_MASTER_START,
>> ASPEED_I2C_MASTER_TX_FIRST,
>> ASPEED_I2C_MASTER_TX,
>> ASPEED_I2C_MASTER_RX_FIRST,
>> ASPEED_I2C_MASTER_RX,
>> ASPEED_I2C_MASTER_STOP,
>> - ASPEED_I2C_MASTER_INACTIVE,
>> };
>>
>> enum aspeed_i2c_slave_state {
>> + ASPEED_I2C_SLAVE_STOP,
>> ASPEED_I2C_SLAVE_START,
>> ASPEED_I2C_SLAVE_READ_REQUESTED,
>> ASPEED_I2C_SLAVE_READ_PROCESSED,
>> ASPEED_I2C_SLAVE_WRITE_REQUESTED,
>> ASPEED_I2C_SLAVE_WRITE_RECEIVED,
>> - ASPEED_I2C_SLAVE_STOP,
>> };
>>
>> struct aspeed_i2c_bus {
>> --
>> 2.17.1
>>
>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
>
> Thanks!
>
> BTW, sorry for the delay, just got back from vacation. I will review
> the rest tomorrow.
>
Thanks a lot for the review!
Jae
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] i2c: aspeed: Fix initial values of master and slave state
@ 2018-07-11 16:54 ` Jae Hyun Yoo
0 siblings, 0 replies; 9+ messages in thread
From: Jae Hyun Yoo @ 2018-07-11 16:54 UTC (permalink / raw)
To: linux-arm-kernel
On 7/10/2018 10:47 PM, Brendan Higgins wrote:
> On Mon, Jul 2, 2018 at 2:20 PM Jae Hyun Yoo
> <jae.hyun.yoo@linux.intel.com> wrote:
>>
>> This patch changes the order of enum aspeed_i2c_master_state and
>> enum aspeed_i2c_slave_state defines to make their initial value to
>> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
>> In case of multi-master use, if a slave data comes ahead of the
>> first master xfer, master_state starts from an invalid state so
>> this change fixes the issue.
>>
>> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
>> ---
>> drivers/i2c/busses/i2c-aspeed.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
>> index 60e4d0e939a3..2714c7fbe7c9 100644
>> --- a/drivers/i2c/busses/i2c-aspeed.c
>> +++ b/drivers/i2c/busses/i2c-aspeed.c
>> @@ -111,22 +111,22 @@
>> #define ASPEED_I2CD_DEV_ADDR_MASK GENMASK(6, 0)
>>
>> enum aspeed_i2c_master_state {
>> + ASPEED_I2C_MASTER_INACTIVE,
>> ASPEED_I2C_MASTER_START,
>> ASPEED_I2C_MASTER_TX_FIRST,
>> ASPEED_I2C_MASTER_TX,
>> ASPEED_I2C_MASTER_RX_FIRST,
>> ASPEED_I2C_MASTER_RX,
>> ASPEED_I2C_MASTER_STOP,
>> - ASPEED_I2C_MASTER_INACTIVE,
>> };
>>
>> enum aspeed_i2c_slave_state {
>> + ASPEED_I2C_SLAVE_STOP,
>> ASPEED_I2C_SLAVE_START,
>> ASPEED_I2C_SLAVE_READ_REQUESTED,
>> ASPEED_I2C_SLAVE_READ_PROCESSED,
>> ASPEED_I2C_SLAVE_WRITE_REQUESTED,
>> ASPEED_I2C_SLAVE_WRITE_RECEIVED,
>> - ASPEED_I2C_SLAVE_STOP,
>> };
>>
>> struct aspeed_i2c_bus {
>> --
>> 2.17.1
>>
>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
>
> Thanks!
>
> BTW, sorry for the delay, just got back from vacation. I will review
> the rest tomorrow.
>
Thanks a lot for the review!
Jae
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] i2c: aspeed: Fix initial values of master and slave state
2018-07-02 21:20 ` Jae Hyun Yoo
@ 2018-07-20 22:25 ` Wolfram Sang
-1 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2018-07-20 22:25 UTC (permalink / raw)
To: Jae Hyun Yoo
Cc: Brendan Higgins, Benjamin Herrenschmidt, Joel Stanley,
Andrew Jeffery, linux-i2c, openbmc, linux-arm-kernel,
linux-aspeed, linux-kernel, Jarkko Nikula, James Feist,
Vernon Mauery
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
On Mon, Jul 02, 2018 at 02:20:28PM -0700, Jae Hyun Yoo wrote:
> This patch changes the order of enum aspeed_i2c_master_state and
> enum aspeed_i2c_slave_state defines to make their initial value to
> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
> In case of multi-master use, if a slave data comes ahead of the
> first master xfer, master_state starts from an invalid state so
> this change fixes the issue.
>
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] i2c: aspeed: Fix initial values of master and slave state
@ 2018-07-20 22:25 ` Wolfram Sang
0 siblings, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2018-07-20 22:25 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 02, 2018 at 02:20:28PM -0700, Jae Hyun Yoo wrote:
> This patch changes the order of enum aspeed_i2c_master_state and
> enum aspeed_i2c_slave_state defines to make their initial value to
> ASPEED_I2C_MASTER_INACTIVE and ASPEED_I2C_SLAVE_STOP respectively.
> In case of multi-master use, if a slave data comes ahead of the
> first master xfer, master_state starts from an invalid state so
> this change fixes the issue.
>
> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Applied to for-next, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180721/1eae0a0c/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-07-20 22:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 21:20 [PATCH] i2c: aspeed: Fix initial values of master and slave state Jae Hyun Yoo
2018-07-02 21:20 ` Jae Hyun Yoo
2018-07-11 5:47 ` Brendan Higgins
2018-07-11 5:47 ` Brendan Higgins
2018-07-11 5:47 ` Brendan Higgins
2018-07-11 16:54 ` Jae Hyun Yoo
2018-07-11 16:54 ` Jae Hyun Yoo
2018-07-20 22:25 ` Wolfram Sang
2018-07-20 22:25 ` Wolfram Sang
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.