From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752113AbdAaSzg (ORCPT ); Tue, 31 Jan 2017 13:55:36 -0500 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:36359 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbdAaSz2 (ORCPT ); Tue, 31 Jan 2017 13:55:28 -0500 Subject: Re: [PATCH] iio: stx104: Add support for GPIO names To: Linus Walleij , William Breathitt Gray References: <20170130171604.11266-1-vilhelm.gray@gmail.com> Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Jonathan Cameron Message-ID: <5c284102-a0c6-8a47-e4ab-85bcb3511390@kernel.org> Date: Tue, 31 Jan 2017 18:55:22 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/01/17 09:41, Linus Walleij wrote: > On Mon, Jan 30, 2017 at 6:16 PM, William Breathitt Gray > 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 > (...) >> +#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 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 >