Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2489661rwb; Mon, 15 Aug 2022 06:26:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR5a8DXnKDKngo3EtLV62lWdx5dY3eQb1Jafv0YVEF7Jhirl7FHCHO8q5b1Agcn7pM6BHvch X-Received: by 2002:a17:906:847b:b0:730:638c:b154 with SMTP id hx27-20020a170906847b00b00730638cb154mr10542733ejc.618.1660569984483; Mon, 15 Aug 2022 06:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660569984; cv=none; d=google.com; s=arc-20160816; b=0Yre7pL5S0KoxFGwXzcQy2r1SsuqwV2Ka7dVR13GXfjK4QwzOiOMbTaqWSH1AzQE88 tP7/bjB09phx1TOp3IP6j2aCLFGUB+Uz2tPVKDTydGOqFwGQutyN/stVMLi5SL2kHX1a jnzeAbiqMVa0hJUmA0EUa7NslEvZBV5BhGEbMddvKlqMEa2udpuooK/sxGHDQq+c0kTZ u0YlH2dl06VjeSrSs95w/GDvIGvQrXO/oeNrVwCm5S1RYknSBnRKF8iiPE8rFMKoMxKP hW9XEZLmNoAaygmpb/tc0e05Wdr+yvAA/IcPGEOo0wBCmWd8uhb7Qi6J7IVptHUC/i6p gBEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:reply-to:cc :from:to:dkim-signature:date; bh=m6uQKUSuYYtdaLvckje+IwGlC7pNQNCHt9cAc2AS6EA=; b=uIk4aDJsbwW7g5Y048iVE4xAHQZHDtqGVj2aMqV67cYIGxFdPeEMPB1D6AtqSp/YqD F6gV1wUtZ2Drzt1RMsN9gscAEQx11zYPZhA6owglv9hhnnhgna14M2n/u5/Gk2fWw/5+ E3Usml/wNTFif94Vid/w1deMal6SOu0qTWrRwr7QclMbytSg1lduQ1+GXp87n4LTG89w tIsso9NTqSnMreRe8XcsOOkKnFCsMUW3M3hd1NmuN0Uve0cSqrfY6nv/dE4JHBISENKJ 5L47ndakjeeICjZOWvE1V2fbxcgPk4//gLHi42kMPsvmH/gjG0kr7+79wIHQOrax5oBb Dy9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=KVGreW3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=connolly.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020a17090694d800b0072b83e87339si6718257ejy.208.2022.08.15.06.25.58; Mon, 15 Aug 2022 06:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=KVGreW3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=connolly.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242945AbiHONSM (ORCPT + 99 others); Mon, 15 Aug 2022 09:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbiHONSK (ORCPT ); Mon, 15 Aug 2022 09:18:10 -0400 Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265F618358 for ; Mon, 15 Aug 2022 06:18:07 -0700 (PDT) Date: Mon, 15 Aug 2022 13:17:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1660569485; x=1660828685; bh=m6uQKUSuYYtdaLvckje+IwGlC7pNQNCHt9cAc2AS6EA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=KVGreW3Kn50rjv9OxBASDevRa18VtkDnodKjJddCFkfeqKotP66DBr0/lWVudwGQ/ PDF0oLsZTwE3nO2EQifZLwXkrMEovGwxbRBJ62Uj1nYP+vNEwv33fuzzKNCTou4yVv g2Hix1CuHtlrRDMivArDJgDDg771OrNW9gc2lQSM= To: Dmitry Torokhov From: Caleb Connolly Cc: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, phone-devel@vger.kernel.org Reply-To: Caleb Connolly Subject: Re: [PATCH 1/3] input: add event codes for user programmable switch events Message-ID: <70be22f4-7851-200b-9741-4032033f7bfc@connolly.tech> In-Reply-To: References: <20220516142158.1612109-1-caleb@connolly.tech> Feedback-ID: 10753939:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/08/2022 23:33, Dmitry Torokhov wrote: > Hi Caleb, > > On Mon, May 16, 2022 at 02:22:57PM +0000, Caleb Connolly wrote: >> Add SW_PROG{1,2,3,4} for device switches which are handled by userspace. >> >> This can be used for devices with "generic" switches which are intended >> to be user-programmable, for example OnePlus phones contain a tri-state >> key which can be used for switching between mute/vibrate/ring, or >> programmed by the user to perform any arbitrary actions. >> >> These are analogous to the keys KEY_PROG{1,2,3,4} found on some >> keyboards. Hi Dmitry, > > This has been proposed a few times but this goes against the spirit of > the input subsystem where each key or switch has a defined [default] > purpose and userspace is normally expected to act upon input events > without paying attention to what device they actually are coming from. > IOW if you want to deal with particular GPIO signals you are better off > using GPIO subsystem. > > In this context adding KEY_PROG1-4 was actually a mistake and we should > try not extend it further. > > As fas as modeling the sliders with multiple settings goes I'd look into > ABS events, probably ABS_MISC, with a set of values. Ah I wasn't aware of ABS_MISC, this looks like a good way to go. Thanks. > > Thanks. > > -- > Dmitry -- Kind Regards, Caleb