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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AC22C433EF for ; Mon, 30 May 2022 09:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233507AbiE3JAc (ORCPT ); Mon, 30 May 2022 05:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234798AbiE3JAb (ORCPT ); Mon, 30 May 2022 05:00:31 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4704E77F36; Mon, 30 May 2022 02:00:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id BA4C11F4263D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1653901229; bh=oVWZjJhb7qhA9swQsNjKyIH4iNxQFAuTs6yfX8nGbjY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BNLFSACyyunH5pzqLMctQd1Xk+suq1vnZWHFxZZmI/Im55ZJyLLoZa5/nJQPNth8z kPxqSsHZx7TobCa+Rl3/7oOdCynLTJhFqMztuXuqvA9Pt5eyYsdejdB0U3mN9MXIvv Y6IExcTX+/biME3rmT/0cVJmSoNn7MnM8kDZXzPCUifSA+obi6IiTidcUP5rH2rLmx 80VSRYqItBDC1baJ46hR0Pp4R0Ltq1edOOEo95nXr8AvciH9vfVVkX99nH4wiBEHdC X7ohDHPmCDn4yx7P047gZHKqEGVyybixkFCdPnw3WSTbjhOg/3zVEs/+Uc2cbNUx3Z TWFIjzCUUbtag== Message-ID: <524f15ad-07d1-37e1-eebb-ae86d4ee1763@collabora.com> Date: Mon, 30 May 2022 11:00:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2 1/3] Input: mtk-pmic-keys - Transfer per-key bit in mtk_pmic_keys_regs Content-Language: en-US To: Dmitry Torokhov Cc: matthias.bgg@gmail.com, mkorpershoek@baylibre.com, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220524093505.85438-1-angelogioacchino.delregno@collabora.com> <20220524093505.85438-2-angelogioacchino.delregno@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Il 27/05/22 07:34, Dmitry Torokhov ha scritto: > On Tue, May 24, 2022 at 11:35:03AM +0200, AngeloGioacchino Del Regno wrote: >> Place the key bit in struct mtk_pmic_keys_regs to enhance this >> driver's flexibility, in preparation for adding support for more >> PMICs. >> >> While at it, remove the definition of MTK_PMIC_RST_KEY_MASK as >> we are now dynamically setting the keymask relatively to the keys >> that are defined in the newly added rst_en_mask variable, on a >> per-key basis. >> >> This commit brings no functional changes. > > AngeloGioacchino, > > Could you please tell me if these devices (currently supported by the > driver) have 2 fully independent reset settings for HOME and PWR keys, > or is there are actually 2 separate bits, one to enable/disable key > reset, and another controlling what keys will cause the reset - only PWR > or either PWR or HOME? > > Thanks. > Hello Dmitry, there are two separate bits for the "Long Press Reset", you can achieve reset with either holding the power button, volume up button (register name is HOMEKEY because on very old devices this was a "home" button), or both - for a certain amount of time. If both {HOME,PWR}KEY_RST_EN bits are *not set*, the long press reset PMIC trigger will be disabled. Long-press time is controlled with the RST_DU register. Regards, Angelo