* [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better
@ 2016-07-23 20:06 Wolfram Sang
2016-07-23 20:06 ` [PATCH 2/2] Documentation: i2c: slave: give proper example for pm usage Wolfram Sang
2016-07-26 6:44 ` [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better Wolfram Sang
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-07-23 20:06 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Documentation/i2c/slave-interface | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/i2c/slave-interface b/Documentation/i2c/slave-interface
index 61ed05cd95317f..abd10186a9e9fc 100644
--- a/Documentation/i2c/slave-interface
+++ b/Documentation/i2c/slave-interface
@@ -173,13 +173,14 @@ During development of this API, the question of using buffers instead of just
bytes came up. Such an extension might be possible, usefulness is unclear at
this time of writing. Some points to keep in mind when using buffers:
-* Buffers should be opt-in and slave drivers will always have to support
- byte-based transactions as the ultimate fallback because this is how the
- majority of HW works.
-
-* For backends simulating hardware registers, buffers are not helpful because
- on writes an action should be immediately triggered. For reads, the data in
- the buffer might get stale.
+* Buffers should be opt-in and backend drivers will always have to support
+ byte-based transactions as the ultimate fallback anyhow because this is how
+ the majority of HW works.
+
+* For backends simulating hardware registers, buffers are largely not helpful
+ because after each byte written an action should be immediately triggered.
+ For reads, the data kept in the buffer might get stale if the backend just
+ updated a register because of internal processing.
* A master can send STOP at any time. For partially transferred buffers, this
means additional code to handle this exception. Such code tends to be
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] Documentation: i2c: slave: give proper example for pm usage
2016-07-23 20:06 [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better Wolfram Sang
@ 2016-07-23 20:06 ` Wolfram Sang
2016-07-26 6:44 ` Wolfram Sang
2016-07-26 6:44 ` [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2016-07-23 20:06 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang
pm_runtime_forbid was the wrong knob, this is the better one.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Documentation/i2c/slave-interface | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/i2c/slave-interface b/Documentation/i2c/slave-interface
index abd10186a9e9fc..80807adb8ded52 100644
--- a/Documentation/i2c/slave-interface
+++ b/Documentation/i2c/slave-interface
@@ -139,9 +139,9 @@ If you want to add slave support to the bus driver:
* implement calls to register/unregister the slave and add those to the
struct i2c_algorithm. When registering, you probably need to set the i2c
slave address and enable slave specific interrupts. If you use runtime pm, you
- should use pm_runtime_forbid() because your device usually needs to be powered
- on always to be able to detect its slave address. When unregistering, do the
- inverse of the above.
+ should use pm_runtime_get_sync() because your device usually needs to be
+ powered on always to be able to detect its slave address. When unregistering,
+ do the inverse of the above.
* Catch the slave interrupts and send appropriate i2c_slave_events to the backend.
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better
2016-07-23 20:06 [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better Wolfram Sang
2016-07-23 20:06 ` [PATCH 2/2] Documentation: i2c: slave: give proper example for pm usage Wolfram Sang
@ 2016-07-26 6:44 ` Wolfram Sang
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-07-26 6:44 UTC (permalink / raw)
To: linux-i2c
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
On Sat, Jul 23, 2016 at 10:06:51PM +0200, Wolfram Sang wrote:
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-26 6:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-23 20:06 [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better Wolfram Sang
2016-07-23 20:06 ` [PATCH 2/2] Documentation: i2c: slave: give proper example for pm usage Wolfram Sang
2016-07-26 6:44 ` Wolfram Sang
2016-07-26 6:44 ` [PATCH 1/2] Documentation: i2c: slave: describe buffer problems a bit better Wolfram Sang
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).