Message ID | 20231220165423.v2.6.I06b059021de1bf6103e60a73211f078f2af75d17@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-7657-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp84092dyi; Wed, 20 Dec 2023 15:57:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwIPXD+3qN97Z2+2fXR0xRZLLm3tVjlHee3KBo1pcx/Wlvp/PI8zX2fwNc15R9Cn7q2VI9 X-Received: by 2002:a05:6a20:2a14:b0:193:fda5:8278 with SMTP id e20-20020a056a202a1400b00193fda58278mr598013pzh.16.1703116628009; Wed, 20 Dec 2023 15:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703116627; cv=none; d=google.com; s=arc-20160816; b=n1hBYQpKMpj2TF4pWntcb+cJfeHUkhg4WTb1ExZWpKw2dO6ROjXV3JQSnwSazwN0pA 0Xd8IDsAHeM2/krXx2Z73Dwcl6Pc6k8d/Jfgp+cE+5Nzn82wxjrRKq5ydwN5yNKKn7IK gugEUDCqgkUUUn89bt+16UFv3lP0WYq3UKrUu9G/kCjYdhlhM1XNcALVvStigjpKfDZo gqI+m9mzHYImZzClEzEybm3UwWtYcuKgy2U8c1eSazs2WHEI4WgIhbPa6RpTdSbKtxF3 ZU3EpExBJd0WdEwbea/VaXb7kbdi71yINB99av2yYGkDm4ESvCs/AYGNyq2IobhBfFNz uXUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kZeDaLYJRo5zLa/L/bxhfuH9rT1XYjT6TiTC8Trsii8=; fh=t+x2+TgvRVQL6saRQSWsmRalfs8oQtSLKQQLcgmBj78=; b=UKyeZt6fPO4ipj0EryTTtAOAIonc1oKWAHwj2JzolnyBQpRUPjJ9ng6WODIEzzzn1r FYLDYXLa4NMIB97MoUzWfi41vuxjd2ja4EASw78EbQwuaHPyGKM2hk8SY2ooXUFYyLBU LIVqZDTiibrWP9jmmovxbRFEbd3gRBoaH5u3p9xOD0C62dQTF/nhlFFrYrxKmFQ+jBiX e/HzjrRHOno71Y24es00sfk2Whwl1zgHauBBUFU8M512OuPQKTwLX/ugpEXGnO/sqwv1 BQlWwbZgcz9D8ydYRyhCh7qJR1hqIuO6zEwplphiyrelIVi5xRWMkVG9rsOVZogcpGag pJSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c1Or9FTp; spf=pass (google.com: domain of linux-kernel+bounces-7657-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7657-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f29-20020a63555d000000b005c65d0dd9a0si526237pgm.503.2023.12.20.15.57.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:57:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7657-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c1Or9FTp; spf=pass (google.com: domain of linux-kernel+bounces-7657-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7657-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 C3F0D2864AB for <ouuuleilei@gmail.com>; Wed, 20 Dec 2023 23:57:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60BED4D58D; Wed, 20 Dec 2023 23:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="c1Or9FTp" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FF364CB20 for <linux-kernel@vger.kernel.org>; Wed, 20 Dec 2023 23:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7b7fdde8b98so9328439f.1 for <linux-kernel@vger.kernel.org>; Wed, 20 Dec 2023 15:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116513; x=1703721313; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kZeDaLYJRo5zLa/L/bxhfuH9rT1XYjT6TiTC8Trsii8=; b=c1Or9FTptFd/J14gVUcRsVlsmwGZznif5GSbnzqdbbWzayd7SAhmqVt2uaXSZonXOx ba4XBfFBsDD78bhinCkcL+TLH+e4wiIjDAdbqu1xE/cZIpnfiMJusBnEnnU2z+IFoLDI JjH8vntTQsG0nx+LY68xNe+s/QtB5MdLnSkR0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116513; x=1703721313; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kZeDaLYJRo5zLa/L/bxhfuH9rT1XYjT6TiTC8Trsii8=; b=expDY0UPXTEzg7zlVNnXVeITeICqWfN8lfTcHghGSVwyrZISpKd5+EDnMoEzIT07Kl qv2Ly+cXQ8ZeqUr0Mh2+opRArzJL2WW+/Gil/FIHsUUvHbcNwqo9XM7tfsqPfZdRo4ni sQj4vRzd+GBZ8+B3ea54k2xF/4Z03C84TxHWVRde4X8KY20L+83JHrwdju8hNlDOwFC0 aL/9Ko11CcoF0/AyYJDvQkF8GkJlWyyqemICFdemalykVT3C1J1Xg5QHuT914yW3GYQt 9yW+ZM1t7Hi7HI8K46qCe+OsmdSKiPEWep+QkYkMCVbAj/AviWbXrGbi/D9Hsxgawc7n ZsyQ== X-Gm-Message-State: AOJu0YzQ+KBOFE++LplSyqqcgUItK3d3Qwhbu2w3+TgBKOT7TYlWG7R5 z6IOr5o2UdILFPwvwtbeAAtRKbegbIeYSK5Dcvc= X-Received: by 2002:a6b:c417:0:b0:7b7:d807:42bb with SMTP id y23-20020a6bc417000000b007b7d80742bbmr5876797ioa.41.1703116513408; Wed, 20 Dec 2023 15:55:13 -0800 (PST) Received: from markhas1.lan (71-218-50-136.hlrn.qwest.net. [71.218.50.136]) by smtp.gmail.com with ESMTPSA id bp22-20020a056638441600b0046b39a6f404sm177805jab.17.2023.12.20.15.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:13 -0800 (PST) From: Mark Hasemeyer <markhas@chromium.org> To: LKML <linux-kernel@vger.kernel.org> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Tzung-Bi Shih <tzungbi@kernel.org>, Raul Rangel <rrangel@chromium.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Andy Shevchenko <andriy.shevchenko@intel.com>, Rob Herring <robh@kernel.org>, Sudeep Holla <sudeep.holla@arm.com>, Mark Hasemeyer <markhas@chromium.org>, Alim Akhtar <alim.akhtar@samsung.com>, Conor Dooley <conor+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 06/22] ARM: dts: samsung: exynos5420: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:20 -0700 Message-ID: <20231220165423.v2.6.I06b059021de1bf6103e60a73211f078f2af75d17@changeid> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231220235459.2965548-1-markhas@chromium.org> References: <20231220235459.2965548-1-markhas@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785847221316628618 X-GMAIL-MSGID: 1785847221316628618 |
Series |
Improve IRQ wake capability reporting and update the cros_ec driver to use it
|
|
Commit Message
Mark Hasemeyer
Dec. 20, 2023, 11:54 p.m. UTC
The cros_ec driver currently assumes that cros-ec-spi compatible device
nodes are a wakeup-source even though the wakeup-source property is not
defined.
Add the wakeup-source property to all cros-ec-spi compatible device
nodes to match expected behavior.
Signed-off-by: Mark Hasemeyer <markhas@chromium.org>
---
Changes in v2:
-Split by arch/soc
arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts | 1 +
1 file changed, 1 insertion(+)
Comments
On 21/12/2023 00:54, Mark Hasemeyer wrote: > The cros_ec driver currently assumes that cros-ec-spi compatible device > nodes are a wakeup-source even though the wakeup-source property is not > defined. > > Add the wakeup-source property to all cros-ec-spi compatible device > nodes to match expected behavior. > You do not need this property, if driver assumes that. Just enable it unconditionally. I don't think anything from previous discussion was resolved. Best regards, Krzysztof
> You do not need this property, if driver assumes that. Just enable it > unconditionally. The goal of this patch series is to change exactly that: to prevent the driver from unconditionally enabling the irq for wake. The driver works across numerous buses (spi, uart, i2c, lpc) and supports DT and ACPI. SPI+DT systems all happen to need irq wake enabled. > I don't think anything from previous discussion was > resolved. Which previous discussion do you mean? In v1 it was suggested to split up the DTS changes by arch/soc and add a cover letter (which I did). Wrt to the binding discussion, Sudeep said the new documentation wording looked good to him [1]. [1]: https://lore.kernel.org/all/ZYAjxxHcCOgDVMTQ@bogus/
On 21/12/2023 19:29, Mark Hasemeyer wrote: >> You do not need this property, if driver assumes that. Just enable it >> unconditionally. > > The goal of this patch series is to change exactly that: to prevent > the driver from unconditionally enabling the irq for wake. But why? What is the problem being solved? Is unconditional wakeup in the driver incorrect? If so, mention it shortly in the commit msg, what is rationale because existing one does not justify this change. > The driver works across numerous buses (spi, uart, i2c, lpc) and > supports DT and ACPI. > SPI+DT systems all happen to need irq wake enabled. > >> I don't think anything from previous discussion was >> resolved. > > Which previous discussion do you mean? In v1 it was suggested to split https://lore.kernel.org/all/20231213221124.GB2115075-robh@kernel.org/ Best regards, Krzysztof
> >> You do not need this property, if driver assumes that. Just enable it > >> unconditionally. > > > > The goal of this patch series is to change exactly that: to prevent > > the driver from unconditionally enabling the irq for wake. > > But why? What is the problem being solved? Is unconditional wakeup in > the driver incorrect? If so, mention it shortly in the commit msg, what > is rationale because existing one does not justify this change. The cover letter talks about it: "Currently the cros_ec driver assumes that its associated interrupt is wake capable. This is an incorrect assumption as some Chromebooks use a separate wake pin, while others overload the interrupt for wake and IO." With the current assumption, spurious wakes can occur on systems that use a separate wake pin. I can add wording to the dts patches to help clarify. > > The driver works across numerous buses (spi, uart, i2c, lpc) and > > supports DT and ACPI. > > SPI+DT systems all happen to need irq wake enabled. > > > >> I don't think anything from previous discussion was > >> resolved. > > > > Which previous discussion do you mean? In v1 it was suggested to split > > https://lore.kernel.org/all/20231213221124.GB2115075-robh@kernel.org/ Hmm, I thought that was addressed [2]. I was referencing the existing binding documentation. From there, there was discussion about updating the docs to clarify what was actually intended (patch 3 in this series). I also addressed the ABI break concern in the thread and mentioned it in patch 22. "For device tree base systems, it is not an issue as the relevant device tree entries have been updated and DTS is built from source for each ChromeOS update." Is there a specific concern you feel is not resolved? Or can I make something more clear? [2] https://lore.kernel.org/all/CANg-bXCG61HFW7JFuAd3k+OrCG_F9F3e8brjM-pmBauS53aobQ@mail.gmail.com/
On 21/12/2023 20:24, Mark Hasemeyer wrote: >>>> You do not need this property, if driver assumes that. Just enable it >>>> unconditionally. >>> >>> The goal of this patch series is to change exactly that: to prevent >>> the driver from unconditionally enabling the irq for wake. >> >> But why? What is the problem being solved? Is unconditional wakeup in >> the driver incorrect? If so, mention it shortly in the commit msg, what >> is rationale because existing one does not justify this change. > > The cover letter talks about it: > "Currently the cros_ec driver assumes that its associated interrupt is > wake capable. This is an incorrect assumption as some Chromebooks use > a separate wake pin, while others overload the interrupt for wake and > IO." > With the current assumption, spurious wakes can occur on systems that > use a separate wake pin. This sentence would be enough. > I can add wording to the dts patches to help clarify. > >>> The driver works across numerous buses (spi, uart, i2c, lpc) and >>> supports DT and ACPI. >>> SPI+DT systems all happen to need irq wake enabled. >>> >>>> I don't think anything from previous discussion was >>>> resolved. >>> >>> Which previous discussion do you mean? In v1 it was suggested to split >> >> https://lore.kernel.org/all/20231213221124.GB2115075-robh@kernel.org/ > > Hmm, I thought that was addressed [2]. I was referencing the existing > binding documentation. From there, there was discussion about updating > the docs to clarify what was actually intended (patch 3 in this > series). I also addressed the ABI break concern in the thread and > mentioned it in patch 22. > "For device tree base systems, it is not an issue as the relevant > device tree entries have been updated and DTS is built from source for > each ChromeOS update." > > Is there a specific concern you feel is not resolved? Or can I make > something more clear? > Seems fine, thanks. Best regards, Krzysztof
On Wed, 20 Dec 2023 16:54:20 -0700, Mark Hasemeyer wrote: > The cros_ec driver currently assumes that cros-ec-spi compatible device > nodes are a wakeup-source even though the wakeup-source property is not > defined. > > Add the wakeup-source property to all cros-ec-spi compatible device > nodes to match expected behavior. > > [...] Applied, thanks! [06/22] ARM: dts: samsung: exynos5420: Enable cros-ec-spi as wake source https://git.kernel.org/krzk/linux/c/8f51b5290ff4f8a9f1c634cf42ca37cd9e90018c Best regards,
diff --git a/arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts b/arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts index 4e757b6e28e1c..3759742d38cac 100644 --- a/arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/samsung/exynos5420-peach-pit.dts @@ -967,6 +967,7 @@ cros_ec: cros-ec@0 { reg = <0>; spi-max-frequency = <3125000>; google,has-vbc-nvram; + wakeup-source; controller-data { samsung,spi-feedback-delay = <1>;