Thread (1 message) 1 message, 1 author, 2016-03-22

Re: [PATCH v2] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs

From: Linus Walleij <hidden>
Date: 2016-03-22 10:50:42
Also in: linux-gpio, linux-iio

On Mon, Mar 21, 2016 at 3:07 PM, Michael Hennerich
[off-list ref] wrote:
On 03/11/2016 05:28 PM, Linus Walleij wrote:
quoted
quoted
quoted
+             mutex_lock(&iio_dev->mlock);
+             st->ops->reg_write(st, AD5592R_REG_RESET, 0xdac);
+             mutex_unlock(&iio_dev->mlock);
What's that? (0xdac)? Clever magic?
Clever magic - to avoid accidental resets.
I see. Put in a small comment like:

/* Writing this magic value resets the device */

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help