diff options
author | Vinod Koul <vinod.koul@intel.com> | 2017-12-14 11:19:40 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-19 11:28:13 +0100 |
commit | b0a9c37b0178bf397393952e98789b0d4dc7fd6c (patch) | |
tree | 5a758c6214b1127f37dcbd20576d6208e7a72c53 /include | |
parent | d52d7a1be02cc6da287bfaea7eebb0de1a77fbe2 (diff) | |
download | linux-b0a9c37b0178bf397393952e98789b0d4dc7fd6c.tar.bz2 |
soundwire: Add slave status handling
Add status handling API sdw_handle_slave_status() to handle
Slave status changes.
Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/soundwire/sdw.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index cbadddce470d..e91fdcf41049 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -331,11 +331,28 @@ struct sdw_slave_id { }; /** + * struct sdw_slave_intr_status - Slave interrupt status + * @control_port: control port status + * @port: data port status + */ +struct sdw_slave_intr_status { + u8 control_port; + u8 port[15]; +}; + +/** * struct sdw_slave_ops - Slave driver callback ops * @read_prop: Read Slave properties + * @interrupt_callback: Device interrupt notification (invoked in thread + * context) + * @update_status: Update Slave status */ struct sdw_slave_ops { int (*read_prop)(struct sdw_slave *sdw); + int (*interrupt_callback)(struct sdw_slave *slave, + struct sdw_slave_intr_status *status); + int (*update_status)(struct sdw_slave *slave, + enum sdw_slave_status status); }; /** @@ -382,6 +399,9 @@ struct sdw_driver { { .mfg_id = (_mfg_id), .part_id = (_part_id), \ .driver_data = (unsigned long)(_drv_data) } +int sdw_handle_slave_status(struct sdw_bus *bus, + enum sdw_slave_status status[]); + /* * SDW master structures and APIs */ |