Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6951765rdb; Fri, 15 Dec 2023 12:57:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0ogfTfZemAL4uPtyNMEjlYP4uImacvw+yeQs2ig1SGT18z7ps7wY6O/Pd/HyBJFNvz6H8 X-Received: by 2002:a17:90a:b88e:b0:28b:3acd:1939 with SMTP id o14-20020a17090ab88e00b0028b3acd1939mr700276pjr.35.1702673830118; Fri, 15 Dec 2023 12:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702673830; cv=none; d=google.com; s=arc-20160816; b=ewL2zY5gaHYA7P7+bZKO4z4CAMHzH8pv9Xs+o4TUeP8f6vwY3mZrj+DDLdXmnvJ4Bw ZGc/laizsISgQ8lmgzAcsja2MjISE1J4yKc5pGQs7pYIoGBUfL886oH7cDjP1BE2CYxO Y2vpEu1ezQa9O9JCAO0+zAltzCYwfJZhKG6XBke6nICRnL3PWe+uC+AoCJRQwpFkK0yZ M8eksoS2XA9tHu80poVSDSPMaeeLeIoWrAtU6v4lepXKLidl+rsmSPtFABWLCPVIfBYv TlFlnCEcdPjU27PTjlqjeJXlQBm9MljxodgE5o1RswIvkVZdrerkeRiai/BvmP+wz/UM xD8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=KAuQoOiWnChq+85EVZUVG8Ft5KehIy4YkxjTR78okx0=; fh=J4c6BZNclXuxF3i5Z4eCr2yO44csNnXBFCRuEd80S7k=; b=q5OT3yjnZsAy4WMPjZrHl/vKmrgcTtz2bRnSDHTBNTojv6rMYb5wngZzRRfso5X72p m1GXoGaDHj6TorAXLAJYqs6ukM7D9baOq6Yog96z+JPwHoHlqAKkckjdGdR1XToeMMVj oj5Y8j1vdd3fF7OoeXXSjXvc0wQeznkiGqN0wua01j4oqrZxpCFmOitN+pWa7WErIQ+T dlDbiF81Yp8PHT/YDLsTNXeXzu+tHUXagPq8Dokl71nY6+JYl2P9pmYlIGGIgSyN9r/g 4j3QGfa7+hBMB/Rjcd1z8dIqNvvTJE6UwDIQrTPNcCtmzeH8messN8me9crhGrt5m4Bd Iypw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mzIWLAdE; spf=pass (google.com: domain of linux-kernel+bounces-1645-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1645-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 z7-20020a17090abd8700b00285cc4f0e09si13568533pjr.185.2023.12.15.12.57.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 12:57:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1645-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=mzIWLAdE; spf=pass (google.com: domain of linux-kernel+bounces-1645-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1645-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 B24BD285E0B for ; Fri, 15 Dec 2023 20:57:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C84B47772; Fri, 15 Dec 2023 20:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mzIWLAdE" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) (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 34C9246527 for ; Fri, 15 Dec 2023 20:56:58 +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-f182.google.com with SMTP id 00721157ae682-5e470664062so6435997b3.0 for ; Fri, 15 Dec 2023 12:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1702673818; x=1703278618; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KAuQoOiWnChq+85EVZUVG8Ft5KehIy4YkxjTR78okx0=; b=mzIWLAdERJBGzSRo39KLXgM7MfQ9Vp0/jxsunX9Q/vnEAAiC/Togoqas8k/mRfqPoq FY1oIIStc6jBx1cCpSvae81VssRhMtRIzSuVrMoT7lMCqrZAtXTVij2+akRq/aeFOI/x bHeIgSDcRxL0WPqo4xJZnrYmSmfyR5H2JGmEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702673818; x=1703278618; h=content-transfer-encoding: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=KAuQoOiWnChq+85EVZUVG8Ft5KehIy4YkxjTR78okx0=; b=SiYHj5M2AEG2eZTXjm8OCqaiy7Zf5kfo1Fd7GJsO/oTGBNFLmnqrkVuLBo1CzEyC23 UJDpXdjQqOIGZcfi7l40XtL98dawL0M+jELx9IZz1GA5lw2M3HTub753zKvzkoxd+JH/ G6+pAAABOYuVWckHeS79QtcdyTjXEDjLI76aIx0S5ZV0GMBOxFSnoeV8zOcT2rcgDsCo p0SDFmVitHRzL/uWWmI6Zw+p2mTHUQF8F38Uqv2DeiSu16JCm3p6IdIP8wR8tCX0OdyG Z21E6RchmsPMbxhdSZ1qpXp4+jClB3SNqgUlvc4xH/I0xwH/8Uu+pKCBHvwWk29VS/2n jQ/w== X-Gm-Message-State: AOJu0YwEdRuSH73/cyqc4E2796k/2JcGuZAcsVCMgq5dc+asYWqgDsjn DgGzcbEQN6ljQI6gVPGbcYSrVk5rXclnzsKrgq+LsTO037mAv7ISEfM= X-Received: by 2002:a0d:d784:0:b0:5e4:e305:5a95 with SMTP id z126-20020a0dd784000000b005e4e3055a95mr624121ywd.54.1702673818136; Fri, 15 Dec 2023 12:56:58 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231213110009.v1.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> <20231213110009.v1.3.I29b26a7f3b80fac0a618707446a10b6cc974fdaf@changeid> <20231213221959.GC2115075-robh@kernel.org> <20231215153035.GA3996646-robh@kernel.org> In-Reply-To: <20231215153035.GA3996646-robh@kernel.org> From: Mark Hasemeyer Date: Fri, 15 Dec 2023 13:56:47 -0700 Message-ID: Subject: Re: [PATCH v1 3/6] of: irq: add wake capable bit to of_irq_resource() To: Rob Herring Cc: LKML , Raul Rangel , Frank Rowand , devicetree@vger.kernel.org, Sudeep Holla Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2023 at 8:30=E2=80=AFAM Rob Herring wrote= : > > On Thu, Dec 14, 2023 at 02:05:16PM -0700, Mark Hasemeyer wrote: > > > If a device has multiple interrupts, but none named "wakeup" you are > > > saying all the interrupts are wakeup capable. That's not right though= . > > > Only the device knows which interrupts are wakeup capable. You need: > > > > > > return wakeindex >=3D 0 && wakeindex =3D=3D index; > > > > I was assuming logic described in the DT bindings: > > https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wake= up-source.txt > > "Also, if device is marked as a wakeup source, then all the primary > > interrupt(s) can be used as wakeup interrupt(s)." > > Also not the best wording I think. > > Which interrupts are primary interrupts? > > If we can't determine which interrupt, then we should just leave it up > to the device. > > Rob +Sudeep who authored the documentation and Rob Ack'd: a68eee4c748c ("Documentation: devicetree: standardize/consolidate on "wakeup-source" property") I think what Rob is suggesting more closely matches what ACPI supports: whe= re interrupt resources are individually marked as wake capable. The binding documentation should be updated though. Something like: ``` If the device is marked as a wakeup-source, interrupt wake capability depen= ds on the device specific "interrupt-names" property. If no interrupts are lab= eled as wake capable, then it is up to the device to determine which interrupts = can wake the system. However if a device has a dedicated interrupt as the wakeup source, then it needs to specify/identify it using a device specific interrupt name. In suc= h cases only that interrupt can be used as a wakeup interrupt. While various legacy interrupt names exist, new devices should use "wakeup"= as the canonical interrupt name. ``` Parts of the kernel (I2C, bluetooth, MMC) assume "wakeup" as the interrupt-name. I added some wording to clarify the assumption. Thoughts?