Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: stx104: Add support for GPIO names
Date: Tue, 31 Jan 2017 18:55:22 +0000	[thread overview]
Message-ID: <5c284102-a0c6-8a47-e4ab-85bcb3511390@kernel.org> (raw)
In-Reply-To: <CACRpkdbAn5QEah0oqVHcJz_-Bu-94A5ADYgXeFogZbzhuzrjnA@mail.gmail.com>

On 31/01/17 09:41, Linus Walleij wrote:
> On Mon, Jan 30, 2017 at 6:16 PM, William Breathitt Gray
> <vilhelm.gray@gmail.com> wrote:
> 
>> This patch sets the gpio_chip names option with an array of GPIO line
>> names that match the manual documentation for the Apex Embedded Systems
>> STX104. This should make it easier for users to identify which GPIO line
>> corresponds to a respective GPIO pin on the device.
>>
>> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> (...)
>> +#define STX104_NGPIO 8
>> +static const char *stx104_names[STX104_NGPIO] = {
>> +       "DIN0", "DIN1", "DIN2", "DIN3", "DOUT0", "DOUT1", "DOUT2", "DOUT3"
>> +};
> (...)
>> +       stx104gpio->chip.ngpio = STX104_NGPIO;
>> +       stx104gpio->chip.names = stx104_names;
> 
> If the device has a gpio-controller tagged node in a device tree, it is better
> to use gpio-line-names = "foo" ...; for this. For ACPI there is something
> similar.
> 
> If it is spawn from this device without any GPIO child node or hardware
> description outside of the kernel driver, such as
> ISA/PCI or whatever, this is a good way.
> 
> This is an isa_driver and falls in the latter category, so:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cool.. thanks for the info as well.

Applied to the togreg branch of iio.git. Will push out as testing in a few minutes
to let the autobuilders play with it.

Thanks,

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


      reply	other threads:[~2017-01-31 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 17:16 [PATCH] iio: stx104: Add support for GPIO names William Breathitt Gray
2017-01-30 20:24 ` Jonathan Cameron
2017-01-31  9:41 ` Linus Walleij
2017-01-31 18:55   ` Jonathan Cameron [this message]

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=5c284102-a0c6-8a47-e4ab-85bcb3511390@kernel.org \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=vilhelm.gray@gmail.com \
    /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