From 90fc13e21324aa17f51ffa90f5d0cedf12f2cb1f Mon Sep 17 00:00:00 2001 From: Bhaumik Bhatt Date: Thu, 23 Dec 2021 14:02:47 -0800 Subject: [PATCH] bus: mhi: host: Allow configuration of bidrectional channels Certain offload channels such as ones for satellite driver usecases are required to be configured as bidrectional channels. Allow it to ensure devices are created for them and the channels are probed. Added __attribute__((__fallthrough__)) statements to suppress compiler error. Change-Id: I782e3e933765099e8ee9eb1670cce321a3dffd8b Signed-off-by: Bhaumik Bhatt Signed-off-by: Lazarus Motha --- drivers/bus/mhi/host/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c index 60d84444ac1f..2a790dd43278 100644 --- a/drivers/bus/mhi/host/main.c +++ b/drivers/bus/mhi/host/main.c @@ -380,6 +380,12 @@ void mhi_create_devices(struct mhi_controller *mhi_cntrl) mhi_dev->ul_chan_id = mhi_chan->chan; mhi_dev->ul_event_id = mhi_chan->er_index; break; + case DMA_NONE: + __attribute__((__fallthrough__)); + case DMA_BIDIRECTIONAL: + mhi_dev->ul_chan_id = mhi_chan->chan; + mhi_dev->ul_event_id = mhi_chan->er_index; + __attribute__((__fallthrough__)); case DMA_FROM_DEVICE: /* We use dl_chan as offload channels */ mhi_dev->dl_chan = mhi_chan;