Lines Matching +full:slave +full:- +full:mode
1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2 /* Copyright(c) 2015-17 Intel Corporation. */
75 * enum sdw_slave_status - Slave status
76 * @SDW_SLAVE_UNATTACHED: Slave is not attached with the bus.
77 * @SDW_SLAVE_ATTACHED: Slave is attached with bus.
78 * @SDW_SLAVE_ALERT: Some alert condition on the Slave
93 * @SDW_CLK_PRE_DEPREPARE: pre clock stop de-prepare
94 * @SDW_CLK_POST_DEPREPARE: post clock stop de-prepare
104 * enum sdw_command_response - Command response as defined by SDW spec
132 /* block packing mode enum */
163 * enum sdw_port_data_mode: Data Port mode
165 * @SDW_PORT_DATA_MODE_NORMAL: Normal data mode where audio data is received
167 * @SDW_PORT_DATA_MODE_PRBS: Test mode which uses a PRBS generator to produce
169 * @SDW_PORT_DATA_MODE_STATIC_0: Simple test mode which uses static value of
171 * @SDW_PORT_DATA_MODE_STATIC_1: Simple test mode which uses static value of
190 * enum sdw_p15_behave - Slave Port 15 behaviour when the Master attempts a
201 * enum sdw_dpn_type - Data port types
216 * enum sdw_clk_stop_mode - Clock Stop modes
217 * @SDW_CLK_STOP_MODE0: Slave can continue operation seamlessly on clock
219 * @SDW_CLK_STOP_MODE1: Slave may have entered a deeper power-saving mode,
228 * struct sdw_dp0_prop - DP0 properties
235 * @BRA_flow_controlled: Slave implementation results in an OK_NotReady
239 * implementation-defined interrupts
256 * struct sdw_dpn_audio_mode - Audio mode properties for DPn
269 * changed to a frequency supported by this mode or compatible modes
272 * Audio Mode to other Audio Modes
288 * struct sdw_dpn_prop - Data Port DPn properties
301 * @ch_prep_timeout: Port-specific timeout value, in milliseconds
303 * implementation-defined interrupts
310 * @modes: SDW mode supported
313 * @block_pack_mode: Type of block port mode supported
344 * struct sdw_slave_prop - SoundWire Slave properties
346 * @wake_capable: Wake-up events are supported
347 * @test_mode_capable: If test mode is supported
348 * @clk_stop_mode1: Clock-Stop Mode 1 is supported
349 * @simple_clk_stop_capable: Simple clock mode is supported
350 * @clk_stop_timeout: Worst-case latency of the Clock Stop Prepare State
352 * @ch_prep_timeout: Worst-case latency of the Channel Prepare State Machine
354 * @reset_behave: Slave keeps the status of the SlaveStopClockPrepare
355 * state machine (P=1 SCSP_SM) after exit from clock-stop mode1
356 * @high_PHY_capable: Slave is HighPHY capable
357 * @paging_support: Slave implements paging registers SCP_AddrPage1 and
359 * @bank_delay_support: Slave implements bank delay/bridge support registers
361 * @p15_behave: Slave behavior when the Master attempts a read to the Port15
363 * @lane_control_support: Slave supports lane control
364 * @master_count: Number of Masters present on this Slave
375 * @use_domain_irq: call actual IRQ handler on slave, as well as callback
406 * struct sdw_master_prop - Master properties
408 * @clk_stop_modes: Bitmap, bit N set when clock-stop-modeN supported
421 * @hw_disabled: if true, the Master is not functional, typically due to pin-mux
453 * Some Slave devices have known issues with incorrect parity errors
455 * parity errors can be reported by Slave devices, possibly due to electrical
463 int sdw_slave_read_prop(struct sdw_slave *slave);
466 * SDW Slave Structures and APIs
472 * struct sdw_slave_id - Slave ID
495 * Helper macros to extract the MIPI-defined IDs
524 * struct sdw_slave_intr_status - Slave interrupt status
525 * @sdca_cascade: set if the Slave device reports an SDCA interrupt
536 * sdw_reg_bank - SoundWire register banks
561 * struct sdw_prepare_ch: Prepare/De-prepare Data Port channel
565 * @prepare: Prepare (true) /de-prepare (false) channel
566 * @bank: Register bank, which bank Slave/Master driver should program for
604 * @s_data_mode: NORMAL, STATIC or PRBS mode for all Slave ports
605 * @m_data_mode: NORMAL, STATIC or PRBS mode for all Master ports. The value
622 * struct sdw_slave_ops: Slave driver callback ops
624 * @read_prop: Read Slave properties
627 * @update_status: Update Slave status
628 * @bus_config: Update the bus config for Slave
630 * @clk_stop: handle imp-def sequences before and after prepare and de-prepare
634 int (*interrupt_callback)(struct sdw_slave *slave,
636 int (*update_status)(struct sdw_slave *slave,
638 int (*bus_config)(struct sdw_slave *slave,
640 int (*port_prep)(struct sdw_slave *slave,
643 int (*clk_stop)(struct sdw_slave *slave,
644 enum sdw_clk_stop_mode mode,
650 * struct sdw_slave - SoundWire Slave
654 * @status: Status reported by the Slave
656 * @prop: Slave properties
657 * @debugfs: Slave debugfs
659 * @port_ready: Port ready completion flag for each Slave port
660 * @m_port_map: static Master port map for each Slave port
662 * @dev_num_sticky: one-time static Device Number assigned by Bus
666 * Slave device
669 * @unattach_request: mask field to keep track why the Slave re-attached and
670 * was re-initialized. This is useful to deal with potential race conditions
672 * when the Master triggered a reset the Slave is properly enumerated and
675 * for a Slave happens for the first time after enumeration
707 * struct sdw_master_device - SoundWire 'Master Device' representation
753 * @flow_mode: Port Data flow mode
754 * @data_mode: Test modes or normal mode
838 * struct sdw_defer - SDW deffered message
850 * struct sdw_master_ops - Master driver ops
861 * @get_device_num: Callback for vendor-specific device_number allocation
862 * @put_device_num: Callback for vendor-specific device_number release
878 int (*get_device_num)(struct sdw_bus *bus, struct sdw_slave *slave);
879 void (*put_device_num)(struct sdw_bus *bus, struct sdw_slave *slave);
881 struct sdw_slave *slave,
886 * struct sdw_bus - SoundWire bus
887 * @dev: Shortcut to &bus->md->dev to avoid changing the entire code.
890 * @id: bus system-wide unique id
892 * @assigned: Bitmap for Slave device numbers.
913 * hardware-based synchronization is required. This value is only
914 * meaningful if multi_link is set. If set to 1, hardware-based
954 * sdw_port_config: Master or Slave Port configuration
965 * sdw_stream_config: Master or Slave stream configuration
989 * @SDW_STREAM_DEPREPARED: Stream de-prepared
1058 int sdw_compare_devid(struct sdw_slave *slave, struct sdw_slave_id id);
1063 int sdw_stream_add_slave(struct sdw_slave *slave,
1068 int sdw_stream_remove_slave(struct sdw_slave *slave,
1072 int sdw_read(struct sdw_slave *slave, u32 addr);
1073 int sdw_write(struct sdw_slave *slave, u32 addr, u8 value);
1074 int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value);
1075 int sdw_read_no_pm(struct sdw_slave *slave, u32 addr);
1076 int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
1077 int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val);
1078 int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
1079 int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val);
1080 int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
1081 int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val);
1085 static inline int sdw_stream_add_slave(struct sdw_slave *slave, in sdw_stream_add_slave() argument
1092 return -EINVAL; in sdw_stream_add_slave()
1095 static inline int sdw_stream_remove_slave(struct sdw_slave *slave, in sdw_stream_remove_slave() argument
1099 return -EINVAL; in sdw_stream_remove_slave()
1103 static inline int sdw_read(struct sdw_slave *slave, u32 addr) in sdw_read() argument
1106 return -EINVAL; in sdw_read()
1109 static inline int sdw_write(struct sdw_slave *slave, u32 addr, u8 value) in sdw_write() argument
1112 return -EINVAL; in sdw_write()
1115 static inline int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value) in sdw_write_no_pm() argument
1118 return -EINVAL; in sdw_write_no_pm()
1121 static inline int sdw_read_no_pm(struct sdw_slave *slave, u32 addr) in sdw_read_no_pm() argument
1124 return -EINVAL; in sdw_read_no_pm()
1127 static inline int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val) in sdw_nread() argument
1130 return -EINVAL; in sdw_nread()
1133 static inline int sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val) in sdw_nread_no_pm() argument
1136 return -EINVAL; in sdw_nread_no_pm()
1139 static inline int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val) in sdw_nwrite() argument
1142 return -EINVAL; in sdw_nwrite()
1145 static inline int sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val) in sdw_nwrite_no_pm() argument
1148 return -EINVAL; in sdw_nwrite_no_pm()
1151 static inline int sdw_update(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) in sdw_update() argument
1154 return -EINVAL; in sdw_update()
1157 static inline int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u8 val) in sdw_update_no_pm() argument
1160 return -EINVAL; in sdw_update_no_pm()