Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp986255lqd; Thu, 25 Apr 2024 02:40:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXS/12zSptreuZHfCZekoSipFO4oGkBD7tCQxNq5v15elQYWu/nwYIzMMc8fYZTw9xvyDo85RoPL7g+Q8j1Mr2rk21XSK0L4roS/QPYCw== X-Google-Smtp-Source: AGHT+IHbkkSn2j3i8vL3sfOlvt/PsjBKk3NGneOVIMNQLitmz5+Ex0RSufj80YK1onVDn1M8lm2/ X-Received: by 2002:a17:903:120d:b0:1e4:8c64:33c6 with SMTP id l13-20020a170903120d00b001e48c6433c6mr6885416plh.59.1714038005510; Thu, 25 Apr 2024 02:40:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714038005; cv=pass; d=google.com; s=arc-20160816; b=r+UKpaoNodTJGfiNf3+3WlQIL2FgCJ8Btip5a7xuKNfsl/8fYLRcYaYQ97YpoBB3WW z7UkwA6cCQxOZ96KttRCdNdW/fuknm/vQoAQrd2jTR0dpsobQfPQMmI11G9OzA01N5TY C6UeASTwRnQYIL5ipDBTfRYQzDIfORbV9U7z2yPVbJo5PIWT+jZ6YjbVfU7EUxqrLdSK MayVaAkl5IXl0w9Gt3ipAXO+kj4qCFN4B7TSe5LeFiGEoa32Qmx+R4j/b0qlJ0KRGWrT 3YuOUC+ECU52CBDLxbsNEcqnHVtkbM1zx7/jiHtRfO2dQK/GqzSGIHjiyec73fCFitoe 47ZA== 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=4ytVFBE/HHXreShc+nV1WoQTNUm4U7/F32eotwbSH2Y=; fh=X4gzs/q3nj6H83tcHLeBUmtv0IAfJLIqsz0tB5tvrEQ=; b=I+BW8k/kBqD1Lm2S9x+wrsWCMVLUbf9z8i+rC82qfT8DDzVQK2Np7H4LKrqOUVqUw+ k4D3g0paP/s2objJL9VLV5wZKvP8Xg5w2+dcDantAXMcU7RGC5cXc4qREcvLpOdQlLFD 1/jkp1L9bKv4aJ1al6pFPb4pyw3UOz5ggzucNJWfOebV2ldZ+mLKBeXIGfF8zroOvEdF JEGqaeep8qCBXWim89STvAW3vhsHZsJ+ctiMqt9jverrtBWfiBwW7vcI84f6qnUcxxxN QzFFycbLAOt4EO+7aOhdm3kbZS2e5vJhPdFGjt9jWaib3bcpVigfzztkeedzZvZCibJs MSTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tm1GSJi/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158315-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e18-20020a170903241200b001e7a248eaafsi12885349plo.6.2024.04.25.02.40.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 02:40:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158315-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tm1GSJi/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158315-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158315-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 26208281D99 for ; Thu, 25 Apr 2024 09:40:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60E1F86243; Thu, 25 Apr 2024 09:39:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tm1GSJi/" 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 3944485269; Thu, 25 Apr 2024 09:39:31 +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=1714037972; cv=none; b=MVL4rXEz9okFBN60f8T6W6fKs+M0uRXlcQeoFg37enWG9rdScqCEDPs3Fowbo19GDFMPyNQ4DxcoQ80k6s+DWnWjUNGE/vkGOyUcCPE1DNX8yqGsaj5i24uHg0ssiebulK8sjBLQ17Rc+MrbjH/6i8MeRsSh/oXR+eSowz4vyRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714037972; c=relaxed/simple; bh=T7SvUzXNPNaghOVhRL4B9Uz9WmnB5ZSjgpxjLxrL+5M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a1zUxdzLdCo5Vexhypk8LfoQU1hKwpwk8dKT2CvX18ONTISVeQUGlaMRSheHlTz+0Jm8AefGc773dJeahvdQ/cRDvGuSa0kKcuh/iG2plB/cAH2TAMqiankaBs6gneLs+d8i5kgTWzfzrjvXdGZ+AyuRVMR2ET6yw2ejIBi0pdM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tm1GSJi/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7F33C113CC; Thu, 25 Apr 2024 09:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714037971; bh=T7SvUzXNPNaghOVhRL4B9Uz9WmnB5ZSjgpxjLxrL+5M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=tm1GSJi/iuVx4IbFOzTr3vtqSh5XzrLL1XU/Hp4KmTZJlzoTPuQybRrw2ib5hJhzc hHD8SgemxwTh81dlj2SQeXFrnLDjBUWFRKvm75E7WEnX0zn/Y5bO8wRfjnvJ7+eBwT yvzWJf7qdSOu2VVBzJigvGMV0Si+ND+/Y750uqbHFL0ol8p7q9Bx1F5ot7a+ifjYYk I2kvumO5sKxEcvOz8oQERj6KM6CYOuxJiar9e5CUhVzw9daMMhGy2t0Pbwms1fwPuZ G3ytUWiShsTl+/eT/7NuibyFlGUFmQFM8IJVrhyvldRG0Yeqi0ow4PxnsLP3Fu9oh2 +8zQRvc3EUm9g== Message-ID: Date: Thu, 25 Apr 2024 11:39:24 +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+QF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hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. >> >> To clarify: the reset line is still present and working in such case? > > Yes. > >>> 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: >> >> Missing vendor prefix. Unless you want to re-use existing property >> "keep-power-in-suspend", but the case here mentions power off, not suspend. > > No, I left out the prefix on purpose as I mentioned in the cover letter. > There is nothing vendor specific about this property and I expect it to > be reused for other devices. > > And "keep-power-in-suspend" is too specific and indeed looks like > instruction to the OS rather than hw description (more below), but > importantly it is not related to the problem here (which is about > reset, not power). > >> 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? Best regards, Krzysztof