Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1651753lqm; Fri, 3 May 2024 02:11:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKqjaI3Y7JrFjDyqwdMr3IYafRVSFUiq/IstHjdKmbNsuTV/BCu/yHCKYk7GHYt8n70Uz2a4obf+fc152R2y2P775PRYkqlWV1ViAihA== X-Google-Smtp-Source: AGHT+IGgO80Mz952MknqniHCxLNxjG53IiUuub4vIJlMXQjnFEYVhHNqVgs1rYUYr/f8KixS77je X-Received: by 2002:a17:906:448:b0:a58:83ab:dca5 with SMTP id e8-20020a170906044800b00a5883abdca5mr1278509eja.62.1714727508786; Fri, 03 May 2024 02:11:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714727508; cv=pass; d=google.com; s=arc-20160816; b=idPYr6sbKFy8JGwp4YgM/9fNOjCUjlr2Grhk4BIaFiBzCcASAHOYfT4dwPa+e3GgyV FA25wdrJRoXEjUGr5OO4yqhkFGs2oVzMXmONwLfZDm86gahE53nohVnXF0DuTj40yzL9 6Pr8DkkAovIqHuVdE3v98Wu+mG9OsqeISVf542W9nOddkA3DjwOtaQ0DQ+JxOfhOrRwi Dd7ds0OXg7xb6iHzFxny0uWIYNuUsiZB/6nDyCJ6KXGJhHF0R6DWPahGatja8SP5LlAY H4rtEFpRptU83BsZexvGknqh1mDjDg23uabVr/Wamg11kJPxiorKd4A3EE6A7o9pseki gkRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=eXkQpi/4miW9P7APqqFlRshZwN0Im9H1hdJZItH7iY0=; fh=X4gzs/q3nj6H83tcHLeBUmtv0IAfJLIqsz0tB5tvrEQ=; b=WkmNxc/SZdv/pjQxNtGVOYHNY/NecNopM0HurFvL4n8j2Es2umJGKBdu+nEBFwaDx1 dTBvIeZ3VgvvrYq7c9AcMg8Hz5c4Q7b79+hjD69hjn5emV87AnHRknEqwNgiLm94QRvQ lPW+D8PNm7m3WAhsxK4XljxDwpaxmnu7WHWBm+a/dzfhmY1uu8IaFqMvFhgr4PbxwUHR goqEg2UW0CfMI2OrSRkxEJeHuxPNgNWbDHSLUrjZjvsypPU7se2PZYzQCrhuA8bvpCPY S6xBJRWWTpv6wCBDtgZv/pFyl4cotOlO+ELbpZadnWMllxPbSrHYiWiZydU4lmjsb0bb ZCdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C2bxxaql; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-167431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dk17-20020a170906f0d100b00a52537d50fcsi1390291ejb.331.2024.05.03.02.11.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:11:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C2bxxaql; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-167431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 59C6B1F2297E for ; Fri, 3 May 2024 09:11:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B44AB14F13C; Fri, 3 May 2024 09:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C2bxxaql" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 975BA14EC61; Fri, 3 May 2024 09:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714727483; cv=none; b=Mf8Vz1575K+k/tW5vc959RoPD1scT1BdU7KsfXJo48QxkB9bcn+k2F/+jfuilR8i+odFyFp8t889LRtAIrWyAWhUowIhK/gAgF5zzijZUiNrYhpvoNrlcvc1r1g0cqcFAq2ME7bjk7qHL7dx9NimpP5i0umf75lrxQvkuKdszG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714727483; c=relaxed/simple; bh=VizUIb/OLvF1/i6uxSjEVxNNv4bH0BlLFRFnbhZrHoA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eLJDwiNqQMOyKmaRrjJ2mYPAVwVW8xoR7ZuzIXxd4ikYkN9NNi1DKq/GRgoCxRjlxp2Ib+qh/25Ygc7Xf36AQ2BnB7RKT2chRZqaPaPKftmTYK8nZwIrhEFTymc7K4uOfM2lGB4GTr8qaiRHYyNJ3yHaH58gT4svhDyGaV5U/mM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C2bxxaql; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41A57C4AF14; Fri, 3 May 2024 09:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714727483; bh=VizUIb/OLvF1/i6uxSjEVxNNv4bH0BlLFRFnbhZrHoA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=C2bxxaqlPCCCktx4zWYgfeVigiW4irgVLzFAy9Qa2UpEhqgm+wgrzwXraXaAqlP5e RKPGRS6C8+IRtOw/8SM7GVFiv6FTEp0p+438mrrOdWyeaKl0L3jXPWZwSYoEvGcugo 2NQIYCsSBhza0a9/zpIFHx2csBjkVN4UDkA5AHX/rlkjjjQAwfEMzH3oLYuQ4hAnE4 hcj10/JTz9Y9BnLLZ82J3u/3AbCfs9DlHcDPScXHEZV93L2vS4mVIQdF4/F35xjNJn br7JsZ3QGIesj4nBz5Y8ZvP+/hMkxHtfOkxwb0CWeXSWXJNQ5mypySfGtuZ5ssXK7M +6rV+3qDNB7Tw== Message-ID: <48ec0bb5-a06e-4f18-97c3-1370b7facea4@kernel.org> Date: Fri, 3 May 2024 11:11:16 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/6] dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property To: Johan Hovold Cc: Johan Hovold , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Douglas Anderson , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240423134611.31979-1-johan+linaro@kernel.org> <20240423134611.31979-4-johan+linaro@kernel.org> <2e67e4e6-83a7-4153-b6a7-cdec0ab2c171@kernel.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P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3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 02/05/2024 11:56, Johan Hovold wrote: > Hi Krzysztof, > > and sorry about the late reply. Got side-tracked. > > On Thu, Apr 25, 2024 at 11:39:24AM +0200, Krzysztof Kozlowski wrote: >> On 24/04/2024 09:34, Johan Hovold wrote: >>> On Tue, Apr 23, 2024 at 06:29:44PM +0200, Krzysztof Kozlowski wrote: >>>> On 23/04/2024 15:46, Johan Hovold wrote: >>>>> When the power supply is shared with other peripherals the reset line >>>>> can be wired in such a way that it can remain deasserted regardless of >>>>> whether the supply is on or not. > >>>>> This is important as it can be used to avoid holding the controller in >>>>> reset for extended periods of time when it remains powered, something >>>>> which can lead to increased power consumption. Leaving reset deasserted >>>>> also avoids leaking current through the reset circuitry pull-up >>>>> resistors. >>>>> >>>>> Add a new 'no-reset-on-power-off' devicetree property which can be used >>>>> by the OS to determine when reset needs to be asserted on power down. >>>>> >>>>> Note that this property can also be used when the supply cannot be >>>>> turned off by the OS at all. >>> >>>>> reset-gpios: >>>>> description: Reset GPIO; not all touchscreens using eKTH6915 hook this up. >>>>> >>>>> + no-reset-on-power-off: > >>>> Anyway, the property sounds like what the OS should be doing, which is >>>> not what we want. You basically instruct driver what to do. We want a >>>> described hardware configuration or hardware specifics. >>> >>> Right, and this was why I at first rejected a property name like this in >>> favour of 'reset-pulled-to-supply' in my first draft. That name >>> obviously does not work as the 'supply' suffix is already claimed, but I >>> also realised that it doesn't really describe the hardware property that >>> allows the reset line to remain asserted. >>> >>> The key feature in this hardware design is that the reset line will not >>> just be pulled to the supply voltage (what other voltage would it be >>> pulled to), but that it is also pulled to ground when the supply is >>> disabled. >> >> OK, if the property was specific to the hardware, then I would propose >> something more hardware-related, e.g. "reset-supply-tied". However : >> >>> Rather than trying to encode this in the property name, I settled on the >>> descriptive 'no-reset-on-power-off' after the seeing the prior art in >>> 'goodix,no-reset-during-suspend' property. The latter is too specific >>> and encodes policy, but the former could still be considered hardware >>> description and would also apply to other designs which have the >>> property that the reset line should be left deasserted. >>> >>> One such example is when the supply can not be disabled at all (e.g. the >>> Goodix case), but I can imagine there being more than one way to design >>> such reset circuits. >> >> It seems it is common problem. LEDs have property >> "retain-state-shutdown", to indicate that during system shutdown we >> should not touch them (like power off). Would some variant be applicable >> here? First, do we talk here about power off like system shutdown or >> runtime PM, thus suspend? > > A name like 'retain-state-shutdown' would also be too specific as what > I'm describing here is that the reset line should be (or can be) left > deasserted whenever the OS wants to power off the device. I don't think it is more specific than yours. It is actually more generic. First, shutdown=poweroff, so that part is the same. retain-state means keep things enabled, asserted, deasserted, etc, so multiple cases. Your wording is specific - only one state is kept during power off: reset deassert. Best regards, Krzysztof