Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6220453imm; Mon, 23 Jul 2018 13:47:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf4XDPvK9f67nKA7Ew5fJAAtS6GhESPFejZP0YMD6jRzGp+iGOsEL7ceHC9hhxpmW7LBR3+ X-Received: by 2002:a62:6746:: with SMTP id b67-v6mr14768346pfc.243.1532378837601; Mon, 23 Jul 2018 13:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532378837; cv=none; d=google.com; s=arc-20160816; b=fQhJ4sEvDOAFCqQw16NVIRa/Z8u71A+FSUdZCk0XwmWKEP94RksM3JAsQNAG+4K/Iu 1mOUvlEJvO4CNj7rjtHfEX3UoMa/bpfBlq//DYKjwmqhG3aqnvsfcr3p2wt+bZTX+Yxk jU8yyOZ1+5LFZ2DFl9I/6v5KnUO+Mw7kyGOTrl6aIH8wYesXSbUukfF8vIEH4Hq7A4zx MJYKeJgSZcXEUhehILSwWt/larIfQVRHqkEH5uGYAy0C+e+C08etRquGlVA/kbP9lYsR AuiFFQjyWIYG0k/g4gyf3Ydnm+35h99S7aWyK4Iqel7ZdSEJB1URBfa57nfjAsIl9XC8 Bplg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=dAXSd2EnRP+gL6XfCUP1+8UfeP3EVi29NpStfd5o+XY=; b=VpCdR2isN8fQCA2ELORW58uZ+uuCBkMaO2Quth2Pg2rr7XRbPOD4Ue1b4AVQuXfMVq t25BjUvOI59FpI0NCBVtiJ/6rLjxz4AnqTws7UUURsKV/rc2FTYHB6jhuqMCwogZ7Bk5 i8GSUC0CANiX5DvMBEwnZAdMhc26G9PvLri5+uQRSPIs6razUy+qh3ElNjD0DW9Udfyb WxI9VHh+TsWvL8S53yP21rzpUB9pvNvPbsF9GR+T1Kk6rZfYVEJSPzxkOFc3PQuBKG7z FLaOsuGljKXshxg3Cywd7pp9ufYbAUqjcwY0VkIpHQoRhCQ+ZqTiIc+Usa0LLJgugvMF rCOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b="I/7GpVFQ"; 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 l196-v6si9929892pga.38.2018.07.23.13.47.02; Mon, 23 Jul 2018 13:47:17 -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; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b="I/7GpVFQ"; 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 S1728399AbeGWVtK (ORCPT + 99 others); Mon, 23 Jul 2018 17:49:10 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38875 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728367AbeGWVtK (ORCPT ); Mon, 23 Jul 2018 17:49:10 -0400 Received: by mail-lj1-f195.google.com with SMTP id p6-v6so1692228ljc.5 for ; Mon, 23 Jul 2018 13:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dAXSd2EnRP+gL6XfCUP1+8UfeP3EVi29NpStfd5o+XY=; b=I/7GpVFQhDY9zq5zvQnY0Gn7PwLlK8tl5R0XmRdRRMW57islZ+z/59CaklnudpV5xg ifNzT8jyDYvO+jWbusjmanHMr1jvLDrfjOrAkyf5rr68MTTSpboeHxaLi5Ne+fc9dzh7 rwGvdG4BF5AlR+/pROpQA0BssuBOZEEPmiSYepjOwri2igLlEbS0WMN18zsHKUnoofhh xBB0MIakeX+DukC8GIT+LbHO+NJtv0foJdi9ERVyOhhSgCm4Qe04UZVzupYsf8mIIkRN yjlaPThaI5RPP3V8NYE1remeIi1neMcsTg7jOFQXpVr44iO1E1QUjfi6obiR8kJ0tMAj +oYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=dAXSd2EnRP+gL6XfCUP1+8UfeP3EVi29NpStfd5o+XY=; b=nUDeQXSQBNW1TPjaeWd4G60oWOIG+q4SJ4u/NK2PwzHQ8tSIcQZdo28sWwwhPANC3l fe5bT+WHb4cQBGhPmRXwxXVlWv0ZgNhb6j+9jHcSkRjFUJQx9EnCpADcpZyIIUQfE9mv eMa/14dM0SODBRUFlg3FIzxakn2Yfgtgznz6XdTxVcGnbH3eXIgxZ97siGwNlV+y7GG9 dBAxsRp1vYv+byNBkXQOr/NEboaqeGnhJiGHDhfEUXcNQpW9hRzMPIwcu6PyhC2M59pz 0R/DjmlyzCkn/AkZA3DD8+Z9McvjUOX3HGVyOQKooBrAD75qt7FGsE4UlEg/9DwZNsUD BBTQ== X-Gm-Message-State: AOUpUlFRZ5G+lVt9ls4PzTjUWCFd6L8OqNP9ZjL6GYWZxlEab685UBdA BGF3IK44V+m3Msy6Co17o/foFA== X-Received: by 2002:a2e:8:: with SMTP id 8-v6mr9894877lja.112.1532378772297; Mon, 23 Jul 2018 13:46:12 -0700 (PDT) Received: from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99]) by smtp.gmail.com with ESMTPSA id r64-v6sm1543180lff.90.2018.07.23.13.46.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:46:11 -0700 (PDT) Date: Mon, 23 Jul 2018 22:46:10 +0200 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/12] i2c: rcar: use core to detect 'no zero length' quirk Message-ID: <20180723204610.GH1432@bigcity.dyn.berto.se> References: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> <20180723202617.15230-11-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180723202617.15230-11-wsa+renesas@sang-engineering.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, Thanks for your work. On 2018-07-23 22:26:14 +0200, Wolfram Sang wrote: > And don't reimplement in the driver. > > Signed-off-by: Wolfram Sang Reviewed-by: Niklas S?derlund > --- > > drivers/i2c/busses/i2c-rcar.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c > index 2688520110d1..791a4aa34fdd 100644 > --- a/drivers/i2c/busses/i2c-rcar.c > +++ b/drivers/i2c/busses/i2c-rcar.c > @@ -796,14 +796,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, > if (ret < 0) > goto out; > > - for (i = 0; i < num; i++) { > - /* This HW can't send STOP after address phase */ > - if (msgs[i].len == 0) { > - ret = -EOPNOTSUPP; > - goto out; > - } > + for (i = 0; i < num; i++) > rcar_i2c_request_dma(priv, msgs + i); > - } > > /* init first message */ > priv->msg = msgs; > @@ -890,6 +884,10 @@ static const struct i2c_algorithm rcar_i2c_algo = { > .unreg_slave = rcar_unreg_slave, > }; > > +static const struct i2c_adapter_quirks rcar_i2c_quirks = { > + .flags = I2C_AQ_NO_ZERO_LEN, > +}; > + > static const struct of_device_id rcar_i2c_dt_ids[] = { > { .compatible = "renesas,i2c-r8a7778", .data = (void *)I2C_RCAR_GEN1 }, > { .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 }, > @@ -943,6 +941,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) > adap->dev.parent = dev; > adap->dev.of_node = dev->of_node; > adap->bus_recovery_info = &rcar_i2c_bri; > + adap->quirks = &rcar_i2c_quirks; > i2c_set_adapdata(adap, priv); > strlcpy(adap->name, pdev->name, sizeof(adap->name)); > > -- > 2.11.0 > -- Regards, Niklas S?derlund