lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 May 2022 17:42:14 +0530
From:   Sarthak Garg <quic_sartgarg@...cinc.com>
To:     adrian.hunter@...el.com, ulf.hansson@...aro.org
Cc:     linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, quic_kamasali@...cinc.com,
        quic_rampraka@...cinc.com, quic_pragalla@...cinc.com,
        quic_sayalil@...cinc.com, Sarthak Garg <quic_sartgarg@...cinc.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Thorsten Scherer <t.scherer@...elmann.de>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        lizhe <sensor1010@....com>
Subject: [PATCH V2 1/2] mmc: core: Define a new vendor ops to enable wakeup capability

Define a new vendor ops to let vendor initialize card as wakeup source
and enable wakeup capability specially for SDIO cards which supports
waking host from system suspend through external dedicated pins.

Signed-off-by: Sarthak Garg <quic_sartgarg@...cinc.com>
---
 drivers/mmc/core/bus.c   | 3 +++
 include/linux/mmc/host.h | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 58a60afa650b..6192a52288fd 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -364,6 +364,9 @@ int mmc_add_card(struct mmc_card *card)
 #endif
 	card->dev.of_node = mmc_of_find_child_device(card->host, 0);
 
+	if (card->host->ops->card_init_wakeup)
+		card->host->ops->card_init_wakeup(card);
+
 	device_enable_async_suspend(&card->dev);
 
 	ret = device_add(&card->dev);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index c193c50ccd78..3bd4374a64b8 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -193,6 +193,13 @@ struct mmc_host_ops {
 
 	/* Initialize an SD express card, mandatory for MMC_CAP2_SD_EXP. */
 	int	(*init_sd_express)(struct mmc_host *host, struct mmc_ios *ios);
+
+	/*
+	 * Optional for vendor to initialize card as wakeup source and
+	 * enable wakeup capability specially for SDIO cards which supports
+	 * waking host from suspend through external dedicated pins.
+	 */
+	void    (*card_init_wakeup)(struct mmc_card *card);
 };
 
 struct mmc_cqe_ops {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ