
On Wed, Jan 20, 2016 at 10:03:40PM +0100, Mateusz Kulikowski wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
On 20.01.2016 05:34, Simon Glass wrote: [...]
On 27 December 2015 at 10:28, Mateusz Kulikowski mateusz.kulikowski@gmail.com wrote:
Add function to poll register waiting for specific bit(s). Similar functions are implemented in few drivers - they are almost identical and can be generalized.
[...]
Sorry I only just saw this, but thought I'd make a few comments.
Nooo, I was expecting at least this to be merged during this merge window :)
[...]
- @param prefix Prefix added to timeout messagge (message visible only
with debug enabled)
- @param reg Register that will be read (using readl())
- @param mask Bit(s) of register that must be active
- @param set Selects wait condition (bit set or clear)
- @param timeout Timeout (in miliseconds)
- @param breakable Enables CTRL-C interruption
- @return 0 on success, -ETIMEDOUT or -EINTR on failure
- */
+static inline int wait_for_bit(const char *prefix, const u32 *reg,
const u32 mask, const bool set,
const unsigned int timeout,
timeout_ms would be more obvious
This may be a good idea to make it more foolproof -
@trini: Will v4 with small change like that delay merging this series into mainline?
Nope, just get it posted soon please :)