From patchwork Mon Sep 24 23:52:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10613051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A27CD13A4 for ; Mon, 24 Sep 2018 23:52:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AFDA29BB6 for ; Mon, 24 Sep 2018 23:52:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E9DD29C37; Mon, 24 Sep 2018 23:52:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55EFA29BB6 for ; Mon, 24 Sep 2018 23:52:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726202AbeIYF5T (ORCPT ); Tue, 25 Sep 2018 01:57:19 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42485 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727309AbeIYF5T (ORCPT ); Tue, 25 Sep 2018 01:57:19 -0400 Received: by mail-pg1-f196.google.com with SMTP id y4-v6so10069443pgp.9 for ; Mon, 24 Sep 2018 16:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=htkOv8a+jJwLkJJsbzLqP9XECHHdn1Vyryn+ssv2BFA=; b=Zq1hRxnljPXKgJ+PZk58Adufj5x61ThBJcAKbTZcVHEOTRieH0ysnp3COnPehO3ANb NZPCnVBBMEuyZ2kSEyLXtPSLYjkEJV03fr/QH6VPY2bNH9OgnVHHLuQ5SJyxISufT5Jk p3FGvY+55Z7bxzl00gaBHKUFtB8CK+U4hc6Ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=htkOv8a+jJwLkJJsbzLqP9XECHHdn1Vyryn+ssv2BFA=; b=qSg5/kqjrSpkG0jaoPpMGPUdOmdxT9PDgJdkZOkvVr6Mf5Zm1ue9asPT/ljn+36hGy bmQyNhcNDPdGMPfcqZ9Uqzknw/BKgg/OBqKv/1Phj0VS4udWkRLw3phGWGKuf/H49OHR FOwFbNfAoWKXSCQXj/RnA9FjaEk66Og2LJ8GhOGFpf9HOtg7y1xXOU7BEMsokfTbILDc A3pcJ8Cga5PXkkYF50S14jgK+v9CVeFCly7P5if+j8e0HGj72ZLD30FJrAoE4s1wPb2d QKCX7dgn0cKsm8m5P4W4a1IT8AegpZSTGp7WR9f7+TwVjTY5e+DXu+MH6OQ/HUzUibvq DCbA== X-Gm-Message-State: ABuFfohVYA3M2J62OJzBIlVXh6uMhufXziRgd0q75qO8+OP+jmaya6wB 3u036WoHUGKh3K1rOKEAOUu+Xw== X-Google-Smtp-Source: ACcGV61ilLHLRC3uXbWAAuLItRD10Vuzf88LsiStlferA5oxVvbbuCwPoi9fW+eZVhGlozzq2uKCKA== X-Received: by 2002:a62:18a:: with SMTP id 132-v6mr902226pfb.207.1537833157355; Mon, 24 Sep 2018 16:52:37 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id d81-v6sm518993pfj.122.2018.09.24.16.52.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 16:52:36 -0700 (PDT) From: Stephen Boyd To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, Karthikeyan Ramasubramanian , Sagar Dharia , Girish Mahadevan , Doug Anderson Subject: [PATCH v3 0/3] Fix qcom geni i2c DMA handling Date: Mon, 24 Sep 2018 16:52:33 -0700 Message-Id: <20180924235235.182649-1-swboyd@chromium.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP (Numbering is weird because I dropped patch 1 but left numbering the same) The qcom GENI I2C driver fails DMA sometimes when things from request firmware are passed in as the message buffer. This patch series fixes that problem in the first patch and the second patch cleans up the code a little to reduce lines and simplify lines. Cc: Karthikeyan Ramasubramanian Cc: Sagar Dharia Cc: Girish Mahadevan Cc: Doug Anderson Changes from v2: * Dropped first patch because it's applied * New patch 3 to simplify irq handler * Updated patch 2 to hoist out common code and remove 'mode' local variable Changes from v1: * Use i2c helpers to map buffers * New patch 2 to clean up seriously indented code Stephen Boyd (2): i2c: i2c-qcom-geni: Simplify tx/rx functions i2c: i2c-qcom-geni: Simplify irq handler drivers/i2c/busses/i2c-qcom-geni.c | 149 +++++++++++++---------------- 1 file changed, 65 insertions(+), 84 deletions(-)