linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i2c-next v7 0/5] i2c: aspeed: Add bus idle waiting logic for multi-master use cases
@ 2018-10-05 21:45 Jae Hyun Yoo
  2018-10-05 21:45 ` [PATCH i2c-next v7 1/5] dt-bindings: i2c: Add 'bus-timeout-ms' and '#retries' properties as common optional Jae Hyun Yoo
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Jae Hyun Yoo @ 2018-10-05 21:45 UTC (permalink / raw)
  To: Brendan Higgins, Wolfram Sang, Benjamin Herrenschmidt,
	Joel Stanley, Rob Herring, Mark Rutland, Andrew Jeffery,
	linux-i2c, openbmc, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Jarkko Nikula, James Feist, Vernon Mauery, Jae Hyun Yoo

In multi-master environment, this driver's master cannot know
exactly when peer master sends data to this driver's slave so a
case can be happened that this master tries to send data through
the master_xfer function but slave data from peer master is still
being processed by this driver. To prevent state corruption in the
case, this patch adds checking code if any slave operation is
ongoing and it waits up to the bus timeout duration before starting
a master_xfer operation.

To support this change, it introduces changes on i2c-core-base to
make that able to read the bus timeout and master transfer retries
count values from device tree properties.

Please review this patch set.

Thanks,

-Jae

Changes since v6:
- Changed the 'timeout-ms' property name to 'bus-timeout-ms'.

Changes since v5:
- Changed using of property reading API to device_property_read_u32.

Changes since v4:
- Moved the property reading code into i2c-base-core and changed the
  property name to 'timeout-ms'. Also, added '#retries' property reading
  code.
- Changed bus busy checking logic to make that check slave_state instead
  of 'Transfer Mode State Machine' reg value.

Changes since v3:
- Changed the property name to 'timeout' and made it use the
  default setting in i2c-core when not specified.

Changes since v2:
- Changed the property name to 'aspeed,timeout' and made it to
  update the adapter's timeout configuration.

Changes since v1:
- Changed define names of timeout related.

Jae Hyun Yoo (5):
  dt-bindings: i2c: Add 'bus-timeout-ms' and '#retries' properties as
    common optional
  i2c: core: Add support reading of 'bus-timeout-ms' and '#retries'
    properties
  dt-bindings: i2c: aspeed: Add 'bus-timeout-ms' property as an optional
    property
  i2c: aspeed: Remove hard-coded bus timeout value setting
  i2c: aspeed: Add bus idle waiting logic for multi-master use cases

 .../devicetree/bindings/i2c/i2c-aspeed.txt    |  3 ++
 Documentation/devicetree/bindings/i2c/i2c.txt |  6 +++
 drivers/i2c/busses/i2c-aspeed.c               | 54 +++++++++++++------
 drivers/i2c/i2c-core-base.c                   | 12 ++++-
 4 files changed, 57 insertions(+), 18 deletions(-)

-- 
2.19.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-10-11 22:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 21:45 [PATCH i2c-next v7 0/5] i2c: aspeed: Add bus idle waiting logic for multi-master use cases Jae Hyun Yoo
2018-10-05 21:45 ` [PATCH i2c-next v7 1/5] dt-bindings: i2c: Add 'bus-timeout-ms' and '#retries' properties as common optional Jae Hyun Yoo
2018-10-11 22:11   ` Rob Herring
2018-10-11 22:46     ` Jae Hyun Yoo
2018-10-05 21:45 ` [PATCH i2c-next v7 2/5] i2c: core: Add support reading of 'bus-timeout-ms' and '#retries' properties Jae Hyun Yoo
2018-10-05 21:45 ` [PATCH i2c-next v7 3/5] dt-bindings: i2c: aspeed: Add 'bus-timeout-ms' property as an optional property Jae Hyun Yoo
2018-10-10  0:00   ` Brendan Higgins
2018-10-10 15:35     ` Jae Hyun Yoo
2018-10-11 22:12   ` Rob Herring
2018-10-11 22:47     ` Jae Hyun Yoo
2018-10-05 21:45 ` [PATCH i2c-next v7 4/5] i2c: aspeed: Remove hard-coded bus timeout value setting Jae Hyun Yoo
2018-10-10  0:00   ` Brendan Higgins
2018-10-10 15:34     ` Jae Hyun Yoo
2018-10-05 21:45 ` [PATCH i2c-next v7 5/5] i2c: aspeed: Add bus idle waiting logic for multi-master use cases Jae Hyun Yoo
2018-10-10  0:08   ` Brendan Higgins
2018-10-10 15:33     ` Jae Hyun Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).