Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7388489rdb; Wed, 3 Jan 2024 14:30:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBu231dpyIu8dhP0ue5idIaDaFWF2ow68ahovqXqtI0yfxCfN1C4eG8XgmULLGHe2Nt1ra X-Received: by 2002:a05:6e02:3202:b0:35f:ea6b:cecd with SMTP id cd2-20020a056e02320200b0035fea6bcecdmr26371127ilb.12.1704321017451; Wed, 03 Jan 2024 14:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704321017; cv=none; d=google.com; s=arc-20160816; b=Srb8YoXIhSNc/VGi0xJBypVaHchQOZztDfBf6nvAKDNihMdErpDtQOq13cRs4h0Qce RH9LU1FvWEjAU5zZGjwGDPhrqtF2U9o3rYfKFLySn75BNXyAPVbzzZPR345/c3sz5SH0 F5aYXitMn+ksMK2NcWfRgv7uZYEwrJ5x8hx6Ojkgh8T5hYW8BRx6jKL1KMCPbdNOjEau MHQy47k2Eh6DmaUFkeLfc6pw5VlSPji2bmmBcBakncECYm/BAN7bGb2YfDBkC1pnbGnp v++wNaw/MGlCOKc1KTq5mFh67VytBI9AnBn58OHrsWKVRUj4JbGvuJOb41YTPu7SgcuK KPEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=ZY6X4GxAISq2Dpjj0MYEasfTJvF/UOrjwVpalnx7z/Q=; fh=uc/baZHagCBeEViMedzZJJ/8zI8kE3pl+ZoNPkzviVs=; b=BpWY7ItWH6Jb0HL8CLISpdKMum3jiwHelrU4eTERvxmucE7/RFw1L+lAqPuqv/78B4 9c9vghqXbX82MDOivB8yVPFHoeoJQApbFs4KG/Dr6BkISHpFgp/ibO8Es90FS+/ISGgb SGUVmLqvgfCtYkIIqhCSuhag2Sk/4vc6L3QAnE9A4azGO9qO2wt8rPHbphUIo25cy6zn W0E04/HvpeD/xb5hQvXYvTmnatDG6eLfdIuU4x/R62c/kklHaacZFdoTpkrKnxeYPolf RAk55wP+Sy9dvFjjXX+nDUVMXkXQ3bSun2gSeXztCePmpKvzPhrpkDKnrCrfR2xQkRLY T7UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="PZPu/kxi"; spf=pass (google.com: domain of linux-kernel+bounces-16072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bs6-20020a632806000000b005cdfd48bfbesi19508467pgb.561.2024.01.03.14.30.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 14:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16072-linux.lists.archive=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="PZPu/kxi"; spf=pass (google.com: domain of linux-kernel+bounces-16072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16072-linux.lists.archive=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 510782828E4 for ; Wed, 3 Jan 2024 22:30:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35915224C9; Wed, 3 Jan 2024 22:25:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="PZPu/kxi" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (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 DB9FC224C4 for ; Wed, 3 Jan 2024 22:25:37 +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-yw1-f169.google.com with SMTP id 00721157ae682-5f00bef973aso41562237b3.0 for ; Wed, 03 Jan 2024 14:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704320737; x=1704925537; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZY6X4GxAISq2Dpjj0MYEasfTJvF/UOrjwVpalnx7z/Q=; b=PZPu/kxise+R+6qS1VJRy+zEnsN8/B4U/BDJVpT9vz3UU4q+36QjarOM+g2M9Pp8Kv M7uSdM/Vl2ts3WmlLT63oHnmEtaxDM1Etkl6SMQkFJa0SI8/D1EOdpvZ63YG4NQAevP6 5CWtgT+pdYkZvbfASd+EVUDJGGA/yniya7aaA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704320737; x=1704925537; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZY6X4GxAISq2Dpjj0MYEasfTJvF/UOrjwVpalnx7z/Q=; b=KQjJoamKfb+TyKE0piM+4oBx2eWGUHRkYQQg7iz0OISfCq+Z2cO4qpEkJVZyzJXarg 5h68H7y65A5ZSsKJMW1qkXXlMmoi3vr3SMFBXfCJIEMvasADdWZbJuRnsBZOX9FpSZQP 7dC+340/DIB20Jsi7WsxBy7Z3+qbOZONvgtK8hcX2DJ/UUV0bs1hOzlLY6ZLS4zFCu6G +yIjSQuP968gTEicT5zecl1nl9ssXIB5zq6AztuFLgHTcoBT54dGmDGRS6MrcgosrLcu o55P0b4RFu81CTBpNaG2c8AH1qszfMB9/FMWpE0P4BFuuS+9b/XA80Noh8MKGCa9pyx3 Ijog== X-Gm-Message-State: AOJu0YzVdJoCba/f2tmZCovutXjP3gIvHvSlECsUp4rj+VYUDolM41Nu 2tAJrWHSl0ihGp6+qxjOPvewrH/TIDATeXAAr/hGlx+5jLxB X-Received: by 2002:a0d:d346:0:b0:5e8:80d5:db79 with SMTP id v67-20020a0dd346000000b005e880d5db79mr16383125ywd.85.1704320736785; Wed, 03 Jan 2024 14:25:36 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240102210820.2604667-1-markhas@chromium.org> <20240102140734.v4.24.Ieee574a0e94fbaae01fd6883ffe2ceeb98d7df28@changeid> In-Reply-To: From: Mark Hasemeyer Date: Wed, 3 Jan 2024 15:25:25 -0700 Message-ID: Subject: Re: [PATCH v4 24/24] platform/chrome: cros_ec: Use PM subsystem to manage wakeirq To: Stephen Boyd Cc: LKML , Sudeep Holla , AngeloGioacchino Del Regno , Rob Herring , Andy Shevchenko , Krzysztof Kozlowski , Konrad Dybcio , Raul Rangel , Tzung-Bi Shih , Benson Leung , Bhanu Prakash Maiya , Chen-Yu Tsai , Guenter Roeck , Prashant Malani , Rob Barnes , chrome-platform@lists.linux.dev Content-Type: text/plain; charset="UTF-8" > The DTS patch would go through the platform maintainer tree and be > pulled into the soc tree and sent up to mainline from there. The > platform/chrome patch would go through chrome platform tree and then to > mainline. The bisection hole will be real. I thought it would all get merged in the next merge window. How are bifurcations like this normally dealt with? Does one wait for the first series of patches to land in mainline before submitting dependent patches? That could take two merge windows. > > > > > Does using the pm wakeirq logic require the use of 'wakeup-source' > > > property in DT? A quick glance makes me believe it isn't needed, so > > > please split that part out of this patch as well. > > > > No, 'wakeup-source' is not required, it provides an indication to the > > driver that the IRQ should be used for wake, which then enables the pm > > subsystem accordingly. If 'wakup-source' is not used, we're back to > > square one of making assumptions. Specifically in this case, it would > > be assumed that all SPI based EC's are wake capable. > > Is that the wrong assumption to make? My understanding of the DT > property is that it is used to signal that this device should be treated > as a wakeup source, when otherwise it isn't treated as one. In this > case, the device has always been treated as a wakeup source so adding > the property is redundant. For SPI, it's not the wrong assumption. I was trying to drop the assumption though to match ACPI/LPC behavior. > Making the patch series dependent on the > property being present makes the driver break without the DT change. We > try to make drivers work with older DT files, sometimes by adding > backwards compatibility code, so the presence of the wakeup-source > property should not be required to make this work. Do we have use cases where Chromebooks are running older DTBs? I get the idea in theory, but don't grasp why it's needed here. Regardless, I can update the SPI code to assume a wake capable IRQ. But I'd like to keep the prerequisite device tree patches unless there's a good reason to drop them. Specifying 'wake-source' certainly doesn't hurt anything, and there are other improvements to the OF subsystem/documentation. > What is the goal of this patch series? Is it to allow disabling the > wakeup capability of the EC wake irq from userspace? I can see a > possible problem where we want to disable wakeup for the EC dynamically > because either it has no child devices that are wakeup sources (e.g. no > power button, no keyboard on ARM) or userspace has disabled all the > wakeup sources for those child devices at runtime. In that case, we > would want to keep the EC irq from waking up the system from suspend. Is > that what you're doing here? The root of this patch series stems from a bug where spurious wakes are seen on Skyrim. Copying some wording from the DTS patches: "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. It is planned to update the driver to no longer assume that the EC interrupt pin should be enabled for wake." This patch series will allow us to disable the ec_sync pin as a wake source on Skyrim as it already uses a dedicated wake gpio.