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: 10836629 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 3EF6B14DE for ; Sat, 2 Mar 2019 13:48:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BB962B17F for ; Sat, 2 Mar 2019 13:48:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2006E2B33B; Sat, 2 Mar 2019 13:48:43 +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=unavailable 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 D12EE2B17F for ; Sat, 2 Mar 2019 13:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfCBNsh (ORCPT ); Sat, 2 Mar 2019 08:48:37 -0500 Received: from sauhun.de ([88.99.104.3]:36354 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbfCBNrr (ORCPT ); Sat, 2 Mar 2019 08:47:47 -0500 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 Cc: linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Keerthy , Peter Rosin , Tony Lindgren , Russell King , Andy Shevchenko , Stefan Lengfeld , Phil Reid , Tero Kristo , linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org, Wolfram Sang 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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),