From patchwork Thu Nov 12 16:22:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 11900605 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C3B1697 for ; Thu, 12 Nov 2020 16:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61A7722252 for ; Thu, 12 Nov 2020 16:22:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=connolly.tech header.i=@connolly.tech header.b="A3CC7k+N" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729039AbgKLQWN (ORCPT ); Thu, 12 Nov 2020 11:22:13 -0500 Received: from mail-03.mail-europe.com ([91.134.188.129]:52606 "EHLO mail-03.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729049AbgKLQWK (ORCPT ); Thu, 12 Nov 2020 11:22:10 -0500 Date: Thu, 12 Nov 2020 16:22:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1605198126; bh=G5vIZonOu1YP1IFD5UKC7p+SMCBtaBVGRFKb/phoFDk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=A3CC7k+Nr4tS2kVm1B84u45rLjxXTIKOizlNks9oz0AdOIqj74aRSHUTgL642AWnp afuGJUS6keIxbJDYSjfo5x7tdyP3EcbpQEskT1Yz01JhFJvIt/8e821EmWCqJLYNRz zfahxVORYJLH63n/EKODUVhzpd0nlHPgh9IK7QAc= To: linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Akash Asthana , Mukesh Savaliya From: Caleb Connolly Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Caleb Connolly , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Caleb Connolly Subject: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices Message-ID: <20201112161920.2671430-6-caleb@connolly.tech> In-Reply-To: <20201112161920.2671430-1-caleb@connolly.tech> References: <20201112161920.2671430-1-caleb@connolly.tech> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The OnePlus 6/T has the same issue as the Yoga c630 causing a crash when DMA is used for i2c, so disable it. https://patchwork.kernel.org/patch/11133827/ Signed-off-by: Caleb Connolly --- drivers/i2c/busses/i2c-qcom-geni.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 8b4c35f47a70..9acdcfe73be2 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -357,7 +357,8 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, struct geni_se *se = &gi2c->se; size_t len = msg->len; - if (!of_machine_is_compatible("lenovo,yoga-c630")) + if (!of_machine_is_compatible("lenovo,yoga-c630") && + !of_machine_is_compatible("oneplus,oneplus6")) dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); if (dma_buf) @@ -399,7 +400,8 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, struct geni_se *se = &gi2c->se; size_t len = msg->len; - if (!of_machine_is_compatible("lenovo,yoga-c630")) + if (!of_machine_is_compatible("lenovo,yoga-c630") && + !of_machine_is_compatible("oneplus,oneplus6")) dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); if (dma_buf)