From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: Re: [PATCH] input: axp20x-pek: Fix reporting button state as inverted Date: Wed, 24 Jun 2015 14:28:57 -0700 Message-ID: <20150624212857.GA3636@dtor-ws> References: <1434278541-21355-1-git-send-email-hdegoede@redhat.com> <20150622213051.GD2350@dtor-ws> Reply-To: dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Content-Disposition: inline In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Carlo Caione Cc: Chen-Yu Tsai , Hans de Goede , Maxime Ripard , "linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-arm-kernel , devicetree , linux-sunxi List-Id: linux-input@vger.kernel.org On Wed, Jun 24, 2015 at 11:19:39AM +0200, Carlo Caione wrote: > On Wed, Jun 24, 2015 at 3:42 AM, Chen-Yu Tsai wrote: > > On Tue, Jun 23, 2015 at 5:30 AM, Dmitry Torokhov > > wrote: > >> On Sun, Jun 14, 2015 at 12:42:21PM +0200, Hans de Goede wrote: > >>> Currently we are reporting the button state as inverted on all boards with > >>> an axp209 pmic, tested on a ba10-tvbox, bananapi, bananapro, cubietruck and > >>> utoo-p66 tablet. > >>> > >>> The axp209 datasheet clearly states that the power button must be connected > >>> between the PWRON key and ground. Which means that on a press we will get > >>> a falling edge (dbf) irq not a rising one, and likewise on release we will > >>> get a rising edge (dbr) irq, not a falling one. > >>> > >>> This commit swaps the check for the 2 irqs fixing the inverted reporting of > >>> the power button state. > >>> > >>> Signed-off-by: Hans de Goede > >> > >> Carlo, Chen-Yu, could you please give this patch a spin and let us know > >> if it works on your boards? > > > > I've not actually tested this patch on my boards, but I can confirm that > > the original code had the state inverted, by checking /proc/interrupts > > counters, before and after releasing the power button. > > > > Acked-by: Chen-Yu Tsai > > Same here (I don't have the board anymore) > > Acked-by: Carlo Caione Applied, thank you. -- Dmitry