Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6221777imm; Mon, 23 Jul 2018 13:49:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeqc4V59SXSjwmOstrax1kmMSulBUeTXtO8/sbxq+KYdDpvKZpI7LGmE4+dfRDJWjhPBwf7 X-Received: by 2002:a17:902:8210:: with SMTP id x16-v6mr14254434pln.307.1532378945202; Mon, 23 Jul 2018 13:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532378945; cv=none; d=google.com; s=arc-20160816; b=J69PzPBE05EzMkwbG2JyyANjulwWjU0690OWRDVAXRJcKufRsBnFyBkJhHIaIY2W1L 2J/GGPwsHxsQpZ/I/TvL1y0xTZRxIQiAX2vL8frfCZFnkeKULYRN+DnQOkhQrFA20Wxe sva4yz3eInjEuozDt1aI4qwd8Oyd6YGl0bstupN+IlgpN+uw04OqjW+XJRtrgQPrDiPh U8/Xx07RrHnI2GzL5g8iK2b4EsniHW0p+zJeStDBxYfJ4FWMbgbiZVOm3rrgTcyj/mdR vmz3RgYm4t/WFI5/GejAjbG4pvuEvfgLUOo1EXaVoQHimpMsuJIY8I4MojvJkALk1yeJ ZmCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=D94UWB+j9CgiHyj082yFXBRGQGYt4DSIPTvE19+6Ork=; b=0P58nC0lahV7l6Mt2u40nP+mXpdicVXaltVSF1iPlXcJn+NnveFzDkpX9tgh7qQ0Lo cgcpCPB95eKciAT288LwFYZezstGm8HZOT7lm+RQ6IFiPJMjADRufX5+1KckTBbkGpz8 9Hh4nasI9q5wvW3OvA4Vkrr4kt3muEZENRArbc30lpQMIb9JZd9Yki1Mss/NgCFij9ep A2pBuFwj5ER/jewhPBudzeYbRHsrCCAMkUCedhuvCCFIAu/n90M6rOwAVNAul+RxaOUI etZtlIu0BpEK4gSMT7Aka4PWzBfCCGUUB0R7Oh6I6/2jwlQg6aWKWNZRVNUmM+R3ubm7 fCQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YWPme6y0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r73-v6si9684459pfk.83.2018.07.23.13.48.49; Mon, 23 Jul 2018 13:49:05 -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=@gmail.com header.s=20161025 header.b=YWPme6y0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388131AbeGWVu4 (ORCPT + 99 others); Mon, 23 Jul 2018 17:50:56 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:42520 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728303AbeGWVu4 (ORCPT ); Mon, 23 Jul 2018 17:50:56 -0400 Received: by mail-ua0-f194.google.com with SMTP id w7-v6so1329171uan.9; Mon, 23 Jul 2018 13:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D94UWB+j9CgiHyj082yFXBRGQGYt4DSIPTvE19+6Ork=; b=YWPme6y0MmU2k18t+43RFSLcDwvePe5GQIRf0/S86g9ONMgkLzivJV3+58+h+gaL/R BzYgspfBbdIewDjGM0CUvDqmLZF3wH66GKO3d17f4VnUmwuejC7RW1RweyASpQW2qL/G OQ+/sMoarE4jkqyOMhgWsJDPINQ0qTXBa+PdvGgyY8eQlEZkB5ceyWCnuaW6lCwbMU0H pmj64zBc05zXjoJauAtr1vDX8XsRDLBk52i+kOLOLEeojxL5ovpoDBlsK5R2w3HFb4SR 2n1Hina4/nQgwlOML9niM8SUvJSLx/2m7u4PQeK7FYtL+8LhJbcuCVK9ZP6r1L3xTC3n u2ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=D94UWB+j9CgiHyj082yFXBRGQGYt4DSIPTvE19+6Ork=; b=SyQX1ULwdX9CnG9LebBeY+EfaQkL2j6lMK6SteG3mJCDOrqrNBGvOdAqOBKGw5k7ne //fEIeJOBhbUsUEt4+k/t/24GIUDZ/oAPrE2jZ6Zgd0xsSCSH27lHeDk0f6mdoRixclk O1Dpcm/H9j7zASGsQlQz094XO0N830ZzwsgAwvTUbavfXO2j1J+iS0LVJmd6LMx8XAGM N7fMxGfoCK+5+xAujBjW/pZiGi05gekxmiCLD/nbv9gJBxhQjvZNHgBCyIA/M5bNHqz0 tC4ZfAvX1A7dVOOQGa1MhgjOxlnyXNVlECK5/kRE3NaCTxNgR/jeifBSnfXY3GnQ7Bi/ plSw== X-Gm-Message-State: AOUpUlGdYdM6kkf2y7dzm+pI7hAVey/88g6E/hmiI6XYkuhi+2srD5KW GQR9cCgxsW0pHW2RAr3YfJo0YcQoGuHEv6TAMjs= X-Received: by 2002:ab0:13c7:: with SMTP id n7-v6mr9761360uae.47.1532378878442; Mon, 23 Jul 2018 13:47:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 13:47:57 -0700 (PDT) In-Reply-To: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> References: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> From: Andy Shevchenko Date: Mon, 23 Jul 2018 23:47:57 +0300 Message-ID: Subject: Re: [PATCH 00/12] i2c: quirks: add zero length checks and update drivers To: Wolfram Sang Cc: linux-i2c , Linux-Renesas , linux-arm Mailing List , linux-arm-msm@vger.kernel.org, Linux Kernel Mailing List , Linux OMAP Mailing List , linux-soc@vger.kernel.org, linux-tegra@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 23, 2018 at 11:26 PM, Wolfram Sang wrote: > I had this idea for quite some time on my todo list but a soon to be > implemented refactoring in the i2c-rcar driver now finally made me do it. Add a > 'can't do 0 length messages' quirk to the quirk infrastructure for and remove > the manual handling from the drivers. This makes the quirk much more visible. > (Quite some prominent vendors in that list) We also have a centralized place to > handle updates to the quirk detection if that is ever needed. > > I have tested this with the i2c-rcar and i2c-sh_mobile driver on a Renesas > SalvatorXS board equipped with M3-N (r8a77965). > > A git branch can be found here: > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/quirk-no-zero-len > > Looking forward to comments, reviews, tests... Thanks! Reviewed-by: Andy Shevchenko for patches 1 and 2. > > Thanks, > > Wolfram > > Wolfram Sang (12): > i2c: quirks: add zero length checks > i2c: designware-master: use core to detect 'no zero length' quirk > i2c: mxs: use core to detect 'no zero length' quirk > i2c: omap: use core to detect 'no zero length' quirk > i2c: pmcmsp: use core to detect 'no zero length' quirk > i2c: qup: use core to detect 'no zero length' quirk > i2c: stu300: use core to detect 'no zero length' quirk > i2c: tegra: use core to detect 'no zero length' quirk > i2c: zx2967: use core to detect 'no zero length' quirk > i2c: rcar: use core to detect 'no zero length' quirk > i2c: xlr: use core to detect 'no zero length' quirk > i2c: sh_mobile: use core to detect 'no zero length read' quirk > > drivers/i2c/busses/i2c-designware-master.c | 12 +++++------- > drivers/i2c/busses/i2c-mxs.c | 8 +++++--- > drivers/i2c/busses/i2c-omap.c | 8 +++++--- > drivers/i2c/busses/i2c-pmcmsp.c | 17 +---------------- > drivers/i2c/busses/i2c-qup.c | 14 ++++++-------- > drivers/i2c/busses/i2c-rcar.c | 13 ++++++------- > drivers/i2c/busses/i2c-sh_mobile.c | 10 +++++----- > drivers/i2c/busses/i2c-stu300.c | 12 ++++++------ > drivers/i2c/busses/i2c-tegra.c | 4 +--- > drivers/i2c/busses/i2c-xlr.c | 11 +++++------ > drivers/i2c/busses/i2c-zx2967.c | 8 +++++--- > drivers/i2c/i2c-core-base.c | 6 ++++++ > include/linux/i2c.h | 4 ++++ > 13 files changed, 60 insertions(+), 67 deletions(-) > > -- > 2.11.0 > -- With Best Regards, Andy Shevchenko