Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1484021rwr; Wed, 26 Apr 2023 16:09:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4em/hyoBfDeJcii11MX1t89dRt0qd1b5yOkcptuGdowVN7vR52+BMGGHZN1ddF+UIAHdYe X-Received: by 2002:a17:902:d507:b0:1a9:8769:36bd with SMTP id b7-20020a170902d50700b001a9876936bdmr11370808plg.36.1682550560518; Wed, 26 Apr 2023 16:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682550560; cv=none; d=google.com; s=arc-20160816; b=hccLMY22WAV+RQoTRn2SuCBAyVvVgCHrap/RdQfGayJcbb2GB62xCprLd32KWyVw1b rSbxTlhWxAqZI/HgfjXM1kjztJZFq8gbMNzuHvNe09mircDpH5fe//cK02NWleH59/8I WaQmhdmH9M3f7e4tBee6f1omqMl2WkuIKEBskUg5B+hL9wq3lRO6cU6Au3JaO13O5wR9 0DJ/KKJolfjuaI6Fi4Zw+GtKrFTq+tkxyVntSpdHK8XOi+kxO+nYsc6RCZ7oO3BQEyhc zLZ2mfGyRCcmVd/dsNmvRSmhDuQehi9blvhcRl9ArVvnqKXI+xQB28FxFS4tXons0L5G /Qsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UnwIOhGkuLaBbl9w7Be9qPcJQ9Y9ui6c1mraZVmd2dw=; b=vtIPz+/xWuEmn8j9zn6EaiKSePdXqzFGODDbXIFDCOrXfGFDu8GgGAPd3DPU3yrSBV +TiimpNldi7IBon6rLU7u2vEpeFDWDMHEQCAuZJjRpws1pZgr4UwYa8wHpgnNXhM6aYz rSWkP6a3qzwbZwGvw9+aY3DI6JLn4QkzKCyz0BmW1MkiikypTxSDgBIkAdrPaXmBf6j9 UVe7FN9wypAKbVOCMQpugiosRTlc4mHK2xawuVfWMdCuZWP7vhOWmK775YK/ZE6wF14f /ARzupePWvoGj/ePljU4niQ79T2YLpqyHOQFj+b1a8qBZmF3GmDOZiX38OCYvFohddn/ /sVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=g12eVio6; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik25-20020a170902ab1900b001a682651e99si17477800plb.99.2023.04.26.16.09.08; Wed, 26 Apr 2023 16:09:20 -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=@gmail.com header.s=20221208 header.b=g12eVio6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234827AbjDZW6H (ORCPT + 99 others); Wed, 26 Apr 2023 18:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240477AbjDZW6C (ORCPT ); Wed, 26 Apr 2023 18:58:02 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 094003AB2; Wed, 26 Apr 2023 15:58:00 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1a5197f00e9so60898025ad.1; Wed, 26 Apr 2023 15:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682549880; x=1685141880; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UnwIOhGkuLaBbl9w7Be9qPcJQ9Y9ui6c1mraZVmd2dw=; b=g12eVio6oB0+C4ec/weafutXhKAEzNho2q5/z5cUMC8Q0nFqHodVk9Po5lDMLdM78x y2r01EMpDYhG5HygXISaHP/F0MMMuLvmV0jSLjR9x5xHEcVbnCzVqYtdg+uoANr3zIIg XmtR6llax9sWnj+hZoVb+HCIO3Il/EYcRnmOCMsePJBDxyJ7Ey4c4cKEejvQewYD9YgT qrrIZLYqUs9SbmKjb8QTi+8PYpvvOTlZcOCOXpvH421JbwMczBP9CbS/A7eGI3dcYfx3 LpeKNz5OmFBDvJWMoC0JgaaQ57kHSDq/ZXhUJyLEVKmYQfSWQhcig1/xRp2z5AV4PFjJ UX4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682549880; x=1685141880; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UnwIOhGkuLaBbl9w7Be9qPcJQ9Y9ui6c1mraZVmd2dw=; b=kB6aPvesUONIa/GmSO6IHeET6e3tesHqZI5PRtuimXth+eUaLEF3k0ymC5dAJfhBj8 9OqYek78YTo4ZXvw7K34JLzcIO2SWsE+7qeb7YKEBiscmTuv1+hTG52fK905Lbo8r1QH 5Oud0HbmN8OFbknOjqVwyXDb+/zrnRcqLn92Qc5aZMA4V0iSyAnu+meXmL6ceXap2h9M 6jXdZrYOuYvvFgwlHfYQ6FRI4v9UWPZjHwUqs+E//IPUujwX7GQHthXF1RvMCRrUQ8oj 5pjzBGY/OEc405IdasbUp5HOxFhWDy12qMNFEZU97aEURPn63oS+qS1GiCFLsRRkQl0n Jz+w== X-Gm-Message-State: AAQBX9dKBxyUNfjqWoz7Cld3glYsyAnXxY4UFDgYhBx1Djax9guJYas7 Qydr+/koqydWNJNK+7LNFgY= X-Received: by 2002:a17:902:c949:b0:1a6:6fe3:df9e with SMTP id i9-20020a170902c94900b001a66fe3df9emr27420455pla.47.1682549880220; Wed, 26 Apr 2023 15:58:00 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:f84b:79ee:8ff:d568]) by smtp.gmail.com with ESMTPSA id x3-20020a170902ea8300b001a6aff2852dsm10385284plb.148.2023.04.26.15.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 15:57:59 -0700 (PDT) Date: Wed, 26 Apr 2023 15:57:55 -0700 From: 'Dmitry Torokhov' To: "Jingle.Wu" Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, phoenix@emc.com.tw, josh.chen@emc.com.tw, dave.wang@emc.com.tw Subject: Re: [PATCH] Input: elan_i2c - Implement inhibit/uninhibit functions. Message-ID: References: <20230320011456.986321-1-jingle.wu@emc.com.tw> <000001d96b4b$6b30cda0$419268e0$@emc.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001d96b4b$6b30cda0$419268e0$@emc.com.tw> X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 Hi Jingle, On Mon, Apr 10, 2023 at 09:26:04AM +0800, Jingle.Wu wrote: > HI Dmitry: > > > +static void elan_close(struct input_dev *input_dev) { > > + if ((input_dev->users) && (!input_dev->inhibited)) > > + elan_inhibit(input_dev); > > This check is for "only inhibit request", and elan_open() its check is for > "only uninhibit request". > Because input_dev-> open() close() will be executed 2-3 times when initial. I do not see why this would be an issue if what you are doing is putting the device into a low power mode. If this issue is about need to re-calibrate after opening the lid on certain devices, then I think we need to do the same that we did for the I2C-HID connected devices on Redrix and hook this functionality to a LID handler. Thanks. -- Dmitry