linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: gregkh@linuxfoundation.org
Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org,
	linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org,
	linux-kernel@vger.kernel.org,
	Loic Poulain <loic.poulain@linaro.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: [PATCH v2 20/21] bus: mhi: Remove auto-start option
Date: Mon, 28 Sep 2020 09:39:50 +0530	[thread overview]
Message-ID: <20200928040951.18207-21-manivannan.sadhasivam@linaro.org> (raw)
In-Reply-To: <20200928040951.18207-1-manivannan.sadhasivam@linaro.org>

From: Loic Poulain <loic.poulain@linaro.org>

There is really no point having an auto-start for channels.
This is confusing for the device drivers, some have to enable the
channels, others don't have... and waste resources (e.g. pre allocated
buffers) that may never be used.

This is really up to the MHI device(channel) driver to manage the state
of its channels.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/core/init.c     | 9 ---------
 drivers/bus/mhi/core/internal.h | 1 -
 include/linux/mhi.h             | 2 --
 3 files changed, 12 deletions(-)

diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index 0ffdebde8265..381fdea2eb9f 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -758,7 +758,6 @@ static int parse_ch_cfg(struct mhi_controller *mhi_cntrl,
 		mhi_chan->offload_ch = ch_cfg->offload_channel;
 		mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch;
 		mhi_chan->pre_alloc = ch_cfg->auto_queue;
-		mhi_chan->auto_start = ch_cfg->auto_start;
 
 		/*
 		 * If MHI host allocates buffers, then the channel direction
@@ -1160,11 +1159,6 @@ static int mhi_driver_probe(struct device *dev)
 			goto exit_probe;
 
 		ul_chan->xfer_cb = mhi_drv->ul_xfer_cb;
-		if (ul_chan->auto_start) {
-			ret = mhi_prepare_channel(mhi_cntrl, ul_chan);
-			if (ret)
-				goto exit_probe;
-		}
 	}
 
 	ret = -EINVAL;
@@ -1198,9 +1192,6 @@ static int mhi_driver_probe(struct device *dev)
 	if (ret)
 		goto exit_probe;
 
-	if (dl_chan && dl_chan->auto_start)
-		mhi_prepare_channel(mhi_cntrl, dl_chan);
-
 	mhi_device_put(mhi_dev);
 
 	return ret;
diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/core/internal.h
index 7989269ddd96..33c23203c531 100644
--- a/drivers/bus/mhi/core/internal.h
+++ b/drivers/bus/mhi/core/internal.h
@@ -563,7 +563,6 @@ struct mhi_chan {
 	bool configured;
 	bool offload_ch;
 	bool pre_alloc;
-	bool auto_start;
 	bool wake_capable;
 };
 
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index d4841e5a5f45..6522a4adc794 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -214,7 +214,6 @@ enum mhi_db_brst_mode {
  * @offload_channel: The client manages the channel completely
  * @doorbell_mode_switch: Channel switches to doorbell mode on M0 transition
  * @auto_queue: Framework will automatically queue buffers for DL traffic
- * @auto_start: Automatically start (open) this channel
  * @wake-capable: Channel capable of waking up the system
  */
 struct mhi_channel_config {
@@ -232,7 +231,6 @@ struct mhi_channel_config {
 	bool offload_channel;
 	bool doorbell_mode_switch;
 	bool auto_queue;
-	bool auto_start;
 	bool wake_capable;
 };
 
-- 
2.17.1


  parent reply	other threads:[~2020-09-28  4:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28  4:09 [PATCH v2 00/21] MHI changes for v5.10 Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 01/21] bus: mhi: fix doubled words and struct image_info kernel-doc Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 02/21] bus: mhi: core: Remove double occurrence for mhi_ctrl_ev_task() declaration Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 03/21] bus: mhi: core: Abort suspends due to outgoing pending packets Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 04/21] bus: mhi: core: Use helper API to trigger a non-blocking host resume Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 05/21] bus: mhi: core: Trigger host resume if suspended during mhi_device_get() Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 06/21] bus: mhi: core: Use generic name field for an MHI device Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 07/21] bus: mhi: core: Introduce helper function to check device state Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 08/21] bus: mhi: core: Introduce counters to track MHI device state transitions Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 09/21] bus: mhi: core: Read and save device hardware information from BHI Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 10/21] bus: mhi: core: Introduce APIs to allocate and free the MHI controller Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 11/21] bus: mhi: core: Add const qualifier to MHI config information Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 12/21] bus: mhi: Remove include of rwlock_types.h Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 13/21] bus: mhi: Fix entries based on Kconfig coding style Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 14/21] bus: mhi: core: Introduce debugfs entries for MHI Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 15/21] bus: mhi: core: Introduce sysfs " Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 16/21] bus: mhi: core: Allow shared IRQ for event rings Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 17/21] bus: mhi: Remove unused nr_irqs_req variable Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 18/21] bus: mhi: core: Fix the building of MHI module Manivannan Sadhasivam
2020-09-28  4:09 ` [PATCH v2 19/21] bus: mhi: debugfs: Print channel context read-pointer Manivannan Sadhasivam
2020-09-28  4:09 ` Manivannan Sadhasivam [this message]
2020-09-28  4:09 ` [PATCH v2 21/21] net: qrtr: Start MHI channels during init Manivannan Sadhasivam
2020-09-29 15:28 ` [PATCH v2 00/21] MHI changes for v5.10 Manivannan Sadhasivam
2020-09-29 16:13   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200928040951.18207-21-manivannan.sadhasivam@linaro.org \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bbhatt@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hemantk@codeaurora.org \
    --cc=jhugo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).