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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 2, 2016 at 4:59 PM, Michael Welling <mwelling@xxxxxxxx> wrote:
> On Wed, Jun 01, 2016 at 11:40:04PM +0200, Linus Walleij wrote:
>> On Wed, Jun 1, 2016 at 8:09 PM, Michael Welling <mwelling@xxxxxxxx> wrote:
>>
>> > 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.

There is no such mechanism currently, all lines are individual
resources.

>> 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.

Yeah the userspace interface is wasteful in that sense. It's a trade-off
between storage and simplicity and I had to choose something.

If I try to bitstuff the bits then I need to add another ABI to describe
how the bits are stuffed in the words. So I get complexity somewhere
else instead.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux