[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231220235459.2965548-1-markhas@chromium.org>
Date: Wed, 20 Dec 2023 16:54:14 -0700
From: Mark Hasemeyer <markhas@...omium.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Tzung-Bi Shih <tzungbi@...nel.org>,
Raul Rangel <rrangel@...omium.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Rob Herring <robh@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Mark Hasemeyer <markhas@...omium.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Andre Przywara <andre.przywara@....com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Bartosz Golaszewski <brgl@...ev.pl>,
Benson Leung <bleung@...omium.org>,
Bhanu Prakash Maiya <bhanumaiya@...omium.org>,
Bjorn Andersson <andersson@...nel.org>,
Chen-Yu Tsai <wenst@...omium.org>,
Conor Dooley <conor+dt@...nel.org>,
Daniel Scally <djrscally@...il.com>,
David Gow <davidgow@...gle.com>,
Enric Balletbo i Serra <eballetbo@...il.com>,
Frank Rowand <frowand.list@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guenter Roeck <groeck@...omium.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Heiko Stuebner <heiko@...ech.de>,
Jesper Nilsson <jesper.nilsson@...s.com>,
Jisheng Zhang <jszhang@...nel.org>,
Jonathan Hunter <jonathanh@...dia.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Lee Jones <lee@...nel.org>,
Len Brown <lenb@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mark Brown <broonie@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Patrice Chotard <patrice.chotard@...s.st.com>,
Prashant Malani <pmalani@...omium.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Rob Barnes <robbarnes@...gle.com>,
Rob Herring <robh+dt@...nel.org>,
Romain Perier <romain.perier@...il.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Stephen Boyd <swboyd@...omium.org>,
Takashi Iwai <tiwai@...e.de>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Wei Xu <xuwei5@...ilicon.com>,
Wolfram Sang <wsa@...nel.org>,
chrome-platform@...ts.linux.dev,
cros-qcom-dts-watchers@...omium.org,
devicetree@...r.kernel.org,
linux-acpi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org,
linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
linux-tegra@...r.kernel.org
Subject: [PATCH v2 00/22] Improve IRQ wake capability reporting and update the cros_ec driver to use 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.
This patch train updates the driver to query the underlying ACPI/DT data
to determine whether or not the IRQ should be enabled for wake.
Both the device tree and ACPI systems have methods for reporting IRQ
wake capability. In device tree based systems, a node can advertise
itself as a 'wakeup-source'. In ACPI based systems, GpioInt and
Interrupt resource descriptors can use the 'SharedAndWake' or
'ExclusiveAndWake' share types.
Some logic is added to the platform, ACPI, and DT subsystems to more
easily pipe wakeirq information up to the driver.
Changes in v2:
-Rebase on linux-next
-Add cover letter
-See each patch for patch specific changes
Mark Hasemeyer (22):
gpiolib: acpi: Modify acpi_dev_irq_wake_get_by() to use resource
i2c: acpi: Modify i2c_acpi_get_irq() to use resource
Documentation: devicetree: Clarify wording for wakeup-source property
ARM: dts: tegra: Enable cros-ec-spi as wake source
ARM: dts: rockchip: rk3288: Enable cros-ec-spi as wake source
ARM: dts: samsung: exynos5420: Enable cros-ec-spi as wake source
ARM: dts: samsung: exynos5800: Enable cros-ec-spi as wake source
arm64: dts: mediatek: mt8173: Enable cros-ec-spi as wake source
arm64: dts: mediatek: mt8183: Enable cros-ec-spi as wake source
arm64: dts: mediatek: mt8192: Enable cros-ec-spi as wake source
arm64: dts: mediatek: mt8195: Enable cros-ec-spi as wake source
arm64: dts: tegra: Enable cros-ec-spi as wake source
arm64: dts: qcom: sc7180: Enable cros-ec-spi as wake source
arm64: dts: qcom: sc7280: Enable cros-ec-spi as wake source
arm64: dts: qcom: sdm845: Enable cros-ec-spi as wake source
arm64: dts: rockchip: rk3399: Enable cros-ec-spi as wake source
of: irq: add wake capable bit to of_irq_resource()
of: irq: Add default implementation for of_irq_to_resource()
of: irq: Remove extern from function declarations
device property: Modify fwnode irq_get() to use resource
platform: Modify platform_get_irq_optional() to use resource
platform/chrome: cros_ec: Use PM subsystem to manage wakeirq
.../bindings/power/wakeup-source.txt | 18 +++--
arch/arm/boot/dts/nvidia/tegra124-nyan.dtsi | 1 +
arch/arm/boot/dts/nvidia/tegra124-venice2.dts | 1 +
.../rockchip/rk3288-veyron-chromebook.dtsi | 1 +
.../boot/dts/samsung/exynos5420-peach-pit.dts | 1 +
.../boot/dts/samsung/exynos5800-peach-pi.dts | 1 +
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 1 +
.../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 +
.../boot/dts/mediatek/mt8192-asurada.dtsi | 1 +
.../boot/dts/mediatek/mt8195-cherry.dtsi | 1 +
.../arm64/boot/dts/nvidia/tegra132-norrin.dts | 1 +
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 +
.../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 1 +
.../arm64/boot/dts/qcom/sc7280-idp-ec-h1.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 1 +
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 1 +
drivers/acpi/property.c | 11 ++-
drivers/base/platform.c | 74 +++++++++++++------
drivers/base/property.c | 24 +++++-
drivers/gpio/gpiolib-acpi.c | 25 ++++---
drivers/i2c/i2c-core-acpi.c | 38 +++++-----
drivers/i2c/i2c-core-base.c | 6 +-
drivers/i2c/i2c-core.h | 4 +-
drivers/of/irq.c | 32 +++++++-
drivers/of/property.c | 8 +-
drivers/platform/chrome/cros_ec.c | 9 ---
drivers/platform/chrome/cros_ec_lpc.c | 52 ++++++++++++-
drivers/platform/chrome/cros_ec_spi.c | 41 ++++++++--
drivers/platform/chrome/cros_ec_uart.c | 34 +++++++--
include/linux/acpi.h | 23 +++---
include/linux/fwnode.h | 8 +-
include/linux/of_irq.h | 41 +++++-----
include/linux/platform_data/cros_ec_proto.h | 2 -
include/linux/platform_device.h | 3 +
include/linux/property.h | 2 +
35 files changed, 328 insertions(+), 142 deletions(-)
--
2.43.0.472.g3155946c3a-goog
Powered by blists - more mailing lists