From: Bard Liao <yung-chuan.liao@linux.intel.com>
To: alsa-devel@alsa-project.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, tiwai@suse.de,
pierre-louis.bossart@linux.intel.com,
linux-kernel@vger.kernel.org, broonie@kernel.org,
bard.liao@intel.com
Subject: [PATCH 2/4] soundwire: intel/cadence: expose PING status in manager ops
Date: Thu, 14 Jul 2022 09:10:41 +0800 [thread overview]
Message-ID: <20220714011043.46059-3-yung-chuan.liao@linux.intel.com> (raw)
In-Reply-To: <20220714011043.46059-1-yung-chuan.liao@linux.intel.com>
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Simple indirection to existing register.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
drivers/soundwire/cadence_master.c | 8 ++++++++
drivers/soundwire/cadence_master.h | 2 ++
drivers/soundwire/intel.c | 1 +
3 files changed, 11 insertions(+)
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 4fbb19557f5e..615b0b63a3e1 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -756,6 +756,14 @@ cdns_reset_page_addr(struct sdw_bus *bus, unsigned int dev_num)
}
EXPORT_SYMBOL(cdns_reset_page_addr);
+u32 cdns_read_ping_status(struct sdw_bus *bus)
+{
+ struct sdw_cdns *cdns = bus_to_cdns(bus);
+
+ return cdns_readl(cdns, CDNS_MCP_SLAVE_STAT);
+}
+EXPORT_SYMBOL(cdns_read_ping_status);
+
/*
* IRQ handling
*/
diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h
index 595d72c15d97..ca9e805bab88 100644
--- a/drivers/soundwire/cadence_master.h
+++ b/drivers/soundwire/cadence_master.h
@@ -177,6 +177,8 @@ enum sdw_command_response
cdns_xfer_msg_defer(struct sdw_bus *bus,
struct sdw_msg *msg, struct sdw_defer *defer);
+u32 cdns_read_ping_status(struct sdw_bus *bus);
+
int cdns_bus_conf(struct sdw_bus *bus, struct sdw_bus_params *params);
int cdns_set_sdw_stream(struct snd_soc_dai *dai,
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 25b27cd1be1d..e1e943396e36 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -1255,6 +1255,7 @@ static struct sdw_master_ops sdw_intel_ops = {
.set_bus_conf = cdns_bus_conf,
.pre_bank_switch = intel_pre_bank_switch,
.post_bank_switch = intel_post_bank_switch,
+ .read_ping_status = cdns_read_ping_status,
};
static int intel_init(struct sdw_intel *sdw)
--
2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Bard Liao <yung-chuan.liao@linux.intel.com>
To: alsa-devel@alsa-project.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
tiwai@suse.de, broonie@kernel.org,
pierre-louis.bossart@linux.intel.com, bard.liao@intel.com
Subject: [PATCH 2/4] soundwire: intel/cadence: expose PING status in manager ops
Date: Thu, 14 Jul 2022 09:10:41 +0800 [thread overview]
Message-ID: <20220714011043.46059-3-yung-chuan.liao@linux.intel.com> (raw)
In-Reply-To: <20220714011043.46059-1-yung-chuan.liao@linux.intel.com>
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Simple indirection to existing register.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
drivers/soundwire/cadence_master.c | 8 ++++++++
drivers/soundwire/cadence_master.h | 2 ++
drivers/soundwire/intel.c | 1 +
3 files changed, 11 insertions(+)
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 4fbb19557f5e..615b0b63a3e1 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -756,6 +756,14 @@ cdns_reset_page_addr(struct sdw_bus *bus, unsigned int dev_num)
}
EXPORT_SYMBOL(cdns_reset_page_addr);
+u32 cdns_read_ping_status(struct sdw_bus *bus)
+{
+ struct sdw_cdns *cdns = bus_to_cdns(bus);
+
+ return cdns_readl(cdns, CDNS_MCP_SLAVE_STAT);
+}
+EXPORT_SYMBOL(cdns_read_ping_status);
+
/*
* IRQ handling
*/
diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h
index 595d72c15d97..ca9e805bab88 100644
--- a/drivers/soundwire/cadence_master.h
+++ b/drivers/soundwire/cadence_master.h
@@ -177,6 +177,8 @@ enum sdw_command_response
cdns_xfer_msg_defer(struct sdw_bus *bus,
struct sdw_msg *msg, struct sdw_defer *defer);
+u32 cdns_read_ping_status(struct sdw_bus *bus);
+
int cdns_bus_conf(struct sdw_bus *bus, struct sdw_bus_params *params);
int cdns_set_sdw_stream(struct snd_soc_dai *dai,
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 25b27cd1be1d..e1e943396e36 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -1255,6 +1255,7 @@ static struct sdw_master_ops sdw_intel_ops = {
.set_bus_conf = cdns_bus_conf,
.pre_bank_switch = intel_pre_bank_switch,
.post_bank_switch = intel_post_bank_switch,
+ .read_ping_status = cdns_read_ping_status,
};
static int intel_init(struct sdw_intel *sdw)
--
2.25.1
next prev parent reply other threads:[~2022-07-14 1:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 1:10 [PATCH 0/4] ASoC/soundwire: log actual PING status on resume issues Bard Liao
2022-07-14 1:10 ` Bard Liao
2022-07-14 1:10 ` [PATCH 1/4] soundwire: add read_ping_status helper definition in manager ops Bard Liao
2022-07-14 1:10 ` Bard Liao
2022-07-14 1:10 ` Bard Liao [this message]
2022-07-14 1:10 ` [PATCH 2/4] soundwire: intel/cadence: expose PING status " Bard Liao
2022-07-14 1:10 ` [PATCH 3/4] soundwire: add sdw_show_ping_status() helper Bard Liao
2022-07-14 1:10 ` Bard Liao
2022-07-14 1:10 ` [PATCH 4/4] ASoC: codecs: show PING status on resume failures Bard Liao
2022-07-14 1:10 ` Bard Liao
2022-07-14 19:21 ` Mark Brown
2022-07-14 19:21 ` Mark Brown
2022-07-18 5:43 ` Vinod Koul
2022-07-18 5:43 ` Vinod Koul
2022-07-18 5:45 ` [PATCH 0/4] ASoC/soundwire: log actual PING status on resume issues Vinod Koul
2022-07-18 5:45 ` Vinod Koul
2022-08-17 6:48 ` Liao, Bard
2022-08-17 6:48 ` Liao, Bard
2022-08-17 11:40 ` Mark Brown
2022-08-17 11:40 ` Mark Brown
2022-08-17 14:31 ` Mark Brown
2022-08-17 14:31 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220714011043.46059-3-yung-chuan.liao@linux.intel.com \
--to=yung-chuan.liao@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@linaro.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.