From patchwork Sat Mar 2 13:47:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10836581 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 C4FE817E9 for ; Sat, 2 Mar 2019 13:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97B972B17F for ; Sat, 2 Mar 2019 13:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 707BA2B30E; Sat, 2 Mar 2019 13:47:59 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2D862B17F for ; Sat, 2 Mar 2019 13:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0e2orpO4NbERTLD8JsU150NTcHxq6wWD+IQa3soJ7OM=; b=kRG97s7cmfhbn2vPZ7DcOLOM6b thuZjKmoMiInjYg4RalQ7oKUFtvRmR5HibUPauJgYk5eKK+l9P3kRLjx+Mbft8zJSaLaJMAf3YiRz 2L8k+Xrds7tooctTOYqtlzB7k7X1sIxul7gGFGVbfXgGpjpIDCe2mdNeCNpc9hoeadkJHV0QhQo+6 g0vZrHJIRmTNJADvslF2r4hCQxqnCeJC/07JMyF52T/v91JPXkOvUlArLymwH8bjlrdZHo01K/KJY UlrTh4MO5lXe/tmLdQHbkjpBCRadcNoIX3TbK8BDn55VGMFSWeKhH1WFUIAfSOzxqYxx85lXi83aW CT88ijyg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h04za-00015J-CS; Sat, 02 Mar 2019 13:47:54 +0000 Received: from sauhun.de ([88.99.104.3] helo=pokefinder.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h04zW-00013Q-8T for linux-arm-kernel@lists.infradead.org; Sat, 02 Mar 2019 13:47:52 +0000 Received: from localhost (p54B33179.dip0.t-ipconnect.de [84.179.49.121]) by pokefinder.org (Postfix) with ESMTPSA id 690714A1777; Sat, 2 Mar 2019 14:47:45 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Subject: [RFC PATCH v2 4/7] i2c: demux: WIP: handle the new atomic callbacks Date: Sat, 2 Mar 2019 14:47:32 +0100 Message-Id: <20190302134735.4393-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190302134735.4393-1-wsa+renesas@sang-engineering.com> References: <20190302134735.4393-1-wsa+renesas@sang-engineering.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190302_054750_451690_C8DB2365 X-CRM114-Status: GOOD ( 10.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tero Kristo , Phil Reid , Tony Lindgren , Keerthy , linux-kernel@vger.kernel.org, Russell King , linux-renesas-soc@vger.kernel.org, Wolfram Sang , linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org, Stefan Lengfeld , Andy Shevchenko , Peter Rosin , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP If the parent has an atomic callback, we need to translate it the same way as the non-atomic callback. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman --- drivers/i2c/muxes/i2c-demux-pinctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c index 035032e20327..5d00adfbe578 100644 --- a/drivers/i2c/muxes/i2c-demux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c @@ -99,6 +99,9 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne /* Now fill out current adapter structure. cur_chan must be up to date */ priv->algo.master_xfer = i2c_demux_master_xfer; + /* FIXME: regular muxes need proper handling, too! */ + if (adap->algo->master_xfer_atomic) + priv->algo.master_xfer_atomic = i2c_demux_master_xfer; priv->algo.functionality = i2c_demux_functionality; snprintf(priv->cur_adap.name, sizeof(priv->cur_adap.name),