// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) // Copyright(c) 2015-17 Intel Corporation. /* * MIPI Discovery And Configuration (DisCo) Specification for SoundWire * specifies properties to be implemented for SoundWire Masters and Slaves. * The DisCo spec doesn't mandate these properties. However, SDW bus cannot * work without knowing these values. * * The helper functions read the Master and Slave properties. Implementers * of Master or Slave drivers can use any of the below three mechanisms: * a) Use these APIs here as .read_prop() callback for Master and Slave * b) Implement own methods and set those as .read_prop(), but invoke * APIs in this file for generic read and override the values with * platform specific data * c) Implement ones own methods which do not use anything provided * here */ #include <linux/device.h> #include <linux/property.h> #include <linux/mod_devicetable.h> #include <linux/soundwire/sdw.h> #include "bus.h" /** * sdw_master_read_prop() - Read Master properties * @bus: SDW bus instance */ int sdw_master_read_prop(struct sdw_bus *bus) { … } EXPORT_SYMBOL(…); static int sdw_slave_read_dp0(struct sdw_slave *slave, struct fwnode_handle *port, struct sdw_dp0_prop *dp0) { … } static int sdw_slave_read_dpn(struct sdw_slave *slave, struct sdw_dpn_prop *dpn, int count, int ports, char *type) { … } /** * sdw_slave_read_prop() - Read Slave properties * @slave: SDW Slave */ int sdw_slave_read_prop(struct sdw_slave *slave) { … } EXPORT_SYMBOL(…);