From patchwork Wed Feb 25 16:02:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 443468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6C8C7140083 for ; Thu, 26 Feb 2015 03:03:53 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753634AbbBYQCv (ORCPT ); Wed, 25 Feb 2015 11:02:51 -0500 Received: from sauhun.de ([89.238.76.85]:37959 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753625AbbBYQCu (ORCPT ); Wed, 25 Feb 2015 11:02:50 -0500 Received: from p4fe256bb.dip0.t-ipconnect.de ([79.226.86.187]:42009 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YQeQB-0001xG-NW; Wed, 25 Feb 2015 17:02:48 +0100 From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , Ludovic Desroches , Yingjoe Chen , Eddie Huang , Wolfram Sang , linux-kernel@vger.kernel.org Subject: [RFC V2 09/12] i2c: powermac: make use of the new infrastructure for quirks Date: Wed, 25 Feb 2015 17:02:00 +0100 Message-Id: <1424880126-15047-10-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1424880126-15047-1-git-send-email-wsa@the-dreams.de> References: <1424880126-15047-1-git-send-email-wsa@the-dreams.de> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: Wolfram Sang Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-powermac.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 60a53c169ed2b3..6abcf696e3594b 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -153,12 +153,6 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, int read; int addrdir; - if (num != 1) { - dev_err(&adap->dev, - "Multi-message I2C transactions not supported\n"); - return -EOPNOTSUPP; - } - if (msgs->flags & I2C_M_TEN) return -EINVAL; read = (msgs->flags & I2C_M_RD) != 0; @@ -205,6 +199,9 @@ static const struct i2c_algorithm i2c_powermac_algorithm = { .functionality = i2c_powermac_func, }; +static struct i2c_adapter_quirks i2c_powermac_quirks = { + .max_num_msgs = 1, +}; static int i2c_powermac_remove(struct platform_device *dev) { @@ -434,6 +431,7 @@ static int i2c_powermac_probe(struct platform_device *dev) platform_set_drvdata(dev, adapter); adapter->algo = &i2c_powermac_algorithm; + adapter->quirks = &i2c_powermac_quirks; i2c_set_adapdata(adapter, bus); adapter->dev.parent = &dev->dev;