From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: From: Laurent Pinchart To: Geert Uytterhoeven Cc: Laurent Pinchart , Linux-Renesas , Kieran Bingham Subject: Re: [PATCH 0/2] Salvator-X: Add GPIO keys support Date: Mon, 14 Nov 2016 18:44:35 +0200 Message-ID: <3190171.WPEDSgjiKH@avalon> In-Reply-To: References: <1479128837-30985-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <3311383.qyYI76AWiA@avalon> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-ID: Hi Geert, On Monday 14 Nov 2016 14:47:00 Geert Uytterhoeven wrote: > On Mon, Nov 14, 2016 at 2:41 PM, Laurent Pinchart wrote: > > On Monday 14 Nov 2016 14:35:26 Geert Uytterhoeven wrote: > >> The main reason I haven't sent out a similar series yet is because the > >> GPIOs used for the 3 push buttons are shared with the 3 user LEDs. For > >> each of them, you have to choose at DT time if you want to use them as > >> buttons or as LEDs. > >> > >> On ULCB, the same issue is present. For those, we settled on 1 key and 2 > >> LEDs... > >> > >> Looking forward to more comments... > > > > In theory the GPIOs could be shared by the gpio-keys and LED drivers in > > open- drain mode. I'm not sure the GPIO subsystem supports that though. > > Been there, done that, cfr. "[RFD] Sharing GPIOs for input (buttons) and > output (LEDs)". The result wasn't pretty... Wasn't it ? Linus basically told you to use open-drain GPIOs and fix the GPIO driver in case it can't read the value of GPIOs configured as output in open- drain mode. If didn't shoot the idea down. -- Regards, Laurent Pinchart