Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50B40C433F5 for ; Wed, 17 Nov 2021 20:56:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34A6B61AFD for ; Wed, 17 Nov 2021 20:56:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239493AbhKQU7j (ORCPT ); Wed, 17 Nov 2021 15:59:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239083AbhKQU7f (ORCPT ); Wed, 17 Nov 2021 15:59:35 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F394C061570 for ; Wed, 17 Nov 2021 12:56:36 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id y16so5050897ioc.8 for ; Wed, 17 Nov 2021 12:56:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GrJlquQSFqb7ld9Q1DR8e4oNe3prEb84z5HAh4ed2AM=; b=afsCAKBCIKIWX+vyZFbo/xeVsnQkBNdGAnYp5lte88IGZuNV1unaZOpAeDtT+h0+Ej Tq3pI2l1Pe+Hgk3/TKgpj3VlGYqS2WMGNugnCJXykWAKETOQrPFvP1Fhd5M02xckbaNe ym0nvf2IhGcGdrO251KeqW+vtjto4q1Rvc8fA= 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=GrJlquQSFqb7ld9Q1DR8e4oNe3prEb84z5HAh4ed2AM=; b=F/bSQpwjIgOyfkbXRrG9QV3HcZusMuFjmUb3DcnIiumPtALERMy7D266yu8NBOLuKg 4UlSiY4mJsBsG9E0HN3Z4FO25VBOX0CCrN1Y4Q+YFc+wGBROXd0XB9nuJmFf47V4jzvz hnnmAIDkU/eMQ9uzd9DrN1fUx5TPpQeOPA/00YiqHWWh8dMMLUT4TLTit2sLhiUl9wbM 90/wSCAXwTGBdyuFaiOwyR5nNl7prK/oe/VK+0XzK/WJmCKmdXBQ2+Z7T+6H2WPiSDBI HAot9feieiS8DSA8gpRe2Zz5oV7jJUV3mSQn8qKqYaQY2ykql5rgHejCPme6Hrl16sOs xupQ== X-Gm-Message-State: AOAM531ZWz+9Ckb2vhPjQQR/Zl9RdonK+XIu+iBmkyeZI/GIPsfHTT9R lNGVbUHz420taO73+GHSLtYr9mW/MlmAEQ== X-Google-Smtp-Source: ABdhPJynfLgHFuD1vrvqcRGyDVf2FSl0BCi/uj/M36tek2fU5u2LTsE4mut/N2wByDQ3/aB0bmX9DA== X-Received: by 2002:a6b:b4cc:: with SMTP id d195mr13334555iof.0.1637182595123; Wed, 17 Nov 2021 12:56:35 -0800 (PST) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com. [209.85.166.178]) by smtp.gmail.com with ESMTPSA id g1sm699441iov.23.2021.11.17.12.56.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Nov 2021 12:56:34 -0800 (PST) Received: by mail-il1-f178.google.com with SMTP id j28so4195156ila.1 for ; Wed, 17 Nov 2021 12:56:34 -0800 (PST) X-Received: by 2002:a05:6e02:18ce:: with SMTP id s14mr11662640ilu.142.1637182593782; Wed, 17 Nov 2021 12:56:33 -0800 (PST) MIME-Version: 1.0 References: <20211103234018.4009771-1-briannorris@chromium.org> <20211103164002.1.I09b516eff75ead160a6582dd557e7e7e900c9e8e@changeid> In-Reply-To: From: Doug Anderson Date: Wed, 17 Nov 2021 12:56:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] drm/input_helper: Add new input-handling helper To: Dmitry Torokhov Cc: Brian Norris , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, David Airlie , linux-rockchip@lists.infradead.org, "Kristian H . Kristensen" , Rob Clark , Rob Clark , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Nov 17, 2021 at 12:47 PM Dmitry Torokhov wrote: > > On Wed, Nov 17, 2021 at 10:38:58AM -0800, Brian Norris wrote: > > On Fri, Nov 12, 2021 at 4:52 PM Doug Anderson wrote: > > > > (Snip other comments; they seem reasonable, and I'll factor them into > > the next version) > > > > > I guess one random thought I had is whether there would be an > > > appropriate place to put this that _wasn't_ in DRM. I still wonder > > > whether we'll ever try to upstream something like the cpufreq boost > > > driver that we're carrying around and using in Chrome OS. If so, it > > > would want to use these same helpers and it'd be pretty awkward for it > > > to have to reach into DRM. ...any chance we could just land these > > > helpers somewhere more generic? > > > > Yeah, I was torn on what to do here as well. I'd rather land something > > than nothing, and when reading past conversations, it sounded like > > Dmitry didn't want this kind of thing in drivers/input/ [1]. I'd love > > to be wrong here though. > > I simply feel that input_handler is already a very simple abstraction > and trying to specialize it to simplify users further is not productive. I guess, if nothing else, it would be nice to avoid the tables that we'd have to copy between DRM and cpufreq: the set of input devices that are likely a sign that the user is interacting with the device. It always seemed weird to copy that from place to place and if there's ever a new input device to add it would be annoying to have to update it everywhere. It would be nice to avoid some of the other boilerplate code here connecting things together when all we need is a callback, but I agree that if those were copied it wouldn't be the end of the world. -Doug