Skip to content

Commit 256170f

Browse files
rfvirgilbardliao
authored andcommitted
soundwire: Add bra_block_alignment property support
Add a property to struct sdw_slave_prop equivalent to the Disco property "mipi-sdw-bra-mode-block-alignment". The SoundWire Disco specification defines this as: "The data payload size for this BRA Mode shall be an integer multiple of the value of this Property." Change-Id: I27ab84b0ed0f236a5eae58600400a4c386132480 Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Co-developed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 4149c0f commit 256170f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/soundwire/mipi_disco.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
471471
device_property_read_u32(dev, "mipi-sdw-sdca-interrupt-register-list",
472472
&prop->sdca_interrupt_register_list);
473473

474+
device_property_read_u32(dev, "mipi-sdw-bra-mode-block-alignment",
475+
&prop->bra_block_alignment);
476+
474477
prop->commit_register_supported = mipi_device_property_read_bool(dev,
475478
"mipi-sdw-commit-register-supported");
476479

include/linux/soundwire/sdw.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ struct sdw_dpn_prop {
364364
* @commit_register_supported: is PCP_Commit register supported
365365
* @scp_int1_mask: SCP_INT1_MASK desired settings
366366
* @lane_maps: Lane mapping for the slave, only valid if lane_control_support is set
367+
* @bra_block_alignment: If non-zero the length of data in a BRA frame must be
368+
* a multiple of this number of bytes.
367369
* @clock_reg_supported: the Peripheral implements the clock base and scale
368370
* registers introduced with the SoundWire 1.2 specification. SDCA devices
369371
* do not need to set this boolean property as the registers are required.
@@ -394,6 +396,7 @@ struct sdw_slave_prop {
394396
u8 commit_register_supported;
395397
u8 scp_int1_mask;
396398
u8 lane_maps[SDW_MAX_LANES];
399+
u32 bra_block_alignment;
397400
bool clock_reg_supported;
398401
bool use_domain_irq;
399402
};

0 commit comments

Comments
 (0)