[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a38uGGGLA4b2bi=v8cV6-dH5yEcvBYcwr5ChzkwMTX9_Q@mail.gmail.com>
Date: Thu, 28 Jul 2022 11:09:11 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>, John Garry <john.garry@...wei.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Olof Johansson <olof@...om.net>, SoC Team <soc@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Vinod Koul <vkoul@...nel.org>,
Jonathan Marek <jonathan@...ek.ca>
Subject: Re: [PATCH 0/2] arm64 defconfig: Get faddr2line working
On Thu, Jul 28, 2022 at 10:53 AM Srinivas Kandagatla
<srinivas.kandagatla@...aro.org> wrote:
> On 28/07/2022 09:23, Arnd Bergmann wrote:
> > On Thu, Jul 28, 2022 at 10:06 AM John Garry <john.garry@...wei.com> wrote:
>
> As we are using a common driver for this, we wanted to check if the
> parent was a slimbus or not, to be able to select correct read/write
> interfaces.
>
> rethinking about this approach, It should be doable to also derive this
> information from compatible strings, Soundwire controller versions 1.3.0
> and below are always of type 1 and the newer ones are type 2.
>
> So this could get rid of IS_REACHABLE check along with references to
> slimbus_bus from driver.
Referencing slimbus_bus here is not a problem, just use IS_ENABLED()
and fix the dependency. While at it, please also
> expressing the SlimBus dependency for type 1 should be either captured
> using imply SLIMBUS or depends in Kconfig.
'imply' has no effect on compile testing, it only affects what goes in
the defconfig file, so there has a be a 'depends on'. To allow building both
with and without slimbus, but disallow the configuration with slimbus
as a loadable module and soundwire-qcom as built-in, do it like this:
diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig
index 2b7795233282..69e46cce7d8b 100644
--- a/drivers/soundwire/Kconfig
+++ b/drivers/soundwire/Kconfig
@@ -35,7 +35,7 @@ config SOUNDWIRE_INTEL
config SOUNDWIRE_QCOM
tristate "Qualcomm SoundWire Master driver"
- imply SLIMBUS
+ depends on SLIMBUS || !SLIMBUS
depends on SND_SOC
help
SoundWire Qualcomm Master driver.
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 22b706350ead..f65c7737c2db 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1289,11 +1289,7 @@ static int qcom_swrm_probe(struct platform_device *pdev)
data = of_device_get_match_data(dev);
ctrl->rows_index = sdw_find_row_index(data->default_rows);
ctrl->cols_index = sdw_find_col_index(data->default_cols);
-#if IS_REACHABLE(CONFIG_SLIMBUS)
- if (dev->parent->bus == &slimbus_bus) {
-#else
- if (false) {
-#endif
+ if (IS_ENABLED(CONFIG_SLIMBUS) && dev->parent->bus == &slimbus_bus) {
ctrl->reg_read = qcom_swrm_ahb_reg_read;
ctrl->reg_write = qcom_swrm_ahb_reg_write;
ctrl->regmap = dev_get_regmap(dev->parent, NULL);
Powered by blists - more mailing lists