Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp117326yba; Wed, 3 Apr 2019 05:42:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWIdmmEh+cief5CtbxBFf/QrnmgXp7pBJejP7fFJeyCVXth2qdFCoGIpAUYNCTH8NJdJe/ X-Received: by 2002:a63:554b:: with SMTP id f11mr13869921pgm.77.1554295377125; Wed, 03 Apr 2019 05:42:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554295377; cv=none; d=google.com; s=arc-20160816; b=SnobaexqNH0byXFOg2zUVGnhGRyc9wxBP16Bbpc3GoTw4dXFpD0auobep03XcdMN3a xhC+gUt4aRFn1fFUTo5YThqxTbZQfTHJZeq4tZpqojvio3O/pKj0gysuv0hmjGv4cb3i 11dkllaSqIOjcfTLqnV93mDAF9maEK+ZFMTPoN7JIDlZrQRERkUSDenDJmBuUg8opSWz dEN+5OC7I/iBG5MrrIA+11xiO2SwYsriesMuJa+Np0/7sojfOKuDSZGtCKBYr6vmD7iQ dh6SSpEgub5/CfTamHF01KuK3X5OfejF8QZSUpFZ8IdLEdR5imv99KSfJ6i9d6/7vqCh KK4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=2EnGnFzzDF0Kru9PA+MkHnyAEyob9DqV4W6m75ud1h4=; b=OXBuCfy6ys9dzk8lX3igdk+eSNXUq5Fqu26sS+A8OISuQotlngNxsg6CsDB0kw744E lu/Tj4i9h60Ut56MuuTFlRXHoygzjAp+P40tYr6EeTrXY09Mssd+RCSnggvUE1MP0Puw yDwplBj4dyxkVBKmL0GFIDyjhvqRkyBQ3FImTgKtuoGWOfAUbzahUdGl6jQ4fVYLHsAq jYfMXZF8Ky7xxXI68pqB2qHlucdRZilNjwq4ifdJd4/Csb4hg9czuDPFDW4B6E7n2Lb6 C7HqQ3rdbk+8lhMZDjiP7kLrh//V07n9XMR3aWlaDfCv7MXBnWDECVOWLv19844ClVpQ wlHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si9998196pgh.309.2019.04.03.05.42.42; Wed, 03 Apr 2019 05:42:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbfDCMle (ORCPT + 99 others); Wed, 3 Apr 2019 08:41:34 -0400 Received: from sauhun.de ([88.99.104.3]:48338 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbfDCMki (ORCPT ); Wed, 3 Apr 2019 08:40:38 -0400 Received: from localhost (p54B3311F.dip0.t-ipconnect.de [84.179.49.31]) by pokefinder.org (Postfix) with ESMTPSA id A70173E43CB; Wed, 3 Apr 2019 14:40:36 +0200 (CEST) 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, Peter Rosin , Stefan Lengfeld , linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org, Linus Walleij , Andy Shevchenko , Wolfram Sang Subject: [PATCH 04/12] i2c: mux: populate the new *_atomic callbacks Date: Wed, 3 Apr 2019 14:40:11 +0200 Message-Id: <20190403124019.8947-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190403124019.8947-1-wsa+renesas@sang-engineering.com> References: <20190403124019.8947-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the parent adapter has atomic_xfer callbacks, populate them for the mux adapter as well. We can use the same translation function as for the non-atomic xfer callback. Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-mux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index f330690b4125..603252fa1284 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -310,12 +310,18 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, else priv->algo.master_xfer = __i2c_mux_master_xfer; } + if (parent->algo->master_xfer_atomic) + priv->algo.master_xfer_atomic = priv->algo.master_xfer; + if (parent->algo->smbus_xfer) { if (muxc->mux_locked) priv->algo.smbus_xfer = i2c_mux_smbus_xfer; else priv->algo.smbus_xfer = __i2c_mux_smbus_xfer; } + if (parent->algo->smbus_xfer_atomic) + priv->algo.smbus_xfer_atomic = priv->algo.smbus_xfer; + priv->algo.functionality = i2c_mux_functionality; /* Now fill out new adapter structure */ -- 2.11.0