From patchwork Tue Mar 23 04:33:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 407082 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 199BDC433E9 for ; Tue, 23 Mar 2021 04:34:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEC3A619B4 for ; Tue, 23 Mar 2021 04:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbhCWEe3 (ORCPT ); Tue, 23 Mar 2021 00:34:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbhCWEdy (ORCPT ); Tue, 23 Mar 2021 00:33:54 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35919C061765 for ; Mon, 22 Mar 2021 21:33:53 -0700 (PDT) Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id B47C58365A; Tue, 23 Mar 2021 17:33:47 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1616474027; bh=WNE1jzoHayASoTWR0UMgInhsS9UPRGat+farEX1wxCQ=; h=From:To:Cc:Subject:Date; b=slF1YQhtAtAT4XMs4NHGtL/OY5K4dl79AMFg3D5LOUNyD/wfMYRs7Xg3++71cXEpZ Xt3IX1EsppZJUNVjn2gi0QAdt2Ul+gzGW0/6Nf0pjsWHDvyOV/G5FIYD+Qcuaftiyo cdQdaiayrv0P5c570ksckBTAVq6g3EzvFmW/kabbzEfbEoemhxAVbeQ+yoEX/36DXW sAQFWNNVL/WJe434iVZQgNwiRHzPZUKf+gALeHtPr90c+nuqIEmS3V7w9TAMZ/WIsy oRVMp9OIYzkdHRndUMkBha2DnSFORh7/c75vLrnIRG+aJOQE0c/MWACQ2V3Vwux4YB eS3RS7W1yZjPw== Received: from smtp (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8, 2, 6, 11305) id ; Tue, 23 Mar 2021 17:33:47 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.20]) by smtp (Postfix) with ESMTP id 212F713EED4; Tue, 23 Mar 2021 17:34:03 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 9207128409A; Tue, 23 Mar 2021 17:33:47 +1300 (NZDT) From: Chris Packham To: robh+dt@kernel.org, linux@roeck-us.net, wsa@kernel.org, jdelvare@suse.com Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH 0/6] i2c: mpc: Refactor to improve responsiveness Date: Tue, 23 Mar 2021 17:33:25 +1300 Message-Id: <20210323043331.21878-1-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.3 cv=GfppYjfL c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=dESyimp9J3IA:10 a=ao_VAR3SBByvQXh7kj8A:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The "meat" of this series is in the last patch which is the change that actually starts making use of the interrupts to drive a state machine. The dt-bindings patches can probably go in at any time. The rest of the series isn't dependent on them. I've tested it on a T2081 based system with a number of i2c and smbus devices. Its the end of my work day so I figured I'd get this out now but I'll do some more testing on a P2041 board and a few different i2c devices tomorrow. Chris Packham (6): dt-bindings: i2c-mpc: Document interrupt property as required dt-bindings: i2c: convert i2c-mpc to json-schema i2c: mpc: Make use of i2c_recover_bus() i2c: mpc: make interrupt mandatory and remove polling code i2c: mpc: use device managed APIs i2c: mpc: Interrupt driven transfer .../devicetree/bindings/i2c/i2c-mpc.txt | 62 --- .../devicetree/bindings/i2c/i2c-mpc.yaml | 99 ++++ drivers/i2c/busses/i2c-mpc.c | 513 ++++++++++-------- 3 files changed, 373 insertions(+), 301 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mpc.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mpc.yaml