From: Guenter Roeck <linux@roeck-us.net>
To: jiri.prchal@aksignal.cz, Alexandre Courbot <gnurou@gmail.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name
Date: Fri, 25 Jul 2014 07:09:59 -0700 [thread overview]
Message-ID: <53D26537.9000203@roeck-us.net> (raw)
In-Reply-To: <53D20B6E.9010808@aksignal.cz>
On 07/25/2014 12:46 AM, Jiří Prchal wrote:
> What about this modification? If is defined label, use it prioritlly, at second use name in chip description.
>
> @@ -842,7 +842,9 @@ int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
> spin_unlock_irqrestore(&gpio_lock, flags);
>
> offset = gpio_chip_hwgpio(desc);
> - if (desc->chip->names && desc->chip->names[offset])
> + if (desc->label)
> + ioname = desc->label;
> + else if (desc->chip->names && desc->chip->names[offset])
> ioname = desc->chip->names[offset];
>
Label is not unique. It is, for example, used by the sysfs export function,
and all pins exported from user space have the same label. The first
pin exported through sysfs would be named "sysfs", the second export
would fail.
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-25 14:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 18:12 [RFC PATCH] gpiolib: Provide and export gpiod_export_name Guenter Roeck
2014-07-24 5:44 ` Alexandre Courbot
2014-07-24 6:29 ` Jiří Prchal
2014-07-24 6:36 ` Guenter Roeck
2014-07-25 7:46 ` Jiří Prchal
2014-07-25 14:09 ` Guenter Roeck [this message]
2014-07-24 6:33 ` Guenter Roeck
2014-08-07 6:25 ` Alexandre Courbot
2014-08-07 7:34 ` Guenter Roeck
2014-08-11 15:01 ` Alexandre Courbot
2014-08-11 15:15 ` Guenter Roeck
2014-08-11 15:20 ` Alexandre Courbot
2014-08-11 16:13 ` Guenter Roeck
2014-08-11 22:05 ` Alexandre Courbot
2014-08-13 0:29 ` Guenter Roeck
2014-08-29 5:44 ` Linus Walleij
2014-08-29 5:54 ` Guenter Roeck
2014-08-29 17:00 ` Alexandre Courbot
2014-08-29 17:37 ` Guenter Roeck
2014-08-31 0:57 ` Alexandre Courbot
2014-09-05 8:46 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D26537.9000203@roeck-us.net \
--to=linux@roeck-us.net \
--cc=gnurou@gmail.com \
--cc=jiri.prchal@aksignal.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).