Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6207238imm; Mon, 23 Jul 2018 13:29:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeZWu0Fzpho/EOnJd3TP26MLUxAdVoVfOwZG0vWWf9AavvG+6j42IklLA1eg4yA0F4Amwco X-Received: by 2002:a17:902:3e3:: with SMTP id d90-v6mr14246336pld.12.1532377792292; Mon, 23 Jul 2018 13:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532377792; cv=none; d=google.com; s=arc-20160816; b=Boa0YxMCW7ZiE83xfRehtifzD9jH2CvrAVRICJXUL40kA4cocSKJOTqop9WEZNDyne 8iE+cRwplQSbtosDFmooiepZItATP/8YsfXBW3eP4WSa1Qdal+bzPAj0kO0OVS4Jy8eT g9CX8WXlIJ5D23TS1zQv6oH7e2y9mXCjViHJ3BwdkA/TkXFnqIms6LqILgrpci3phe1g oevME7dJ3MNADUdKbK/9Px7m6s+WJFbHwayUlnOT8MVmdV5CcTd4EGFzq9TZX493Q5UX jHZnYNwlGtDn5KtazyjbborR8JZrdmDq8vJMXLab+ztcHL1pH2SZlPGi1QvW4BAnvujG DNow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2PMtyxwleHn7fg/v+NQME6/yw+EEeV9rqms/7PI4LuM=; b=YOnuSXTpuZKG3OAV9b1mesu08K+ni+6D9TJcibxJSkN9A/MMn+UYlIK2f4CU5Z9HOx fUvBDs495S6iYeAOWrJNHH+1izIAzOWXDW3hsjR7q6d1KMBGzByYpsIpNSeCOPXytjtY k8qWoiAQbWvK7HoQwkZIpFsVocWrvdmHCxmQq1ronR1cmoiHHRiJMY0xELB/wpIGD/8H 267reLQCurgUb0ztPXOW5OFlLYYR7rsABJTNS+6b+8bcYwU5EzqDdPfQF3o3eX6diZhU 4A5rWTs9BVHNq+fd7GUe72386Mkeeq9tePNz0k7xk8Pb54quW/M7VAO3B9LbhwBrfeyj S6GQ== 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 w4-v6si9805685pfb.52.2018.07.23.13.29.37; Mon, 23 Jul 2018 13:29:52 -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 S2388191AbeGWV3s (ORCPT + 99 others); Mon, 23 Jul 2018 17:29:48 -0400 Received: from sauhun.de ([88.99.104.3]:51228 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388039AbeGWV3r (ORCPT ); Mon, 23 Jul 2018 17:29:47 -0400 Received: from localhost (p54B3377D.dip0.t-ipconnect.de [84.179.55.125]) by pokefinder.org (Postfix) with ESMTPSA id 15639631A49; Mon, 23 Jul 2018 22:26:52 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 00/12] i2c: quirks: add zero length checks and update drivers Date: Mon, 23 Jul 2018 22:26:04 +0200 Message-Id: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, 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