From patchwork Wed Oct 7 17:20:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 293619 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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham 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 66DFEC41604 for ; Wed, 7 Oct 2020 17:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 010362176B for ; Wed, 7 Oct 2020 17:20:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=connolly.tech header.i=@connolly.tech header.b="V2BIlimC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727970AbgJGRU7 (ORCPT ); Wed, 7 Oct 2020 13:20:59 -0400 Received: from mail-41104.protonmail.ch ([185.70.41.104]:11242 "EHLO mail-41104.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727891AbgJGRU7 (ORCPT ); Wed, 7 Oct 2020 13:20:59 -0400 Received: from mail-03.mail-europe.com (mail-03.mail-europe.com [91.134.188.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail-41104.protonmail.ch (Postfix) with ESMTPS id E5DA420035C1; Wed, 7 Oct 2020 17:20:56 +0000 (UTC) Authentication-Results: mail-41104.protonmail.ch; dkim=pass (1024-bit key) header.d=connolly.tech header.i=@connolly.tech header.b="V2BIlimC" Date: Wed, 07 Oct 2020 17:20:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1602091253; bh=UHVeS8mhguivBrMvSGJLXZGFXdxxnZc9zuVyS2Pzp9c=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=V2BIlimCjeDjKFKCRlR4nwVZwK4a/wJwL5PzhTUiKr0vG0V8VpBtvfRGxTmbs/lWw NuLPb0dx7zykJWJhaW4k4HpeYLvF268FgLvZ7LWdOWo4SUOlj9sfwCjhTwqF0kG6VG b5QBD2n3vG3wOMrfE3LvGAMrpdXe+1vhrrN0kYUk= To: Akash Asthana , Mukesh Savaliya , Andy Gross , Bjorn Andersson From: Caleb Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, Caleb Connolly , linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Caleb Connolly Subject: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6 Message-ID: <20201007171807.285298-6-caleb@connolly.tech> In-Reply-To: <20201007171807.285298-1-caleb@connolly.tech> References: <20201007171807.285298-1-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The OnePlus 6/T has the same issues as the 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 dead5db3315a..50a0674a6553 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -358,7 +358,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) @@ -400,7 +401,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)