From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BCF0C433DF for ; Tue, 16 Jun 2020 10:50:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42B2C20842 for ; Tue, 16 Jun 2020 10:50:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbgFPKuf (ORCPT ); Tue, 16 Jun 2020 06:50:35 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:53246 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbgFPKuf (ORCPT ); Tue, 16 Jun 2020 06:50:35 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 1318F1C0C0A; Tue, 16 Jun 2020 12:50:33 +0200 (CEST) Date: Tue, 16 Jun 2020 12:50:02 +0200 From: Pavel Machek To: Merlijn Wajer Cc: Beno??t Cousson , Tony Lindgren , Rob Herring , Dmitry Torokhov , Greg Kroah-Hartman , Jeffrey Hugo , Thomas Gleixner , Borislav Petkov , Manivannan Sadhasivam , Mattias Jacobsson <2pi@mok.nu>, Russell King , Mark Gross , "open list:OMAP DEVICE TREE SUPPORT" , "open list:OMAP DEVICE TREE SUPPORT" , open list , "open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)..." Subject: Re: [PATCH 0/2] Add SW_MACHINE_COVER key Message-ID: <20200616105002.GA1718@bug> References: <20200612125402.18393-1-merlijn@wizzup.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200612125402.18393-1-merlijn@wizzup.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Fri 2020-06-12 14:53:57, Merlijn Wajer wrote: > this series adds the sw_machine_cover key, and changes the nokia n900 dts to > expose the key via gpio-keys. > > before, this gpio was used as card detect gpio, causing the card not to show up > if the phone was booted without cover, see this thread on linux-omap: > > n900: remove mmc1 "safety feature"? (was: re: mmc0 on nokia n900 on linux 5.4.18) > > since there is no realistic use for using this gpio as card detect, instead > expose it to userspace via gpio-keys. there are no event type for machine covers > yet, so add that first. > > the key should be 1 when the cover is closed, and 0 when the cover is open. > > starting the nokia n900 with the cover removed, putting the cover in place: > > event: time 1581684523.415296, type 5 (ev_sw), code 16 (?), value 1 > > removing the cover again, exposing mmc1 and the battery: > > event: time 1581684529.413706, type 5 (ev_sw), code 16 (?), value 0 Looks good to me. Acked-by: Pavel Machek Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html