slimbus: Allow controller to override default scheduling algorithm
Framework provides a slimbus scheduling algorithm and controller may
choose to override it. e.g. controller will override this if it
supports fixed set of channels at a fixed clock gear.
In that case, it is controller's responsibility to act on client
requests and update channel scheduling, subframe coding information.
Change-Id: I31fe72ef85f931900467b737652da7516d173dc5
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
(cherry picked from commit 4aec9230916f844d89b2565d09a7b874f181d5e0)
diff --git a/include/linux/slimbus/slimbus.h b/include/linux/slimbus/slimbus.h
index 461a2bf..c5031c1 100644
--- a/include/linux/slimbus/slimbus.h
+++ b/include/linux/slimbus/slimbus.h
@@ -498,6 +498,8 @@
* @set_laddr: Setup logical address at laddr for the slave with elemental
* address e_addr. Drivers implementing controller will be expected to
* send unicast message to this device with its logical address.
+ * @allocbw: Controller can override default reconfiguration and channel
+ * scheduling algorithm.
* @wakeup: This function pointer implements controller-specific procedure
* to wake it up from clock-pause. Framework will call this to bring
* the controller out of clock pause.
@@ -542,6 +544,8 @@
struct slim_msg_txn *txn);
int (*set_laddr)(struct slim_controller *ctrl,
const u8 *ea, u8 elen, u8 laddr);
+ int (*allocbw)(struct slim_device *sb,
+ int *subfrmc, int *clkgear);
int (*wakeup)(struct slim_controller *ctrl);
int (*config_port)(struct slim_controller *ctrl,
u8 port);