Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6753138rdb; Fri, 15 Dec 2023 07:30:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IH11F536rQa9Lki8PAVl3yqwEKREwyirq/NZl1gmkaju/gIxQys5pbBUppxf2us0CBVwuqk X-Received: by 2002:a17:90a:348c:b0:28b:3ac7:be8 with SMTP id p12-20020a17090a348c00b0028b3ac70be8mr382218pjb.76.1702654247781; Fri, 15 Dec 2023 07:30:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702654247; cv=none; d=google.com; s=arc-20160816; b=W8tZhR+mML3MJlOfMWxxnCzOtILg4yrWzIfxD4mrKnxkFMrmk/g0swJvRdGB3uQKkC WHGs9fokfvLzO/8Ey7Jlo81jhKD0ZDIG65uBsEwYJ8mPU9DkxC4sfr7GSr5IE0QlTZn3 JBRp/mRZhA0LdypnXHIsOqq3Q1uoUV0rRKPsqN/VZgh96xN24kYpphpNxRHloy2l6zmO es7qrwdRtWThXzf1fReC2TJsp+xxWheUAzYumxuRRgjIPPMmXjIPDn5slB3VLf2JGfHd JuUrLqm4bGyqub/5Mr5QZRQyTtAKNOXE7bfdw83QQKRQpFv+NwzZmmvvmuUEjjSkuA6x YHrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=ba92GFPM/tt1qfp1KdnfvaSpvE60g/HEh4qozyZtO4k=; fh=Ph26cR6uNvqWzwO33d/0FJNJTNi3ePWr0fa7V6dX3JI=; b=xXJ0+raVtN8Ojreo5lhyriX/ZfsaL+76/5QDw8cc9aj8SqRBXuLxU5jmSKZa3h020k Yp1AdP70VaxSuDpk1i73fAB3d8cKofEyplUGItQtg5SVrwLFWlBGntjPbDqg8R/Bn5W/ VqXmG3Ri+oKS7aOKr/h65e2W/H9mabWXubFf80mQzyYgVCG2xg3WLiJoJFNzi9p+dS1l ComtG1N6XkMw9vvkXDP7JcZwQCnCuiuV9pOApAyy5KIxVSmN+EI+r46LTqBIcC/EwsLD iGdTABz8O9wP0+zrUeLSxvnfPvzPI4Jo4ueTFwvCeHWqtW46JW5A92sMI1p+rHOB7skz v9tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1216-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1216-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bf9-20020a17090b0b0900b0028b406a0bebsi140970pjb.152.2023.12.15.07.30.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 07:30:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1216-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; spf=pass (google.com: domain of linux-kernel+bounces-1216-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1216-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 718782822CF for ; Fri, 15 Dec 2023 15:30:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42C4737152; Fri, 15 Dec 2023 15:30:39 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (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 8B6F3358B1; Fri, 15 Dec 2023 15:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6da5278c796so252498a34.2; Fri, 15 Dec 2023 07:30:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702654236; x=1703259036; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ba92GFPM/tt1qfp1KdnfvaSpvE60g/HEh4qozyZtO4k=; b=iJ6Q7m/Oqwrty1KY8196R8jqBzBMMfvviXVodmS+Ym02kzlsKD7y3qQ0vgVijcN3ti f296dSTVeM9tG6qFZCc6pOtKmVdUK0Wi8QWxlWVNuksRPD9QDZNDZwJP04CjNcuzEOVO 8GcF9eQTM8NKzz6ZQPdidVklXU0lOEEwT66NbNsuIYJQZ70TQ3ODhB3CZ9C7kQgmWlSp IamKYBt83t56gezzZ3iLPeTNeFkAtPtJMdO29mhpsz01zJRgfsPsjjyt19jDZMVlEbmN c6YHbwgJlPSaf+SRBm0THqZlp2XMCB1V47T5ob05vH/qo5yVoMPCpw00et6S3yROXmjm y3+g== X-Gm-Message-State: AOJu0Yy83XmIPjGrbfpzcu7r4Wnk6sWC68q5TztQUQZFPt8ktT7531ho yIWR7HBQVOVu04fl7ooU4w== X-Received: by 2002:a05:6830:11ca:b0:6da:5056:39a9 with SMTP id v10-20020a05683011ca00b006da505639a9mr918586otq.68.1702654236565; Fri, 15 Dec 2023 07:30:36 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id er5-20020a0568303c0500b006d9d144786fsm1205846otb.79.2023.12.15.07.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 07:30:35 -0800 (PST) Received: (nullmailer pid 4047793 invoked by uid 1000); Fri, 15 Dec 2023 15:30:35 -0000 Date: Fri, 15 Dec 2023 09:30:35 -0600 From: Rob Herring To: Mark Hasemeyer Cc: LKML , Raul Rangel , Frank Rowand , devicetree@vger.kernel.org Subject: Re: [PATCH v1 3/6] of: irq: add wake capable bit to of_irq_resource() Message-ID: <20231215153035.GA3996646-robh@kernel.org> References: <20231213110009.v1.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> <20231213110009.v1.3.I29b26a7f3b80fac0a618707446a10b6cc974fdaf@changeid> <20231213221959.GC2115075-robh@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 >= 0 && wakeindex == index; > > I was assuming logic described in the DT bindings: > https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-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