diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-02 13:20:53 -0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-05 17:53:27 -0400 |
commit | 40e575b1d0b34b38519d361c10bdf8e0c688957b (patch) | |
tree | 88e82959201de6a1bbe3570d2a0d924ca33882dc /Documentation/remoteproc.txt | |
parent | 0e49b72c8c91f9ea65ae62ca3061f885aa06a6f6 (diff) |
remoteproc: remove the get_by_name/put API
Remove rproc_get_by_name() and rproc_put(), and the associated
remoteproc infrastructure that supports it (i.e. klist and friends),
because:
1. No one uses them
2. Using them is highly discouraged, and any potential user
will be deeply scrutinized and encouraged to move.
If a user, that absolutely can't live with the direct boot/shutdown
model, does show up one day, then bringing this functionality back
is going to be trivial.
At this point though, keeping this functionality around is way too
much of a maintenance burden.
Cc: Sjur Brændeland <sjur.brandeland@stericsson.com>
Cc: Loic Pallardy <loic.pallardy@stericsson.com>
Cc: Ludovic BARRE <ludovic.barre@stericsson.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Fernando Guzman Lugo <fernando.lugo@ti.com>
Cc: Suman Anna <s-anna@ti.com>
Cc: Mark Grosen <mgrosen@ti.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'Documentation/remoteproc.txt')
-rw-r--r-- | Documentation/remoteproc.txt | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt index ad6ded4bca5c..f33c3bbbc867 100644 --- a/Documentation/remoteproc.txt +++ b/Documentation/remoteproc.txt | |||
@@ -36,8 +36,7 @@ cost. | |||
36 | Note: to use this function you should already have a valid rproc | 36 | Note: to use this function you should already have a valid rproc |
37 | handle. There are several ways to achieve that cleanly (devres, pdata, | 37 | handle. There are several ways to achieve that cleanly (devres, pdata, |
38 | the way remoteproc_rpmsg.c does this, or, if this becomes prevalent, we | 38 | the way remoteproc_rpmsg.c does this, or, if this becomes prevalent, we |
39 | might also consider using dev_archdata for this). See also | 39 | might also consider using dev_archdata for this). |
40 | rproc_get_by_name() below. | ||
41 | 40 | ||
42 | void rproc_shutdown(struct rproc *rproc) | 41 | void rproc_shutdown(struct rproc *rproc) |
43 | - Power off a remote processor (previously booted with rproc_boot()). | 42 | - Power off a remote processor (previously booted with rproc_boot()). |
@@ -51,30 +50,6 @@ cost. | |||
51 | which means that the @rproc handle stays valid even after | 50 | which means that the @rproc handle stays valid even after |
52 | rproc_shutdown() returns, and users can still use it with a subsequent | 51 | rproc_shutdown() returns, and users can still use it with a subsequent |
53 | rproc_boot(), if needed. | 52 | rproc_boot(), if needed. |
54 | - don't call rproc_shutdown() to unroll rproc_get_by_name(), exactly | ||
55 | because rproc_shutdown() _does not_ decrement the refcount of @rproc. | ||
56 | To decrement the refcount of @rproc, use rproc_put() (but _only_ if | ||
57 | you acquired @rproc using rproc_get_by_name()). | ||
58 | |||
59 | struct rproc *rproc_get_by_name(const char *name) | ||
60 | - Find an rproc handle using the remote processor's name, and then | ||
61 | boot it. If it's already powered on, then just immediately return | ||
62 | (successfully). Returns the rproc handle on success, and NULL on failure. | ||
63 | This function increments the remote processor's refcount, so always | ||
64 | use rproc_put() to decrement it back once rproc isn't needed anymore. | ||
65 | Note: currently rproc_get_by_name() and rproc_put() are not used anymore | ||
66 | by the rpmsg bus and its drivers. We need to scrutinize the use cases | ||
67 | that still need them, and see if we can migrate them to use the non | ||
68 | name-based boot/shutdown interface. | ||
69 | |||
70 | void rproc_put(struct rproc *rproc) | ||
71 | - Decrement @rproc's power refcount and shut it down if it reaches zero | ||
72 | (essentially by just calling rproc_shutdown), and then decrement @rproc's | ||
73 | validity refcount too. | ||
74 | After this function returns, @rproc may _not_ be used anymore, and its | ||
75 | handle should be considered invalid. | ||
76 | This function should be called _iff_ the @rproc handle was grabbed by | ||
77 | calling rproc_get_by_name(). | ||
78 | 53 | ||
79 | 3. Typical usage | 54 | 3. Typical usage |
80 | 55 | ||