Thread (14 messages) 14 messages, 4 authors, 2016-06-15

Re: [PATCH 2/2] tools/gpio: add the gpio-hammer tool

From: Michael Welling <hidden>
Date: 2016-06-02 14:59:38

On Wed, Jun 01, 2016 at 11:40:04PM +0200, Linus Walleij wrote:
On Wed, Jun 1, 2016 at 8:09 PM, Michael Welling [off-list ref] wrote:
quoted
Is there a way to name a group of GPIOs?
Do you mean from the producer side or the consumer side?
Producer side is what I am thinking.
There is gpio-line-names in DT for the producer side.
The gpio-line-names are naming individual GPIO on a controller.
I am looking to take a set of GPIOs and name them as a group and
be able to access them by that name. Either individually or
simultaneously.
 
From the consumer side the same consumer name will be used
on all lines if more than one is selected, which I think makes
sense. (It's just a label after all.)
quoted
It seems you are passing around a byte of data for each GPIO state.
Is there a reason why the bits couldn't bit masked into single variable
given the max number of handles is 64?
Sorry not following, I guess you need to post me some part of
the patch or so...
+       fprintf(stdout, "] on %s, initial states: [", device_name);
+       for (i = 0; i < nlines; i++) {
+               fprintf(stdout, "%d", data.values[i]);

data.values[i];

Each bit is stored in a byte.
Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help