From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [Patch v5 2/2] gpio: Document GPIO hogging mechanism Date: Fri, 16 Jan 2015 11:20:56 +0100 Message-ID: References: <1419019671-25377-1-git-send-email-bparrot@ti.com> <1419019671-25377-3-git-send-email-bparrot@ti.com> <20150112163902.GE5834@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alexandre Courbot Cc: Benoit Parrot , "linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Maxime Ripard , Jiri Prchal , Pantelis Antoniou List-Id: devicetree@vger.kernel.org On Mon, Jan 12, 2015 at 10:43 PM, Alexandre Courbot wrote: > On Tue, Jan 13, 2015 at 1:39 AM, Benoit Parrot wrote: >> Linus Walleij wrote on Mon [2015-Jan-12 11:20:14 +0100]: >>> line_b { >>> gpio-hog; >>> gpios = <6 0>; >>> output-low; >>> line-name = "foo-bar-gpio"; >>> } >>> >>> Then use of_property_read_bool() in the code to check which >>> state is to be selected intially. You can check that no mutually >>> exclusive state are selected, I don't like that an arbitrary string >>> select the state like that, if we do it that way an enumerator would >>> be better, I prefer bools. >> >> I am sorry but that is how it was originally in the first patch. >> Alexandre's review comment suggested this method in [1] and [2] (below). >> >> Alexandre, any comments? >> >> [1] http://marc.info/?l=linux-gpio&m=141456662426151&w=2 >> >> [2] http://marc.info/?l=linux-gpio&m=141715982424744&w=2 > > When Linus and I are in conflict, follow Linus. Arnd's suggestion of > having enums defined in (IIUC) include/dt-bindings/gpio and using them > sounds good to me too and might make everyone happy (no possibility of > conflicting definitions + no strings). Linus, could you comment on it? I'm fine with bools or enums, just not strings, sorry for the mess. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html