From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ard Biesheuvel Subject: Re: [PATCH 0/2] GPIO support for Socionext Synquacer Date: Tue, 31 Oct 2017 13:19:00 +0000 Message-ID: References: <20171027202148.4188-1-ard.biesheuvel@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-io0-f196.google.com ([209.85.223.196]:55956 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbdJaNTC (ORCPT ); Tue, 31 Oct 2017 09:19:02 -0400 Received: by mail-io0-f196.google.com with SMTP id p186so34950898ioe.12 for ; Tue, 31 Oct 2017 06:19:01 -0700 (PDT) In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Linus Walleij Cc: "linux-gpio@vger.kernel.org" , Daniel Thompson , Leif Lindholm , Jassi Brar , Masami Hiramatsu On 31 October 2017 at 13:13, Linus Walleij wrote: > On Tue, Oct 31, 2017 at 1:27 PM, Ard Biesheuvel > wrote: > >> I currently have this in my DTS: >> >> &gpio { >> dsw3_1 { >> gpios = <0 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_2 { >> gpios = <1 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_3 { >> gpios = <2 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_4 { >> gpios = <3 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_5 { >> gpios = <4 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_6 { >> gpios = <5 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_7 { >> gpios = <6 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> dsw3_8 { >> gpios = <7 GPIO_ACTIVE_HIGH>; >> gpio-hog; >> input; >> }; >> >> for the 8 DIP switches that are connected to GPIO lines. > > I have no idea how to make proper use of DIP switches really. > We *could* route them as inputs using GPIO keys, but it would > maybe give people the idea that it is a good idea to start > prying them at runtime. > > If they don't have a usecase I would just leave them as this. > > I guess/hope they will not be used by userspace either. > Not a clue. I guess I can remove the hogs, and simply describe them using the names. They are probably more useful at boot time, i.e., to clear the NVRAM and to en/disable secure boot etc. >> So I can add the names for all the lines that have a purpose, but is >> that orthogonal to hogging? > > Naming is orthogonal to hogging and should be a functional name > for the line, preferably header name, else rail name or something > else reasonable.