[PATCH RESEND 4/5] soundwire: get mipi-sdw-bra-mode-max-data-per-frame property
Bard Liao <[email protected]>
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Get the mipi-sdw-bra-mode-max-data-per-frame property which indicates the maximum data payload size (in bytes per frame excluding header, CRC, and footer) for the BRA Mode. Signed-off-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> --- drivers/soundwire/mipi_disco.c | 3 +++ include/linux/soundwire/sdw.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/soundwire/mipi_disco.c b/drivers/soundwire/mipi_disco.c index b122bd1e7321..cfccaa33f438 100644 --- a/drivers/soundwire/mipi_disco.c +++ b/drivers/soundwire/mipi_disco.c @@ -474,6 +474,9 @@ int sdw_slave_read_prop(struct sdw_slave *slave) device_property_read_u32(dev, "mipi-sdw-bra-mode-block-alignment", &prop->bra_block_alignment); + device_property_read_u32(dev, "mipi-sdw-bra-mode-max-data-per-frame", + &prop->bra_max_data_per_frame); + prop->commit_register_supported = mipi_device_property_read_bool(dev, "mipi-sdw-commit-register-supported"); diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 7e27e8bdb64a..89009a2c321d 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -367,6 +367,8 @@ struct sdw_dpn_prop { * @lane_maps: Lane mapping for the slave, only valid if lane_control_support is set * @bra_block_alignment: If non-zero the length of data in a BRA frame must be * a multiple of this number of bytes. + * @bra_max_data_per_frame: If non-zero the maximum data payload size (in bytes per + * frame excluding header, CRC, and footer) for this BRA Mode * @clock_reg_supported: the Peripheral implements the clock base and scale * registers introduced with the SoundWire 1.2 specification. SDCA devices * do not need to set this boolean property as the registers are required. @@ -398,6 +400,7 @@ struct sdw_slave_prop { u8 scp_int1_mask; u8 lane_maps[SDW_MAX_LANES]; u32 bra_block_alignment; + u32 bra_max_data_per_frame; bool clock_reg_supported; bool use_domain_irq; }; -- 2.43.0