[PATCH 4/4] soundwire: bus: add missing \n in dynamic debug

2021-04-18 Thread Bard Liao
From: Pierre-Louis Bossart They were missed in previous contributions. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 3/4] soundwire: bus: handle -ENODATA errors in clock stop/start sequences

2021-04-18 Thread Bard Liao
modified to be unique and self-explanatory. Errors in sdw_slave_clk_stop_callback() were removed, they are now handled in the caller. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 69

[PATCH 2/4] soundwire: add missing kernel-doc description

2021-04-18 Thread Bard Liao
From: Pierre-Louis Bossart For some reason we never added a description for the clk_stop callback. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- include/linux/soundwire/sdw.h | 1 + 1 file changed, 1 insertion

[PATCH 1/4] soundwire: bus: only use CLOCK_STOP_MODE0 and fix confusions

2021-04-18 Thread Bard Liao
specification so it's rather unlikely that we need to re-add this mode later. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 100 ++ include/linux/soundwire/sdw.h

[PATCH 0/4] soundwire: only use CLOCK_STOP_MODE0 and handle -ENODATA

2021-04-18 Thread Bard Liao
Existing devices and implementations only support the required CLOCK_STOP_MODE0. All the code related to CLOCK_STOP_MODE1 has not been tested and is highly questionable, with a clear confusion between CLOCK_STOP_MODE1 and the simple clock stop state machine. This patch removes all usages of

[PATCH] soundwire: cadence_master: always set CMD_ACCEPT

2021-04-18 Thread Bard Liao
-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire

[PATCH v3] soundwire: intel: move to auxiliary bus

2021-04-18 Thread Bard Liao
() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated in prior iterations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- v2: - add link_dev_register for all

[PATCH] soundwire: dmi-quirks: remove duplicate initialization

2021-04-18 Thread Bard Liao
ssart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/dmi-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c index 82061c1d9835..5db0a2443a1d 10064

[PATCH v2] soundwire: intel_init: test link->cdns

2021-04-05 Thread Bard Liao
intel_link_probe() could return error and dev_get_drvdata() will return null in such case. So we have to test link->cdns after link->cdns = dev_get_drvdata(>auxdev.dev); Otherwise, we will meet the "kernel NULL pointer dereference" error. Signed-off-by: Bard Liao Reviewed-by

[PATCH v2] soundwire: intel: move to auxiliary bus

2021-03-30 Thread Bard Liao
() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated in prior iterations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- v2: - add link_dev_register for all

[PATCH 2/2] soundwire: bus: handle errors in clock stop/start sequences

2021-03-30 Thread Bard Liao
Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 70 +++-- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 9bd83c91a873..ea54a1f02252 100644

[PATCH 1/2] soundwire: add macro to selectively change error levels

2021-03-30 Thread Bard Liao
From: Pierre-Louis Bossart We sometimes discard -ENODATA when reporting errors and lose all traces of issues in the console log, add a macro to add use dev_dbg() in such cases. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[PATCH 0/2] soundwire: bus: handle errors in clock stop/start sequences

2021-03-30 Thread Bard Liao
If a device lost sync and can no longer ACK a command, it may not be able to enter a lower-power state but it will still be able to resync when the clock restarts. In those cases, we want to continue with the clock stop sequence. This patch modifies the behavior when -ENODATA is received, with

[PATCH] soundwire: intel_init: test link->cdns

2021-03-30 Thread Bard Liao
intel_link_probe() could return error and dev_get_drvdata() will return null in such case. So we have to test link->cdns after link->cdns = dev_get_drvdata(>auxdev.dev); Otherwise, we will meet the "kernel NULL pointer dereference" error. Signed-off-by: Bard Liao Reviewed-by

[PATCH] soundwire: stream: fix memory leak in stream config error path

2021-03-30 Thread Bard Liao
: Add support for SoundWire stream management") Signed-off-by: Rander Wang Reviewed-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-)

[RESEND PATCH 11/11] soundwire: stream: remove useless bus initializations

2021-03-26 Thread Bard Liao
From: Pierre-Louis Bossart There is no need to assign a pointer to NULL if it's only used in a loop and assigned within that loop. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers

[RESEND PATCH 10/11] soundwire: stream: remove useless initialization

2021-03-26 Thread Bard Liao
Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 4915676c4ac2..6a682179cd05 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c

[RESEND PATCH 08/11] soundwire: intel: remove useless readl

2021-03-26 Thread Bard Liao
-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index e2e95115832a

[RESEND PATCH 07/11] soundwire: generic_bandwidth_allocation: remove useless init

2021-03-26 Thread Bard Liao
Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/generic_bandwidth_allocation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/generic_bandwidth_allocation.c b/drivers/soundwire/generic_bandwidth_allocation.c index a9abb9722fde..805f5b6ebe86

[RESEND PATCH 09/11] soundwire: qcom: check of_property_read status

2021-03-26 Thread Bard Liao
t sure why it was missed here. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/qcom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soundwire/qcom.c

[RESEND PATCH 06/11] soundwire: bus: remove useless initialization

2021-03-26 Thread Bard Liao
Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index a38b017f7a54..1a9e307e6a4c 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -593,7 +593,7

[RESEND PATCH 03/11] soundwire: bus: use consistent tests for return values

2021-03-26 Thread Bard Liao
ski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 1c01cc192cbd..d39e5baa3e64 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bu

[RESEND PATCH 05/11] soundwire: bus: uniquify dev_err() for SCP_INT access

2021-03-26 Thread Bard Liao
Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 8b6d8fe934ae..a38b017f7a54 100644 --- a/drivers/soundwire/bus.c +++ b/drivers

[RESEND PATCH 04/11] soundwire: bus: demote clock stop prepare log to dev_dbg()

2021-03-26 Thread Bard Liao
From: Pierre-Louis Bossart There is no real reason to provide this information except for debug sessions, hence dev_dbg() is a better fit. Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard

[RESEND PATCH 02/11] soundwire: bus: test read status

2021-03-26 Thread Bard Liao
-off-by: Bard Liao --- drivers/soundwire/bus.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 04eb879de145..1c01cc192cbd 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -875,8 +875,12

[RESEND PATCH 01/11] soundwire: bus: use correct driver name in error messages

2021-03-26 Thread Bard Liao
purpose. This patch only suggests using the proper indirection. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao --- drivers/soundwire/bus_type.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff

[RESEND PATCH 00/11] soundwire: some cleanup patches

2021-03-26 Thread Bard Liao
To make soundwire driver more decent and less Cppcheck complaint. Pierre-Louis Bossart (11): soundwire: bus: use correct driver name in error messages soundwire: bus: test read status soundwire: bus: use consistent tests for return values soundwire: bus: demote clock stop prepare log to

[PATCH] soundwire: add slave device to linked list after device_register()

2021-03-22 Thread Bard Liao
Jie Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/slave.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index 112b21967c7a

[PATCH] soundwire: cadence: only prepare attached devices on clock stop

2021-03-22 Thread Bard Liao
/issues/2621 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b

[PATCH 5/5] soundwire: qcom: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/qcom.c | 2 +- 1 file changed, 1

[PATCH 4/5] soundwire: stream: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 10 +- 1 file

[PATCH 3/5] soundwire: cadence: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 2 +- 1 file

[PATCH 0/5] soundwire: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Pierre-Louis Bossart (5): soundwire: intel: add missing \n in dev_err() soundwire: bandwidth_allocation: add missing \n in dev_err() soundwire: cadence: add missing \n in dev_err() soundwire: stream:

[PATCH 2/5] soundwire: bandwidth_allocation: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/generic_bandwidth_allocation.c

[PATCH 1/5] soundwire: intel: add missing \n in dev_err()

2021-03-22 Thread Bard Liao
From: Pierre-Louis Bossart We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 18

[PATCH] soundwire: intel: move to auxiliary bus

2021-03-22 Thread Bard Liao
() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated in prior iterations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- drivers/soundwire/Kconfig

[PATCH v2 1/3] soundwire: add master quirks for bus clash and parity

2021-03-02 Thread Bard Liao
-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Guennadi Liakhovetski --- include/linux/soundwire/sdw.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index

[PATCH v2 2/3] soundwire: bus: handle master quirks for bus clash and parity

2021-03-02 Thread Bard Liao
Add optional interrupt status read/clear if the master quirks are set. In the case of the parity, the master quirk is only applied if the Slave doesn't already have a parity-related quirk. Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao

[PATCH v2 3/3] soundwire: intel: add master quirks for bus clash and parity

2021-03-02 Thread Bard Liao
Now that we have declarations and bus support, add quirks for Intel platforms. Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Guennadi Liakhovetski --- drivers/soundwire/intel.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v2 0/3] soundwire: clear bus clash/parity interrupt before the mask is enabled

2021-03-02 Thread Bard Liao
the patches sequence. - Add comments about each quirk. - Use u64 quirks. Bard Liao (3): soundwire: add master quirks for bus clash and parity soundwire: bus: handle master quirks for bus clash and parity soundwire: intel: add master quirks for bus clash and parity drivers/soundwire/bus.c

[PATCH v2 3/3] soundwire: Intel: add DMI quirk for Dell SKU 0A3E

2021-03-02 Thread Bard Liao
, with or without updates. Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski --- drivers/soundwire/dmi-quirks.c | 30 ++ 1 file changed, 30 insertions(+) diff --git

[PATCH v2 2/3] soundwire: Intel: introduce DMI quirks for HP Spectre x360 Convertible

2021-03-02 Thread Bard Liao
the existing invalid ADR information into valid ones. BugLink: https://github.com/thesofproject/linux/issues/2700 Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski --- drivers/soundwire/Makefile | 2

[PATCH v2 1/3] soundwire: add override addr ops

2021-03-02 Thread Bard Liao
From: Vinod Koul Platform firmware may have incorrect _ADR values causing the driver probes to fail. Add the override_ops, which when configured will allow for quirks based on DMI etc to override the addr values. Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Vinod Koul

[PATCH v2 0/3] soundwire: add DMI quirks for overridind addr

2021-03-02 Thread Bard Liao
Platform firmware may have incorrect _ADR values causing the driver probes to fail. Adding the override_ops allows people to override the addr values. v2: - Add the override_adr ops - Move DMI quirks to a new file Pierre-Louis Bossart (2): soundwire: Intel: introduce DMI quirks for HP

[PATCH] soundwire: bus: add better dev_dbg to track complete() calls

2021-01-26 Thread Bard Liao
From: Pierre-Louis Bossart Add a dev_dbg() log for both enumeration and initialization completion to better track suspend-resume issues. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Chao Song Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 11

[PATCH] soundwire: return earlier if no slave is attached

2021-01-26 Thread Bard Liao
Bossart Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 82df088c9333..d9deafdcf495 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire

[PATCH 3/3] soundwire: bus: clear parity interrupt before the mask is enabled

2021-01-26 Thread Bard Liao
/thesofproject/linux/issues/2533 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 9 + drivers/soundwire/intel.c | 3 ++- include/linux/soundwire/sdw.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff

[PATCH 0/3] soundwire: clear bus clash/parity interrupt before the mask is enabled

2021-01-26 Thread Bard Liao
such interrupts. The quirk should in theory have been added at the Slave level, but since the problem was detected with different generations of Slave devices it's hard to point to a specific IP. The problem might also be board-dependent and hence dealing with a Master quirk is simpler. Bard Liao (2

[PATCH 2/3] soundwire: intel: add SDW_MASTER_QUIRKS_CLEAR_INITIAL_CLASH quirk

2021-01-26 Thread Bard Liao
There is nothing we can do to handle the bus clash interrupt before interrupt mask is enabled. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soundwire/intel.c b

[PATCH 1/3] soundwire: bus: clear bus clash interrupt before the mask is enabled

2021-01-26 Thread Bard Liao
might also be board-dependent and hence dealing with a Master quirk is simpler. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 10 ++ include/linux/soundwire/sdw.h | 4 2 files changed, 14 insertions(+) diff

[RESEND PATCH v2 5/9] regmap: sdw: use _no_pm functions in regmap_read/write

2021-01-21 Thread Bard Liao
initialization is to use _no_pm routines. The duty of making sure the bus is operational needs to be handled above the regmap level. Fixes: 7c22ce6e21840 ('regmap: Add SoundWire bus support') Signed-off-by: Bard Liao --- drivers/base/regmap/regmap-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[RESEND PATCH v2 8/9] soundwire: bus: fix confusion on device used by pm_runtime

2021-01-21 Thread Bard Liao
of read/write functions') Fixes: aa79293517b39 ('soundwire: bus: fix io error when processing alert event') Fixes: 9d715fa005ebc ('soundwire: Add IO transfer') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[RESEND PATCH v2 9/9] soundwire: bus: clarify dev_err/dbg device references

2021-01-21 Thread Bard Liao
ice number is not zero, we should use >dev to provide more precisions to the user/integrator. Reported-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 63 + 1 file chang

[RESEND PATCH v2 7/9] regmap: sdw-mbq: use MODULE_LICENSE("GPL")

2021-01-21 Thread Bard Liao
"GPL v2" is the same as "GPL". It exists for historic reasons. See Documentation/process/license-rules.rst Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/base/regmap/regmap-sdw-mbq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[RESEND PATCH v2 6/9] regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ

2021-01-21 Thread Bard Liao
Use no_pm versions for write and read. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang --- drivers/base/regmap/regmap-sdw-mbq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/base/regmap/regmap-sdw-mbq.c b/drivers

[RESEND PATCH v2 4/9] soundwire: export sdw_write/read_no_pm functions

2021-01-21 Thread Bard Liao
sdw_write_no_pm and sdw_read_no_pm are useful when we want to do IO without touching PM. Fixes: 0231453bc08f ('soundwire: bus: add clock stop helpers') Fixes: 60ee9be25571 ('soundwire: bus: add PM/no-PM versions of read/write functions') Signed-off-by: Bard Liao --- drivers/soundwire/bus.c

[RESEND PATCH v2 3/9] soundwire: bus: use no_pm IO routines for all interrupt handling

2021-01-21 Thread Bard Liao
From: Pierre-Louis Bossart There is no need to play with pm_runtime reference counts, if needed the codec drivers are already explicitly resumed. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 26

[RESEND PATCH v2 1/9] soundwire: bus: use sdw_update_no_pm when initializing a device

2021-01-21 Thread Bard Liao
('soundwire: bus: add PM/no-PM versions of read/write functions') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers

[RESEND PATCH v2 2/9] soundwire: bus: use sdw_write_no_pm when setting the bus scale registers

2021-01-21 Thread Bard Liao
problem as the previous one, but is split to make the life of linux-stable maintainers less painful. Fixes: 29d158f90690 ('soundwire: bus: initialize bus clock base and scale registers') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[RESEND PATCH v2 0/9] soundwire/regmap: use _no_pm routines

2021-01-21 Thread Bard Liao
rding to maintainer's comments. Bard Liao (4): soundwire: export sdw_write/read_no_pm functions regmap: sdw: use _no_pm functions in regmap_read/write regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ regmap: sdw-mbq: use MODULE_LICENSE("GPL") Pierre-Louis Bossart (5): s

[PATCH 1/2] ASoC: codecs: soundwire: increase resume timeout

2021-01-14 Thread Bard Liao
Signed-off-by: Bard Liao --- sound/soc/codecs/max98373-sdw.c | 4 +++- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682.h | 2 +- sound/soc/codecs/rt700-sdw.c| 2 +- sound/soc/codecs/rt711-sdw.c| 2 +- sound/soc/codecs/rt715-sdw.c| 2 +- 6 files changed, 8

[PATCH 2/2] soundwire: cadence: reduce timeout on transactions

2021-01-14 Thread Bard Liao
than generous. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 9fa55164354a..f0b0ec173f8b 100644

[PATCH 0/2] ASoC/SoundWire: fix timeout values

2021-01-14 Thread Bard Liao
The timeout for an individual transaction w/ the Cadence IP is the same as the entire resume operation for codecs. This doesn't make sense, we need to have at least one order of magnitude between individual transactions and the entire resume operation. Set the timeout on the Cadence side to 500ms

[PATCH 5/5] soundwire: cadence: adjust verbosity in response handling

2021-01-14 Thread Bard Liao
devices to enumerate We can skip the 'Msg Ack not received' since it's typical of the enumeration end, and conversely add the information on which command fails. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 4 ++-- 1 file changed, 2 insertions

[PATCH 4/5] soundwire: cadence: fix ACK/NAK handling

2021-01-14 Thread Bard Liao
sdw_master_ops and IO transfer support') Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/cadence_master.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index

[PATCH 3/5] soundwire: bus: add more details to track failed transfers

2021-01-14 Thread Bard Liao
-by: Bard Liao --- drivers/soundwire/bus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 3cc006bfae71..6e1c988f3845 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -267,8 +267,10 @@ static int

[PATCH 2/5] soundwire: cadence: add status in dev_dbg 'State change' log

2021-01-14 Thread Bard Liao
ndwire sdw-master-0: No more devices to enumerate [ 121.892200] intel-sdw intel-sdw.0: Slave status change: 0x21 << this shows the device now Attached as Device1 and Unattached as Device0, i.e. a successful enumeration. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drive

[PATCH 1/5] soundwire: use consistent format for Slave devID logs

2021-01-14 Thread Bard Liao
-by: Bard Liao --- drivers/soundwire/bus.c | 5 ++--- drivers/soundwire/slave.c | 10 -- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index d1e8c3a54976..3cc006bfae71 100644 --- a/drivers/soundwire/bus.c +++ b/drivers

[PATCH 0/5] soundwire: fix ACK/NAK handling and improve log

2021-01-14 Thread Bard Liao
. Bard Liao (1): soundwire: bus: add more details to track failed transfers Pierre-Louis Bossart (4): soundwire: use consistent format for Slave devID logs soundwire: cadence: add status in dev_dbg 'State change' log soundwire: cadence: fix ACK/NAK handling soundwire: cadence: adjust verbosity

[PATCH] soundwire: intel: don't return error when clock stop failed

2021-01-13 Thread Bard Liao
tiated interrupts may be lost, but at least audio function can still work after resume. Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH 2/2] device property: add description of fwnode cases

2021-01-05 Thread Bard Liao
it in the code so people will keep it in mind. Signed-off-by: Bard Liao --- drivers/base/core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/base/core.c b/drivers/base/core.c index 51b9545a050b..17eb14607074 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -

[PATCH 0/2] Revert "device property: Keep secondary firmware node secondary by type"

2021-01-05 Thread Bard Liao
_primary_fwnode()") was fully correct. Thus, revert the former one here and improve documentation. Bard Liao (2): Revert "device property: Keep secondary firmware node secondary by type" device property: add description of fwnode cases drivers/base/core.c | 9 - 1 fi

[PATCH 1/2] Revert "device property: Keep secondary firmware node secondary by type"

2021-01-05 Thread Bard Liao
e node handling in set_primary_fwnode()") was fully correct. Thus, revert the former one here and improve documentation in the next patch. Fixes: d5dcce0c414f ("device property: Keep secondary firmware node secondary by type") Signed-off-by: Bard Liao --- drivers/base/core.c | 2 +- 1 file chang

[PATCH v2 9/9] soundwire: bus: clarify dev_err/dbg device references

2020-12-08 Thread Bard Liao
ice number is not zero, we should use >dev to provide more precisions to the user/integrator. Reported-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 63 + 1 file chang

[PATCH v2 7/9] regmap: sdw-mbq: use MODULE_LICENSE("GPL")

2020-12-08 Thread Bard Liao
"GPL v2" is the same as "GPL". It exists for historic reasons. See Documentation/process/license-rules.rst Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/base/regmap/regmap-sdw-mbq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 8/9] soundwire: bus: fix confusion on device used by pm_runtime

2020-12-08 Thread Bard Liao
of read/write functions') Fixes: aa79293517b39 ('soundwire: bus: fix io error when processing alert event') Fixes: 9d715fa005ebc ('soundwire: Add IO transfer') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH v2 5/9] regmap: sdw: use _no_pm functions in regmap_read/write

2020-12-08 Thread Bard Liao
initialization is to use _no_pm routines. The duty of making sure the bus is operational needs to be handled above the regmap level. Fixes: 7c22ce6e21840 ('regmap: Add SoundWire bus support') Signed-off-by: Bard Liao --- drivers/base/regmap/regmap-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 6/9] regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ

2020-12-08 Thread Bard Liao
Use no_pm versions for write and read. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang --- drivers/base/regmap/regmap-sdw-mbq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/base/regmap/regmap-sdw-mbq.c b/drivers

[PATCH v2 3/9] soundwire: bus: use no_pm IO routines for all interrupt handling

2020-12-08 Thread Bard Liao
From: Pierre-Louis Bossart There is no need to play with pm_runtime reference counts, if needed the codec drivers are already explicitly resumed. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 26

[PATCH v2 4/9] soundwire: export sdw_write/read_no_pm functions

2020-12-08 Thread Bard Liao
sdw_write_no_pm and sdw_read_no_pm are useful when we want to do IO without touching PM. Fixes: 0231453bc08f ('soundwire: bus: add clock stop helpers') Fixes: 60ee9be25571 ('soundwire: bus: add PM/no-PM versions of read/write functions') Signed-off-by: Bard Liao --- drivers/soundwire/bus.c

[PATCH v2 2/9] soundwire: bus: use sdw_write_no_pm when setting the bus scale registers

2020-12-08 Thread Bard Liao
problem as the previous one, but is split to make the life of linux-stable maintainers less painful. Fixes: 29d158f90690 ('soundwire: bus: initialize bus clock base and scale registers') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH v2 1/9] soundwire: bus: use sdw_update_no_pm when initializing a device

2020-12-08 Thread Bard Liao
('soundwire: bus: add PM/no-PM versions of read/write functions') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers

[PATCH v2 0/9] soundwire/regmap: use _no_pm routines

2020-12-08 Thread Bard Liao
rding to maintainer's comments. Bard Liao (4): soundwire: export sdw_write/read_no_pm functions regmap: sdw: use _no_pm functions in regmap_read/write regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ regmap: sdw-mbq: use MODULE_LICENSE("GPL") Pierre-Louis Bossart (5): s

[PATCH 6/7] soundwire: bus: fix confusion on device used by pm_runtime

2020-12-03 Thread Bard Liao
of read/write functions') Fixes: aa79293517b39 ('soundwire: bus: fix io error when processing alert event') Fixes: 9d715fa005ebc ('soundwire: Add IO transfer') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH 7/7] soundwire: bus: clarify dev_err/dbg device references

2020-12-03 Thread Bard Liao
ice number is not zero, we should use >dev to provide more precisions to the user/integrator. Reported-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 63 + 1 file chang

[PATCH 5/7] regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ

2020-12-03 Thread Bard Liao
Use no_pm versions for write and read. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang --- drivers/base/regmap/regmap-sdw-mbq.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regmap-sdw-mbq.c b/drivers

[PATCH 4/7] soundwire/regmap: use _no_pm functions in regmap_read/write

2020-12-03 Thread Bard Liao
initialization is to use _no_pm routines. The duty of making sure the bus is operational needs to be handled above the regmap level. Fixes: 7c22ce6e21840 ('regmap: Add SoundWire bus support') Signed-off-by: Bard Liao Reviewed-by: Rander Wang --- drivers/base/regmap/regmap-sdw.c | 4 ++-- drivers/soundwire

[PATCH 3/7] soundwire: bus: use no_pm IO routines for all interrupt handling

2020-12-03 Thread Bard Liao
From: Pierre-Louis Bossart There is no need to play with pm_runtime reference counts, if needed the codec drivers are already explicitly resumed. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 26

[PATCH 0/7] soundwire/regmap: use _no_pm routines

2020-12-03 Thread Bard Liao
is needed for soundwire tree to complie. On the other hands, commit 6e06a85556f9 ("soundwire: bus: add comments to explain interrupt loop filter") to commit 47b8520997a8 ("soundwire: bus: only clear valid DPN interrupts") are needed for regmap tree. Bard Liao (2): soundwir

[PATCH 2/7] soundwire: bus: use sdw_write_no_pm when setting the bus scale registers

2020-12-03 Thread Bard Liao
problem as the previous one, but is split to make the life of linux-stable maintainers less painful. Fixes: 29d158f90690 ('soundwire: bus: initialize bus clock base and scale registers') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire

[PATCH 1/7] soundwire: bus: use sdw_update_no_pm when initializing a device

2020-12-03 Thread Bard Liao
('soundwire: bus: add PM/no-PM versions of read/write functions') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers

[PATCH v2 5/5] ASoC/SoundWire: rt711-sdca: Add RT711 SDCA vendor-specific driver

2020-11-30 Thread Bard Liao
From: Shuming Fan This is the initial codec driver for rt711 SDCA version. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/codecs/Kconfig |7 + sound/soc/codecs/Makefile |2 + sound/soc/codecs/rt711-sdca-sdw.c

[PATCH v2 4/5] ASoC/SoundWire: rt1316: Add RT1316 SDCA vendor-specific driver

2020-11-30 Thread Bard Liao
From: Shuming Fan This is the initial amplifier driver for rt1316 SDCA version. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt1316-sdw.c | 756

[PATCH v2 3/5] ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec driver

2020-11-30 Thread Bard Liao
From: Jack Yu First version of rt715 sdw sdca codec driver. Signed-off-by: Jack Yu Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/codecs/Kconfig | 7 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt715-sdca-sdw.c | 278 + sound

[PATCH v2 1/5] soundwire: SDCA: add helper macro to access controls

2020-11-30 Thread Bard Liao
-Louis Bossart Signed-off-by: Bard Liao --- include/linux/soundwire/sdw_registers.h | 32 + 1 file changed, 32 insertions(+) diff --git a/include/linux/soundwire/sdw_registers.h b/include/linux/soundwire/sdw_registers.h index 0cb1a22685b8..138bec908c40 100644 --- a/include

[PATCH v2 2/5] regmap/SoundWire: sdw: add support for SoundWire 1.2 MBQ

2020-11-30 Thread Bard Liao
ander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-sdw-mbq.c | 101 ++

[PATCH v2 0/5] regmap/SoundWire/ASoC: Add SoundWire SDCA support

2020-11-30 Thread Bard Liao
The MIPI SoundWire Device Class standard will define audio functionality beyond the scope of the existing SoundWire 1.2 standard, which is limited to the bus and interface. The description is inspired by the USB Audio Class, with "functions", "entities", "control selectors", "audio clusters". The

[PATCH] regmap: sdw: add required header files

2020-11-25 Thread Bard Liao
From: Pierre-Louis Bossart Explicitly add header files used by regmap SoundWire support. Suggested-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/base

[PATCH] soundwire: master: use pm_runtime_set_active() on add

2020-11-24 Thread Bard Liao
will suspend when all its children are no longer active. Fixes: bd84256e86ecf ('soundwire: master: enable pm runtime') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/master.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH 4/5] soundwire: bus: only clear valid DP0 interrupts

2020-11-24 Thread Bard Liao
From: Pierre-Louis Bossart We should only access the fields that are relevant for DP0, and never write to reserved or read-only SDCA_CASCADE fields. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao --- drivers/soundwire/bus.c | 8 +--- 1

  1   2   3   4   >