From patchwork Wed Aug 29 23:32:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10581063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 62771180E for ; Wed, 29 Aug 2018 23:32:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52A422BC2A for ; Wed, 29 Aug 2018 23:32:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 472E42BC87; Wed, 29 Aug 2018 23:32:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03FDE2BC2A for ; Wed, 29 Aug 2018 23:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727438AbeH3Dby (ORCPT ); Wed, 29 Aug 2018 23:31:54 -0400 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:64593 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbeH3Dby (ORCPT ); Wed, 29 Aug 2018 23:31:54 -0400 X-Halon-ID: ce8e6707-abe3-11e8-8edf-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id ce8e6707-abe3-11e8-8edf-005056917f90; Thu, 30 Aug 2018 01:32:34 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH v4 1/3] mmc: core: add helper to see if a host is doing a retune Date: Thu, 30 Aug 2018 01:32:05 +0200 Message-Id: <20180829233207.30646-2-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180829233207.30646-1-niklas.soderlund+renesas@ragnatech.se> References: <20180829233207.30646-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a helper to allow host drivers checking if a retune is in progress. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang --- include/linux/mmc/host.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index beed7121c7818b74..2a5fe75dd0821d03 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -569,6 +569,11 @@ static inline bool mmc_can_retune(struct mmc_host *host) return host->can_retune == 1; } +static inline bool mmc_doing_retune(struct mmc_host *host) +{ + return host->doing_retune == 1; +} + static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data) { return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE;