mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 11:48:58 -04:00
soundwire: mipi_disco: add support for clock-scales property
The DisCo for SoundWire 2.0 spec adds support for the 'mipi-sdw-supported-clock-scales' property, which is just a rename. Add in a backwards-compatible manner. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20241003070650.62787-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
committed by
Vinod Koul
parent
a489afc105
commit
89e95be18d
@@ -51,6 +51,7 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||
{
|
||||
struct sdw_master_prop *prop = &bus->prop;
|
||||
struct fwnode_handle *link;
|
||||
const char *scales_prop;
|
||||
char name[32];
|
||||
int nval;
|
||||
int ret;
|
||||
@@ -112,7 +113,12 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||
}
|
||||
}
|
||||
|
||||
nval = fwnode_property_count_u32(link, "mipi-sdw-supported-clock-gears");
|
||||
scales_prop = "mipi-sdw-supported-clock-scales";
|
||||
nval = fwnode_property_count_u32(link, scales_prop);
|
||||
if (nval == 0) {
|
||||
scales_prop = "mipi-sdw-supported-clock-gears";
|
||||
nval = fwnode_property_count_u32(link, scales_prop);
|
||||
}
|
||||
if (nval > 0) {
|
||||
prop->num_clk_gears = nval;
|
||||
prop->clk_gears = devm_kcalloc(bus->dev, prop->num_clk_gears,
|
||||
@@ -124,7 +130,7 @@ int sdw_master_read_prop(struct sdw_bus *bus)
|
||||
}
|
||||
|
||||
ret = fwnode_property_read_u32_array(link,
|
||||
"mipi-sdw-supported-clock-gears",
|
||||
scales_prop,
|
||||
prop->clk_gears,
|
||||
prop->num_clk_gears);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user