mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
soundwire: honor clock_reg_supported in the clock scaling check
sdw_slave_set_frequency() treats class_id and prop.clock_reg_supported as equivalent evidence that a slave implements the bus-clock base and scale registers, but the bank-switch reprogramming path checks class_id alone, so a class-0 slave that declared the registers never gets the next-bank scale written there. The registers are SoundWire 1.2, not SDCA, so a device may well implement them without setting the class field. Extend the helper to honor clock_reg_supported, as discussed with Pierre-Louis in the WCD9378 review. This also makes a link whose peripherals all declare clock_reg_supported eligible for dynamic clock scaling in the generic bandwidth allocation, which is what declaring the registers means. With the helper extended, sdw_slave_set_frequency()'s open-coded test computes the same predicate; call the helper there instead, so future quirks or updates land in one place. Link: https://lore.kernel.org/all/5717102b-f7ab-42b2-8065-064d94dd2bee@linux.dev/ Link: https://lore.kernel.org/all/6991398d-4ae4-45ee-85d0-3b66462fec1d@linux.dev/ Assisted-by: Claude:claude-fable-5 Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260728173542.61146-2-jorijnvdgraaf@catcrafts.net Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
f64c5d5ff8
commit
b3d2703946
1 changed files with 5 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue