From patchwork Wed Dec 20 23:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756579 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 586ED4BA98 for ; Wed, 20 Dec 2023 23:55:12 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eXZNoUFY" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7b7fe0ae57bso9896739f.0 for ; Wed, 20 Dec 2023 15:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116511; x=1703721311; 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=moVzHQYgk23qLvXFemqZkcgdvSUVJ85XUZMZayldchU=; b=eXZNoUFY5kGrDYszgBwIu+A0GPgmLRnEfb7PwYqw4ReaovROvnrJhwCdzSnZ4dSh4f MGempUz1PI4sZCdPzea8dLWFFpyM28LrhOX++nD3tzy03trbJDXFEcfbXMuTuaGC8EUL 1mA2QDFy0GojmZdaEB3V50Z0RIHfPhqscz0k8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116511; x=1703721311; 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=moVzHQYgk23qLvXFemqZkcgdvSUVJ85XUZMZayldchU=; b=RMO5xGcepgoe73GrdhD/CQM3V5xOi9yyhvKop2esWGn2BCXAz+seHu7MTTnAGGw/KT oUGxp+7ia5KzorevdTgShik7+OXtvh77r/s4GSb3SvkJ4Ln5Ez+SA2yRIUDxKSdBCqHA nlWEmjIvjIeol1It9AMYfCq/oYuj3lFIA60kJL4i1XfahH8YuJNhMw5NPbfa7bMlbCTj DwcqITzj/gu86pyv6LzKns0AdVQhH3Ib7AhJXMYR/F5BXPYwBV5DOW7TvhcGJdFhm45c cXtc6uVZ1RSawVR5u1V6adv+oz0+9zB7q8ZM0/K4Kc8gir7AZlS09VhiUmuK1BBOCgkS mzKw== X-Gm-Message-State: AOJu0YyxrzebW9igqeb8TfOkznM5sqn4o7+9RlgW5dj4vaYgzk33wm07 kI3+tY3Q3UiX19EukAqgSQK2ug== X-Google-Smtp-Source: AGHT+IHIYrjffUfU5PYl/Gof5mJUZa0K5TBE1VO+JQ9wu0i35S3zZy6iTiKsMWq0lfhMRfiZfNNpMQ== X-Received: by 2002:a6b:6e13:0:b0:7b7:f3f2:9a97 with SMTP id d19-20020a6b6e13000000b007b7f3f29a97mr3933437ioh.26.1703116511607; Wed, 20 Dec 2023 15:55:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:11 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Andre Przywara , Conor Dooley , Enric Balletbo i Serra , Jesper Nilsson , Jisheng Zhang , Jonathan Hunter , Krzysztof Kozlowski , Kunihiko Hayashi , Patrice Chotard , Rob Herring , Romain Perier , Thierry Reding , Wei Xu , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 04/22] ARM: dts: tegra: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:18 -0700 Message-ID: <20231220165423.v2.4.Ia598792a1386cca61844068be03c3ccec9e81753@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi | 1 + arch/arm/boot/dts/nvidia/tegra124-venice2.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi b/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi index a2ee371802004..8125c1b3e8d79 100644 --- a/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi +++ b/arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi @@ -338,6 +338,7 @@ cros_ec: cros-ec@0 { interrupt-parent = <&gpio>; interrupts = ; reg = <0>; + wakeup-source; google,cros-ec-spi-msg-delay = <2000>; diff --git a/arch/arm/boot/dts/nvidia/tegra124-venice2.dts b/arch/arm/boot/dts/nvidia/tegra124-venice2.dts index 3924ee385dee0..df98dc2a67b85 100644 --- a/arch/arm/boot/dts/nvidia/tegra124-venice2.dts +++ b/arch/arm/boot/dts/nvidia/tegra124-venice2.dts @@ -857,6 +857,7 @@ cros_ec: cros-ec@0 { interrupt-parent = <&gpio>; interrupts = ; reg = <0>; + wakeup-source; google,cros-ec-spi-msg-delay = <2000>; From patchwork Wed Dec 20 23:54:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756578 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) (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 015D14CB43 for ; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="jY0oCY2Q" Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-7b7f6caf047so7178639f.3 for ; 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=1703116514; x=1703721314; 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=06i8yMe3unqllEnKE3Q0g5bmBjz7Qwg6DF0FrSTHOkw=; b=jY0oCY2QW6zKPDJqJpJOqXHd3PRfdue/GA6fECqXaBquJjPXOnp2KG3IDeRaDEOqcA 0LUz1TlyIn7Kl2GW4tyaE7Zt/ZQx8F6LYees8joXLw4CthNDOQ+wn5+xuf5HZ2Hr3+G4 oL0/U9/1YLZH4UlA2l4CkVqPxDv7pASHgwNzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116514; x=1703721314; 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=06i8yMe3unqllEnKE3Q0g5bmBjz7Qwg6DF0FrSTHOkw=; b=a0mptv0T3+0sUKB9IAZUUWM+Kft1sDdeld1VlG4UwcLqaa8aibW0BGvYChtRipcAEa VJCVjqxh4VCFHWjmitNwmRDAAJPiM1gmwxSQ4BEVVgoGvzLYvbn9PZtSY+VRF318HSE1 jv6hXVKdix0od7VzR/HWA+IP96qwxnjLsKo1FfY/LGuHHWU+z+0VrEZWiVAOgx2vxiUN QPOnialxEkOd66QIgPuzpseTPJgw4iBUe1pw1cHLLUnOZAEoEF7UR6GiS6lrztqfnx9D hbVBFw7tbqZYVMrM9YhtPEwqYdMnGhAz7e5fM6vkdGRuz5WMltQ6ep5pGtp2RBeZKxi9 R1Pg== X-Gm-Message-State: AOJu0YwPO0xUO0Rha35PB/DNGnwrqBNxKBIinY901+uHliEbjqfA55Qx GrZNlbkRB0ZECc2ZZo/Gb7uYzw== X-Google-Smtp-Source: AGHT+IFtNsaq0EzBRu4Ew+8zNVmj75dDLgrwZJJB/sP75mn6dWM7HXO8w8QE3J+d103cQRFMUtPPIw== X-Received: by 2002:a5e:8b0d:0:b0:7ba:7de5:609f with SMTP id g13-20020a5e8b0d000000b007ba7de5609fmr1200517iok.38.1703116514370; Wed, 20 Dec 2023 15:55:14 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:14 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Alim Akhtar , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 07/22] ARM: dts: samsung: exynos5800: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:21 -0700 Message-ID: <20231220165423.v2.7.Idc995ce08a52ba4c5fde0685118ddf2873fc8acd@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts b/arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts index f91bc4ae008e4..9bbbdce9103a6 100644 --- a/arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/samsung/exynos5800-peach-pi.dts @@ -949,6 +949,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>; From patchwork Wed Dec 20 23:54:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756577 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 0AFA54B5CA for ; Wed, 20 Dec 2023 23:55:15 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="N1G5a8Pl" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7b7fdde8b98so9330139f.1 for ; Wed, 20 Dec 2023 15:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116515; x=1703721315; 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=2yCVu6I1r+NRnz/AsvfCkzFQXXECY+E6K5qe+5haxTA=; b=N1G5a8Pl6WrTyomiUFQijWqyUJclivXFLDPuqXUm1qGjwe+tpjlB3yKLug1SDEc481 ADx1NDpa75czkVpX3jeLVK/8eqImK6UPIDc2k/8AsjZFtpaB8iT2SZsy6wBWt2rFpCSU bciLHt3/DKcpYfASHnvExdxyJRjgqbRah13cE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116515; x=1703721315; 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=2yCVu6I1r+NRnz/AsvfCkzFQXXECY+E6K5qe+5haxTA=; b=cY9AHCDmFyyaigwDWZTjc/zxbDYWsPowUMoVWK9FihAuRh5UalX9WgKL2ipQOS0VRS rwhQ5wRPWe44cSpSw7EWeWEW0RR1qZfgGg/0YxThehsQNpKL+J7TzOVVj7ahmiRZ5JPd RhrzWFSfb0jhmYY/A6EO4+wJzZBNAy/+n1IfSjRuZfeqTPaCSjOimCh39CkUtIApvp/0 V+6ZKML7pKxHiWOY0VoRFBgARdAxn4fXSUZEaWRjzVvul24F8mfeoq2paCoGSGjLGe+c 0CXI9igBH4xIqcwnpS1gACceigLIXhzeODHTfXtkkIEOcMX+jZcxAEsjkDFOSdb9cnmF abPw== X-Gm-Message-State: AOJu0YxlLfZHRxDwG4/zNz+LZYcMOc9Cq0og94zO69WMtnhw1ggxTLY7 nk3CD+5TS7lmAvmG4l1ww3xELw== X-Google-Smtp-Source: AGHT+IGQS9ViCfOP9DV0BcBpVda4PiMnNXFrq7RZGrtBIBlYRUtl6txSB+SASJAG9M8UOIfTNMd85Q== X-Received: by 2002:a5e:de46:0:b0:7ba:8b76:6f65 with SMTP id e6-20020a5ede46000000b007ba8b766f65mr67557ioq.9.1703116515275; Wed, 20 Dec 2023 15:55:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:14 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Conor Dooley , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 08/22] arm64: dts: mediatek: mt8173: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:22 -0700 Message-ID: <20231220165423.v2.8.Ic09ebe116c18e83cc1161f4bb073fea8043f03f3@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi index 111495622cacd..190a3ffd81471 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi @@ -1163,6 +1163,7 @@ cros_ec: ec@0 { interrupt-parent = <&pio>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; google,cros-ec-spi-msg-delay = <500>; + wakeup-source; i2c_tunnel: i2c-tunnel0 { compatible = "google,cros-ec-i2c-tunnel"; From patchwork Wed Dec 20 23:54:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756576 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (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 02D164D13A for ; Wed, 20 Dec 2023 23:55:17 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UNa404fI" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7b913830d8eso8561239f.1 for ; Wed, 20 Dec 2023 15:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116517; x=1703721317; 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=MqwPaQqmenUw9eRcinVgTHm+ZDOG0CHY3aysuEWfhMk=; b=UNa404fIZzDDmWKdork9ZDgJDqQTFPke4qm1NHcs+1ya96f2EeSE5qngsLKy1/pvQs E9MarPSrXP4GFc92aPf4MUE5VjUXJuj348EnqGhiWhZZIYWvF9nSqR2HlX3HdR7Qo5QZ NaLK8HQmzxq1IQW9IfemCVxbOXZbCE8yenykY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116517; x=1703721317; 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=MqwPaQqmenUw9eRcinVgTHm+ZDOG0CHY3aysuEWfhMk=; b=HI/LOeXW9jyeb/9dHVkZR1ShYsaWvTpXaLExMGO9o1p9qddYmvTiw4K8QrEzn6aMTF nkkVjMUIAvkfWxvKaPxKeP23wuzaLtrJMPIFBX7Xbne+31ErqXMgN1rVLIWBv3Wl2zTg GNOxhf/qbpurLQfpZFcw/94nHBMbQ6Bqt0DNumkZAt0Cg59UJq0D08iwjp54+TyDMmdf fHpTjAAqDf3yU/lG1Ufh+QCdZvbwCNHUBc3ay58bvnSGO/m34DBlsqQWMS3izF4VbJhz kM7/S8Q8EV9wzrBRzoqOYoRhdp1prp59iUa/U5m6PoygQ9mk6FNfv6XaaDrxvelOmkzg t6cg== X-Gm-Message-State: AOJu0YytruVUNZy3hka9VdhgsUgVWYACDyYr8f4l48tWjZm0sHMsWzdj 1tdcHLpMcvQk1wsfznuvcp5XfQ== X-Google-Smtp-Source: AGHT+IGMe/Z9RFCpmHfT3jd1XYj7esK25Q3besGk8XDKQEr5sJIDR1GLwrxSPfaU1Eltl1MnNPIZww== X-Received: by 2002:a5d:8c83:0:b0:7b7:fe6c:e6d3 with SMTP id g3-20020a5d8c83000000b007b7fe6ce6d3mr2659120ion.2.1703116517315; Wed, 20 Dec 2023 15:55:17 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:17 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Conor Dooley , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 10/22] arm64: dts: mediatek: mt8192: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:24 -0700 Message-ID: <20231220165423.v2.10.Ibd330d26a00f5e219a7e448452769124833a9762@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi index f2281250ac35d..ab44d382f757e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -1332,6 +1332,7 @@ cros_ec: ec@0 { spi-max-frequency = <3000000>; pinctrl-names = "default"; pinctrl-0 = <&cros_ec_int>; + wakeup-source; #address-cells = <1>; #size-cells = <0>; From patchwork Wed Dec 20 23:54:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756575 Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (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 DD9CD4E1C8 for ; Wed, 20 Dec 2023 23:55:19 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="PhzhskKt" Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-35f519f3ea9so1031455ab.3 for ; Wed, 20 Dec 2023 15:55:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116519; x=1703721319; 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=NsTh8joUVqMg5ezobFr/U/KJPW/QvWwfP5qstPNIFW4=; b=PhzhskKtQnql6Cf6MBNgp3MbQUt4W7vUw1hDCxYygoVRAzjKYF7tudOUsnLhRQeOoX Uk0lpUNhqpkOvCrEwWpC0GZ/dUGxlAz8nVr+LBYGosS1kaittF95Nzz6OHoYpijigsUm 3gYfkyWL09zkUUJNCtl1TWpze0FGuSKQO0F/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116519; x=1703721319; 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=NsTh8joUVqMg5ezobFr/U/KJPW/QvWwfP5qstPNIFW4=; b=NMJdbiUt7fJj7UnNAhGb0upOTIfSP38c3nXYnUqXaqST3F2n3X45i2A+xwLLWva6Oa Olfl4srNhqowBiUFZeAFmzNFFo0Ebzyf03NPEUMMuAsWAE1wkunTGUvxIfUwggZ0bHmt 92xPMK0qAXYoriUHnVyasFntJM+CdEhVBQJjwU3HWMXZXZcD1FRp+mwAneXvswB77Vmz 13dKX1Aeisnv1so7MKRi86a+JmYYp77SUvCPAoA+HcY6dLPMVJeHn3bAKdi9hHMhjFZj gMMIuTBihdjZRvNe/cAGnUJPza5t+UuWyv1Jh9vybXFlsMtwAOYqqGPIXN1/Cwjm3aEf mo4Q== X-Gm-Message-State: AOJu0YzsSRey2aqnXbE6LoQne0T28n/SorEfTFSKE5a9MjDQfjJQe1s4 9mOgt/Zm9JeMIEB4XCNBqITixA== X-Google-Smtp-Source: AGHT+IHpd/hQAO+JzgPTfDrP8J99ho1LatjOhD+y+1pzGqV1gGpidEZh0CuNI5ZEZbQoXBE9btwq6A== X-Received: by 2002:a05:6e02:2607:b0:35f:9920:1111 with SMTP id by7-20020a056e02260700b0035f99201111mr9605176ilb.129.1703116519155; Wed, 20 Dec 2023 15:55:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:18 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Conor Dooley , Jonathan Hunter , Krzysztof Kozlowski , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 12/22] arm64: dts: tegra: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:26 -0700 Message-ID: <20231220165423.v2.12.Ic12bf13efe60f9ffaa444126c55a35fbf6c521cc@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm64/boot/dts/nvidia/tegra132-norrin.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts index bbc2e9bef08da..14d58859bb55c 100644 --- a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts +++ b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts @@ -762,6 +762,7 @@ ec: cros-ec@0 { interrupt-parent = <&gpio>; interrupts = ; reg = <0>; + wakeup-source; google,cros-ec-spi-msg-delay = <2000>; From patchwork Wed Dec 20 23:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756574 Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) (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 B40B94EB2E for ; Wed, 20 Dec 2023 23:55:21 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="MnbpjDzK" Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-35fc803bb29so822755ab.3 for ; Wed, 20 Dec 2023 15:55:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116521; x=1703721321; 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=bZuPqRxkPW8qurxjYx07gjm1CYO7d9uELmdtkiZRYco=; b=MnbpjDzKOaN/BhBdGaCtMaiJ3xpNomM8j7iiMCSYgNHNCA14g3C3/pl1vTx3i/Xd4G O0n5Z+HAjQLECf/wNCBpzhNbPUts/tkrVXgKOiO2xfev8yiZtEGP/iAJVY1OnK5pYN1t PTvB3j+nNoIZIY4R4v2vFaCHx4LXB0tt65sd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116521; x=1703721321; 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=bZuPqRxkPW8qurxjYx07gjm1CYO7d9uELmdtkiZRYco=; b=FtOYmpRjQVMqZHklyr9+KmKPiTnySfkDeglROcM6YprkgXQDWKKO9Gb3EJK4KQ3xU1 dWq0/gv3LNr+GNPYUEELHg87QFm7uWb0Xmo9A8umMwJaAfDhnX1eDN0Gq9LYVJaU93QL oiJkdafChvwp+sWR7m8yCRMmmxNaQbuC3rlJLNZcJlQXCgWMS0ZTljLVeR/EsPFkx0N6 RN/hD7dFtE6QNUla8TsBxVc8eAw+Oy31ksjBEQQYZRBnOdeqLtdZPRuBzHtK5+jub10m LuVNyDAidh9QbA6yWAA7iLfp+r2r2FAJMl4v6RHs/quER+7GicgL2gTbPetZce69kXBu hi3w== X-Gm-Message-State: AOJu0YyEzHv+MTFlVae7r2zsq/fJ8MqgUMwwWzwTHz++Fx2kEDoAN3rW wsYplLua5VHvE96ci/ZrkyYobA== X-Google-Smtp-Source: AGHT+IH9eKxs2gX2n0YBuAdnfEstGKr3mBLvpJ8v13Hu+3I2CjGqKVDhyAV9CBjaiJ1aNpqgRQZE1w== X-Received: by 2002:a05:6e02:1ba3:b0:35f:c678:9509 with SMTP id n3-20020a056e021ba300b0035fc6789509mr3542419ili.48.1703116520994; Wed, 20 Dec 2023 15:55:20 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:20 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Bjorn Andersson , Conor Dooley , Krzysztof Kozlowski , Rob Herring , cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 14/22] arm64: dts: qcom: sc7280: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:28 -0700 Message-ID: <20231220165423.v2.14.I7ea3f53272c9b7cd77633adfd18058ba443eed96@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 1 + arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index 9ea6636125ad9..2ba4ea60cb147 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -548,6 +548,7 @@ cros_ec: ec@0 { pinctrl-names = "default"; pinctrl-0 = <&ap_ec_int_l>; spi-max-frequency = <3000000>; + wakeup-source; cros_ec_pwm: pwm { compatible = "google,cros-ec-pwm"; diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi index ebae545c587c4..fbfac7534d3c6 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi @@ -19,6 +19,7 @@ cros_ec: ec@0 { pinctrl-names = "default"; pinctrl-0 = <&ap_ec_int_l>; spi-max-frequency = <3000000>; + wakeup-source; cros_ec_pwm: pwm { compatible = "google,cros-ec-pwm"; From patchwork Wed Dec 20 23:54:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756573 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (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 9C87F4F201 for ; Wed, 20 Dec 2023 23:55:23 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mocD4svU" Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7b7d55d7717so8994539f.2 for ; Wed, 20 Dec 2023 15:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116523; x=1703721323; 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=9SmCkbB9UhMeKs9+2qDNSyTsxiHJD2y/t1pUjGilRTg=; b=mocD4svUyULAIqzBp0tCOvIKuM+S/+OaorsVAveT04GJ95Ha2HO1WWfA5xz0XoHvwS mkxAXh/iKbvGlydhsId6mWBrJ1AaixPcYaNP00qSQWUe2bKDoRO3iAOLQobnvCs2qjDf V432LDi9YMWbpwP2T5ECRjKK/uoU5p4XArJ0A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116523; x=1703721323; 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=9SmCkbB9UhMeKs9+2qDNSyTsxiHJD2y/t1pUjGilRTg=; b=J4QSlLV8Rl8EYH3GMraBfrfGZgA9dfh+wU0Z6pyihNU4SYZglPemDXYgT3QuW433/t ix2rljljt9I3uGJudltIC3YBOtI9mwJbnahihZP1hfCqsElueWlo5/24Sq4Iv9URWAPu rDdu/rzdru2JiMqa9l0HlQe6FGih6Q0xLy53VAy7nbKI9TCHA56cbm0/gBHy/2GhtWqi P9Ar3IGtAm3ORIsKTpV3UwtRmqCYQDuIUC5bmozxs7cg61vyUrJgdDGqnUV6v22ErYyx 7y8/jQigNvmAq4DT9dM11chnENopIN25kp+erCmDmk6jminbGHslGjw+Z1MLP98RrxIJ BtFQ== X-Gm-Message-State: AOJu0Yx3UOtfo7KhHvDVYitV1xsaiO3LLuaiJtNfRjC4C2fcOtP4LqQb a8YVtZLRYv4VTNMXuQJlV7fDtQ== X-Google-Smtp-Source: AGHT+IHK/bUEHWlzooHpOwEVS9+Oxk990sSaRzHv5EcAGd37/O9A0Vk7LwOVcnNWMGNdoN2K5E8zOQ== X-Received: by 2002:a6b:7f01:0:b0:7b7:fd05:4472 with SMTP id l1-20020a6b7f01000000b007b7fd054472mr2991741ioq.18.1703116522877; Wed, 20 Dec 2023 15:55:22 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:22 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Conor Dooley , Heiko Stuebner , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH v2 16/22] arm64: dts: rockchip: rk3399: Enable cros-ec-spi as wake source Date: Wed, 20 Dec 2023 16:54:30 -0700 Message-ID: <20231220165423.v2.16.Ice617703aded22ad4c806459129e1ae693eb57af@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- Changes in v2: -Split by arch/soc arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index 789fd0dcc88ba..b5734e056aef1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -603,6 +603,7 @@ cros_ec: ec@0 { pinctrl-names = "default"; pinctrl-0 = <&ec_ap_int_l>; spi-max-frequency = <3000000>; + wakeup-source; i2c_tunnel: i2c-tunnel { compatible = "google,cros-ec-i2c-tunnel"; From patchwork Wed Dec 20 23:54:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756572 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 1E7264F885 for ; Wed, 20 Dec 2023 23:55:25 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="RTult0R2" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7b7fbe3db16so8312639f.3 for ; Wed, 20 Dec 2023 15:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116524; x=1703721324; 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=tGuZXGW/tZ1AN0p557o5C5f/tYqgvv6aKKeuF8fEKW0=; b=RTult0R2kNN/Ah8ueZDjGp0VS3HMqdkRL4Yn56i2O4KqPkVI9buwRJFYTAzWF6kU5l GaM4S3MtRxWGfsrGfiW/a0b7YgCnBjx4sqbmrHECczjC5BG7w7onpDYatWzGs5W+1ACQ It9z4KD2cNV7srisn0btvOR1nbuAGs7t6Lm5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116524; x=1703721324; 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=tGuZXGW/tZ1AN0p557o5C5f/tYqgvv6aKKeuF8fEKW0=; b=wzrQl1rUbAAfo6q4xFI8Oy9QXT2rDOGiOXsgFPPVp52wH9XiqWKEXucRQC/QrCnm+k CbyqBAmjj2rTbMBVrNhw77bzEpofs92PpnTVF4fIVMbNspsZskpF4DXXTwdOtYBqfOFT k8GhaeXK3eKy5HfDxY32ch0G6kIKun0M8iceTgh/lBLsRwUJcnbI/zjjBdzY57tIehSP 54QyyAeMFlTs/kCAoKX+uUx4iDeM4QE8AOBEJaFnIfcPrJL5uVA2/cKiTQjPJMVflwIu s79QOkzo0/NPmVPwMitkN/qw2KJXFiGOcVR1dGPyJiYybPxSLRfKHl8jiMb3Bt235lrA zNGA== X-Gm-Message-State: AOJu0Yze2YJk3vV8PUPNHJ/R45j3wPsERwP6DouDs/EOzOohEUde4EHc 90Ah23Awaii4jlTdUnxtodkp1A== X-Google-Smtp-Source: AGHT+IHwsyDhLKH4KCjyu9wSKyc/C2kTcwRhw8xhhn17ISW39v1/k+XbVmie3GgkSnB8nUOY8TufEQ== X-Received: by 2002:a6b:7305:0:b0:7b9:c344:6e77 with SMTP id e5-20020a6b7305000000b007b9c3446e77mr2318247ioh.8.1703116524433; Wed, 20 Dec 2023 15:55:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:24 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Frank Rowand , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v2 18/22] of: irq: Add default implementation for of_irq_to_resource() Date: Wed, 20 Dec 2023 16:54:32 -0700 Message-ID: <20231220165423.v2.18.I31d4dd6a7e5a3e5eee05c87b358e63cd1aa0e467@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Similar to of_irq_to_resource_table(), add a default implementation of of_irq_to_resource() for systems that don't have CONFIG_OF_IRQ defined. Signed-off-by: Mark Hasemeyer Acked-by: Rob Herring --- Changes in v2: -None include/linux/of_irq.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index d6d3eae2f1452..0d73b2ca92d31 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -34,8 +34,6 @@ static inline int of_irq_parse_oldworld(const struct device_node *device, int in extern int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq); extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); -extern int of_irq_to_resource(struct device_node *dev, int index, - struct resource *r); #ifdef CONFIG_OF_IRQ extern void of_irq_init(const struct of_device_id *matches); @@ -44,6 +42,7 @@ extern int of_irq_parse_one(struct device_node *device, int index, extern int of_irq_count(struct device_node *dev); extern int of_irq_get(struct device_node *dev, int index); extern int of_irq_get_byname(struct device_node *dev, const char *name); +extern int of_irq_to_resource(struct device_node *dev, int index, struct resource *r); extern int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs); extern struct device_node *of_irq_find_parent(struct device_node *child); @@ -76,6 +75,11 @@ static inline int of_irq_get_byname(struct device_node *dev, const char *name) { return 0; } +static inline int of_irq_to_resource(struct device_node *dev, int index, + struct resource *r) +{ + return 0; +} static inline int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs) { From patchwork Wed Dec 20 23:54:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hasemeyer X-Patchwork-Id: 756571 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (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 1F04950266 for ; Wed, 20 Dec 2023 23:55:26 +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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DBrtxpTc" Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7b913830d8eso8565939f.1 for ; Wed, 20 Dec 2023 15:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703116526; x=1703721326; 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=AD3TjuZ8z4szpVAtqglArcudpEVksAT0HzSeLd2B1Dk=; b=DBrtxpTcnWV8jJoVK8EtiBjFz+EPD3xtKcLBwoTfNlBPWsK1A4Fzq9E18e5j7elPzU Zd6UA/5o/0m78Y/o+pP3RWuO8hJbT56ii+w98WnFABSYqxBP9/QaXc6P+GsTGSdlC+tm RnxxyvOCbJOwrrsH00wHPTj5aGMsYVYYvJIZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703116526; x=1703721326; 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=AD3TjuZ8z4szpVAtqglArcudpEVksAT0HzSeLd2B1Dk=; b=PNOVbGaYCcdOmQt3Jldrlm/TU0eqN1WP+5yKksi4+hjfcKwgPx5uOX0V5Y+uBuG4X+ 8axRIcAA9rrj6qybyV6xyusJ+cjorSpTtIMyEk467l2UWrGIWkusJktsqyQzt/sqqA4P +ToNb6jsqyiMhdif/Tnw5y/87oSdfGOkXN7G3B7GXr7rrxDdPAIo7j6543rM7llR9LAK PGG+kthvB19ISjewD7r6j8URBhiGYVXKdtEqpqffsB8eiiXgT9AiDYxH1MmTUyBYuc8J S1odl8UsVIjpeZ9WqB7HICbSX81YgTGstQtu7Jy9ZAWko0FzApDz7/fkwvKknsZDBh8B we5g== X-Gm-Message-State: AOJu0YzgeXs+/gaLEAa25Lm/1czZfDoy9Gn/ipyKOGycoRSYmeyb0Lyf 7XCXuhiZFM7tm72Ngdty3klUZQ== X-Google-Smtp-Source: AGHT+IH9IT/zBs5lX+0g5tONOHtbi6Aq3OWE6gxs1xgyqopxLZmR5hvRwzgJx1wf6Aqp8B2g+WHCgQ== X-Received: by 2002:a5d:8c83:0:b0:7b7:fe6c:e6d3 with SMTP id g3-20020a5d8c83000000b007b7fe6ce6d3mr2659307ion.2.1703116526320; Wed, 20 Dec 2023 15:55:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:55:26 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Andy Shevchenko , Rob Herring , Sudeep Holla , Mark Hasemeyer , Andy Shevchenko , Daniel Scally , Frank Rowand , Greg Kroah-Hartman , Heikki Krogerus , Len Brown , "Rafael J. Wysocki" , Rob Herring , Sakari Ailus , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v2 20/22] device property: Modify fwnode irq_get() to use resource Date: Wed, 20 Dec 2023 16:54:34 -0700 Message-ID: <20231220165423.v2.20.I38ac58ab04985a404ed6551eb5813fa7841ef410@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: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The underlying ACPI and OF subsystems provide their own APIs which provide IRQ information as a struct resource. This allows callers to get more information about the IRQ by looking at the resource flags. For example, whether or not an IRQ is wake capable. Signed-off-by: Mark Hasemeyer Reviewed-by: Sakari Ailus --- Changes in v2: -New patch drivers/acpi/property.c | 11 +++++------ drivers/base/property.c | 24 +++++++++++++++++++++--- drivers/of/property.c | 8 ++++---- include/linux/fwnode.h | 8 +++++--- include/linux/property.h | 2 ++ 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index a6ead5204046b..259869987ffff 100644 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c @@ -1627,17 +1627,16 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, return 0; } -static int acpi_fwnode_irq_get(const struct fwnode_handle *fwnode, - unsigned int index) +static int acpi_fwnode_irq_get_resource(const struct fwnode_handle *fwnode, + unsigned int index, struct resource *r) { - struct resource res; int ret; - ret = acpi_irq_get(ACPI_HANDLE_FWNODE(fwnode), index, &res); + ret = acpi_irq_get(ACPI_HANDLE_FWNODE(fwnode), index, r); if (ret) return ret; - return res.start; + return r->start; } #define DECLARE_ACPI_FWNODE_OPS(ops) \ @@ -1664,7 +1663,7 @@ static int acpi_fwnode_irq_get(const struct fwnode_handle *fwnode, acpi_graph_get_remote_endpoint, \ .graph_get_port_parent = acpi_fwnode_get_parent, \ .graph_parse_endpoint = acpi_fwnode_graph_parse_endpoint, \ - .irq_get = acpi_fwnode_irq_get, \ + .irq_get_resource = acpi_fwnode_irq_get_resource, \ }; \ EXPORT_SYMBOL_GPL(ops) diff --git a/drivers/base/property.c b/drivers/base/property.c index a1b01ab420528..4f5d5ab5ab8cf 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -1047,23 +1047,41 @@ void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index) EXPORT_SYMBOL(fwnode_iomap); /** - * fwnode_irq_get - Get IRQ directly from a fwnode + * fwnode_irq_get_resource - Get IRQ directly from a fwnode and populate + * the resource struct * @fwnode: Pointer to the firmware node * @index: Zero-based index of the IRQ + * @r: Pointer to resource to populate with IRQ information. * * Return: Linux IRQ number on success. Negative errno on failure. */ -int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) +int fwnode_irq_get_resource(const struct fwnode_handle *fwnode, + unsigned int index, struct resource *r) { int ret; - ret = fwnode_call_int_op(fwnode, irq_get, index); + ret = fwnode_call_int_op(fwnode, irq_get_resource, index, r); /* We treat mapping errors as invalid case */ if (ret == 0) return -EINVAL; return ret; } +EXPORT_SYMBOL(fwnode_irq_get_resource); + +/** + * fwnode_irq_get - Get IRQ directly from a fwnode + * @fwnode: Pointer to the firmware node + * @index: Zero-based index of the IRQ + * + * Return: Linux IRQ number on success. Negative errno on failure. + */ +int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) +{ + struct resource r; + + return fwnode_irq_get_resource(fwnode, index, &r); +} EXPORT_SYMBOL(fwnode_irq_get); /** diff --git a/drivers/of/property.c b/drivers/of/property.c index afdaefbd03f61..864ea5fa5702b 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1425,10 +1425,10 @@ static void __iomem *of_fwnode_iomap(struct fwnode_handle *fwnode, int index) #endif } -static int of_fwnode_irq_get(const struct fwnode_handle *fwnode, - unsigned int index) +static int of_fwnode_irq_get_resource(const struct fwnode_handle *fwnode, + unsigned int index, struct resource *r) { - return of_irq_get(to_of_node(fwnode), index); + return of_irq_to_resource(to_of_node(fwnode), index, r); } static int of_fwnode_add_links(struct fwnode_handle *fwnode) @@ -1469,7 +1469,7 @@ const struct fwnode_operations of_fwnode_ops = { .graph_get_port_parent = of_fwnode_graph_get_port_parent, .graph_parse_endpoint = of_fwnode_graph_parse_endpoint, .iomap = of_fwnode_iomap, - .irq_get = of_fwnode_irq_get, + .irq_get_resource = of_fwnode_irq_get_resource, .add_links = of_fwnode_add_links, }; EXPORT_SYMBOL_GPL(of_fwnode_ops); diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 2a72f55d26eb8..716ed863acde0 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -9,10 +9,11 @@ #ifndef _LINUX_FWNODE_H_ #define _LINUX_FWNODE_H_ -#include -#include #include #include +#include +#include +#include struct fwnode_operations; struct device; @@ -164,7 +165,8 @@ struct fwnode_operations { int (*graph_parse_endpoint)(const struct fwnode_handle *fwnode, struct fwnode_endpoint *endpoint); void __iomem *(*iomap)(struct fwnode_handle *fwnode, int index); - int (*irq_get)(const struct fwnode_handle *fwnode, unsigned int index); + int (*irq_get_resource)(const struct fwnode_handle *fwnode, + unsigned int index, struct resource *r); int (*add_links)(struct fwnode_handle *fwnode); }; diff --git a/include/linux/property.h b/include/linux/property.h index e6516d0b7d52a..685ba72a8ce9e 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -190,6 +190,8 @@ struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode); void fwnode_handle_put(struct fwnode_handle *fwnode); int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index); +int fwnode_irq_get_resource(const struct fwnode_handle *fwnode, + unsigned int index, struct resource *r); int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name); unsigned int device_get_child_node_count(const struct device *dev);