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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 342F2C433EF for ; Thu, 23 Sep 2021 07:32:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10D4060EC0 for ; Thu, 23 Sep 2021 07:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239645AbhIWHdp (ORCPT ); Thu, 23 Sep 2021 03:33:45 -0400 Received: from mail-vs1-f44.google.com ([209.85.217.44]:39686 "EHLO mail-vs1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239577AbhIWHdn (ORCPT ); Thu, 23 Sep 2021 03:33:43 -0400 Received: by mail-vs1-f44.google.com with SMTP id o124so5603512vsc.6; Thu, 23 Sep 2021 00:32:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Del0A0BDgK2H615eS1cQ6WeLryzAAcR66Ofx7x6P3ZA=; b=zn7yYVJA3NK532FG7rh3kTjLv01o6nfQtV/d99r0857cVsFJ46sBC10SOyyA+jSmUF 5Cfo9emdJW0JTb9tua9kpuHiT5IH0sky6JxpQxPKaWc1WNrHjXEHBvEEjaVNn3EzReT6 z7cpBFdzIWXsnA4vZeDL/zQn3lH3mbFf4TYVgW73qfaj/olJZej9enI6Gqhj/ybzs2zu 1WRtw4wnxeC34lTLGoazbn42pKNRuGmf0/6LhrqEEFHqPOvG/wDvkNgqCi//ARROAl+p sSqaMX/pVKjGjJaqHtMVnjQK9GpqPyDRLiy4bgnetRjKoZ7yWPa+rAq4NzelDHnjP8jz qvoA== X-Gm-Message-State: AOAM532m8gKRBEtPynoEXkZ2Hw9jMvIIrd0ftQRd3s4fCmlApxtxd3la IpNGB4m5ReIXopkLk/7TRsaoTG/LG3AydVTmSki/UufFGIA= X-Google-Smtp-Source: ABdhPJx2iI3nIR80L07lK27EgPXYrRps/W9O7UznBHGPV5J758D0AopxFfYecnf8nhZq1uivdYplN9bTMk/5j7ijxXY= X-Received: by 2002:a05:6102:2086:: with SMTP id h6mr2800628vsr.50.1632382331911; Thu, 23 Sep 2021 00:32:11 -0700 (PDT) MIME-Version: 1.0 References: <20210922203027.3229474-1-kieran.bingham@ideasonboard.com> In-Reply-To: <20210922203027.3229474-1-kieran.bingham@ideasonboard.com> From: Geert Uytterhoeven Date: Thu, 23 Sep 2021 09:32:00 +0200 Message-ID: Subject: Re: [PATCH] arm64: dts: renesas: r8a779a0: falcon-cpu: Add SW46 switch support To: Kieran Bingham Cc: Linux-Renesas , Magnus Damm , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , Dmitry Torokhov , linux-input Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kieran, CC input On Wed, Sep 22, 2021 at 10:30 PM Kieran Bingham wrote: > Add support for SW46-1 and SW46-2 as switches using the gpio-keys > framework. > > Signed-off-by: Kieran Bingham Thanks for your patch! > --- > > SW_LID and SW_DOCK are selected as low-impact switch events for the > default configuration. Would SW_RFKILL_ALL, and SW_MUTE_DEVICE be > preferred as more 'functional' defaults? (I have otherwise avoided these > to hopefully prevent unwanted / undocumented effects occuring on > development hardware running a full interface which may parse these) > > I'd expect them to be overridden by any platform using them anyway. That's a good question BTW, I'm happy you brought this up. I discovered EV_SW only recently, and had just started wondering whether we should use it for the various slide switches on Renesas R-Car Gen2 and Gen3 boards, which are modelled using the default EV_KEY and KEY_[1-4]. I see several DTS files using EV_SW (or hardcoded 5) with KEY_* codes instead of EV_* codes, so perhaps KEY_A or KEY_B would be suited better, to avoid strange effects? But SW_LID (and KEY_RESERVED) seem to be quite popular, too. Any input^Wgood advice from the input people? TIA! > --- a/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi > +++ b/arch/arm64/boot/dts/renesas/r8a779a0-falcon-cpu.dtsi > @@ -52,6 +52,24 @@ keys { > pinctrl-0 = <&keys_pins>; > pinctrl-names = "default"; > > + sw-1 { > + gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; > + linux,code = ; > + linux,input-type = ; > + label = "SW46-1"; > + wakeup-source; > + debounce-interval = <20>; > + }; > + > + sw-2 { > + gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; > + linux,code = ; > + linux,input-type = ; > + label = "SW46-2"; > + wakeup-source; > + debounce-interval = <20>; > + }; > + > key-1 { > gpios = <&gpio6 18 GPIO_ACTIVE_LOW>; > linux,code = ; Looks good to me. > @@ -193,7 +211,8 @@ i2c6_pins: i2c6 { > }; > > keys_pins: keys { > - pins = "GP_6_18", "GP_6_19", "GP_6_20"; > + pins = "GP_1_28", "GP_1_29", > + "GP_6_18", "GP_6_19", "GP_6_20"; > bias-pull-up; > }; This part is not needed, as the GPIOs connected to the slide switches have external pull-up resistors (unlike the GPIOs connected to the push switches, which are driven low by open-drain buffers, without external pull-up resistors). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds