From patchwork Sun Jul 17 03:50:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 591352 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22068CCA485 for ; Sun, 17 Jul 2022 03:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbiGQDsQ (ORCPT ); Sat, 16 Jul 2022 23:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232776AbiGQDsI (ORCPT ); Sat, 16 Jul 2022 23:48:08 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21EFD17E3F for ; Sat, 16 Jul 2022 20:48:08 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id k25-20020a056830169900b0061c6f68f451so6670123otr.9 for ; Sat, 16 Jul 2022 20:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yi8AkrlIqU4lv5oV/rNtUh5JaYHyOIwQpcON7vVHGsA=; b=zr9iL6oISXOb1as1eSfmmqY3qOK3BV9grw3z5lf/C/WPw4ac1n1v8ar0WGrTWVBhVi vIGNlI8SxWlKUK85JILoOVAnX4f4uK9Ua6tVeWX12b/1yc2RcCI5LS7WJikmdUPEOEOR wCRaTAnWuwj46FQLcvRtEW0iqFszCpJmRj2EtpuTF4iq3AWA2/8caHFN+nNsrgpvFyab lG+ApzwU4ZSCEPjX9MLHrocKe8TZObRh45ble4Zi78SlEssrh6q4IAwwyyK6QVEKtIK2 xAq6Nfo64ioTQi+hVFLXsWbVL6i2H8iYxYwE4try/xt9QZsSSuCLPL22RSTGFRWhX0iM vUWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yi8AkrlIqU4lv5oV/rNtUh5JaYHyOIwQpcON7vVHGsA=; b=ync92y9HuS6Xh0DwTFp5mO6Hggu/pRa5z1JKTXcqgap5RIhH7sH/mZ6JyzTrAMJFRk SeF97E5RyWziWUzWFjVCKn8fZ0xecmF758SjB7D1uij+EAc544qi5TMtEN+0LXFc4KTG N0OlntvYHyBmHa/3zfWkQUb4gpmd3zk7P4qyiNz6tcyujbBqS720v6pKrel6CCuSVe+Y /a3FfWMi6KViX1xo/ejtLXa5gwfcF8tXgheVIFFBz26zDgR2EveaxPfnm8bx19hKyW9S iIvQWKmowWskGN/HXRQt9hZFoX4UPARuyAoDGOvLgZDogBrU1JOU5JfJ9fm0QEAIA1Tv O1MQ== X-Gm-Message-State: AJIora+dmfHiQ8My3Znxb53uPtjRecDJN3caKaZHjx4H5xZywZ2Qg6RV kGxpFXziMT5kA8+dD32r2u1M2Q== X-Google-Smtp-Source: AGRyM1uUNBzlqa+eRg79c4zphI886hA7vGx8j8GA62jnmV2U5UdRidnlfYZUfKxTntxitQF3Ies2VQ== X-Received: by 2002:a9d:198c:0:b0:60c:7ecc:5c19 with SMTP id k12-20020a9d198c000000b0060c7ecc5c19mr8638762otk.160.1658029687487; Sat, 16 Jul 2022 20:48:07 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id e65-20020aca3744000000b0033a169f9282sm3004515oia.52.2022.07.16.20.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jul 2022 20:48:07 -0700 (PDT) From: Bjorn Andersson To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Wolfram Sang Cc: linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] i2c: qcom-geni: Use the correct return value Date: Sat, 16 Jul 2022 20:50:25 -0700 Message-Id: <20220717035027.2135106-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220717035027.2135106-1-bjorn.andersson@linaro.org> References: <20220717035027.2135106-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The introduction of GPI support moved things around and instead of returning the result from geni_i2c_xfer() the number of messages in the request was returned, ignoring the actual result. Fix this. Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Reviewed-by: Johan Hovold --- drivers/i2c/busses/i2c-qcom-geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 6ac402ea58fb..3bec7c782824 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -688,7 +688,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, pm_runtime_put_autosuspend(gi2c->se.dev); gi2c->cur = NULL; gi2c->err = 0; - return num; + return ret; } static u32 geni_i2c_func(struct i2c_adapter *adap) From patchwork Sun Jul 17 03:44:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 591354 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 074BACCA47B for ; Sun, 17 Jul 2022 03:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232762AbiGQDlq (ORCPT ); Sat, 16 Jul 2022 23:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232559AbiGQDlp (ORCPT ); Sat, 16 Jul 2022 23:41:45 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C25617E08 for ; Sat, 16 Jul 2022 20:41:44 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-10c8e8d973eso15744706fac.5 for ; Sat, 16 Jul 2022 20:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ggBVtzxfc9gc43RAMioxkqR/MfmXRvl4PuqTnwzIFs4=; b=nnFInGpvhtMgMoFYmiSyHkh4yOHx2iqbMPzgAJF7RZGu9q2nvbbFk6EzhzpHmQLpof GCmXyEVDt7DGPAQ9z5wmrgkLs4rc8AzQUja51kpYQpDTRLj3FVsHzNTuiiHqA6xBbDkV KbGCauvaWZbkLrH3Cqd/d7RmXgd6+V8FCCcYXGZnf4Ta6Q+UHH9F4vvrDMEJ9V4uLlI0 C61VBmkeSdyTYwiyiRa8Lvg3ok3Z8AJMXxFOtoe58LXGSC6fdzgm4n88MthkOvBKIYCC tOJSSBjTwZaTP9J7oZ0GjGwzDXx8h2OijofRSlxu/+EeA437S0Hzm10zJlvgglxZWt5g y6uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ggBVtzxfc9gc43RAMioxkqR/MfmXRvl4PuqTnwzIFs4=; b=yyxZH+a69I2Q5RxvCa0K3y5OS+VGNSf2RjELeO46FbI5HF4H7nD8yBQW0bafy+RE1v 8n1KssTG8xEitG6O0Xi2R9UnCCpMUCBUs5T65QdDDCgGPZ2IFyr/y8R/IMZXUklRZcay Vw7CGse3WoXK7jGzZ/ysQoIGKLa/Oxw6T4betORmwXsucpkgFbX95RYvKAvkVbJ1NMoI s9wLFBwRkGq4RzvoVoxHQMfgGqsqSvIq6qyxmIJj3g/uMeaD7f6iBW11CeR+1eNy/1vf LBa2IPcwQuP08f76klfRppWDylCKXGpkT6XJGpQP9b9YHxVQ3sgQD/vsacd1vBNEjyOB Jk9A== X-Gm-Message-State: AJIora+PaDKC2X6HYEOU3Te2vfQrN50QSgRg3YZ30s/5eVwrt//oQE0s UO6zBK01lyVEosOAMBgEf8d1awE9c5+5Hw== X-Google-Smtp-Source: AGRyM1s9Y4oC++J82QiJHGQT9GtjH9tSZoHv2WuJ0KoGK9344yvhIbM/XX0xNyKJgtOB6tRS2HjSdQ== X-Received: by 2002:a05:6808:1913:b0:338:87ef:40bb with SMTP id bf19-20020a056808191300b0033887ef40bbmr12753464oib.221.1658029303843; Sat, 16 Jul 2022 20:41:43 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id p4-20020a544604000000b00326cb6225f8sm3218010oip.44.2022.07.16.20.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jul 2022 20:41:43 -0700 (PDT) From: Bjorn Andersson To: Bjorn Andersson , Konrad Dybcio Cc: Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, vinod.koul@linaro.org Subject: [PATCH 2/3] arm64: dts: qcom: sdm845-db845c: Enable gpi_dma1 Date: Sat, 16 Jul 2022 20:44:02 -0700 Message-Id: <20220717034403.2135027-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220717034403.2135027-1-bjorn.andersson@linaro.org> References: <20220717034403.2135027-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Enable gpi_dma1 so that i2c14 is able to find its DMA controller. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index 4afdb72cc556..62ad67370d2b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -443,6 +443,10 @@ &gpi_dma0 { status = "okay"; }; +&gpi_dma1 { + status = "okay"; +}; + &gpu { status = "okay"; zap-shader { From patchwork Sun Jul 17 03:50:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 591527 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42B35CCA489 for ; Sun, 17 Jul 2022 03:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232920AbiGQDsR (ORCPT ); Sat, 16 Jul 2022 23:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232831AbiGQDsK (ORCPT ); Sat, 16 Jul 2022 23:48:10 -0400 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED6F117E3F for ; Sat, 16 Jul 2022 20:48:09 -0700 (PDT) Received: by mail-ot1-x334.google.com with SMTP id v19-20020a9d69d3000000b0061c78772699so6651172oto.11 for ; Sat, 16 Jul 2022 20:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9yMrdTNz9TTOLl7s7jHHhG7B/YYZk6CJYXUwzk1dI3M=; b=ojxV7iM7RNRpmnF4Ddf3tRMA1d3afYJgBfK4CQcHVm151J/5qSdRUhgeia5Y37HgpO 7C8Ut3XvMa80UdS9jOM/9WM9KRJJCoA+YI3PM0vZMlQYLlci1exQS9pwLtXnaeZFimk3 6xd6MDz/nFA84xmZSZdxKqp0diYVF48+bxdLeUgnXowp/Z4w1N6CG9DxlL3Z1MYyXRhp zEtsOYro6cjT06H6vLkzKlTdvzK/Bm1qVXjcbrwGJi4mZVQDh3QO6euzx2TDkJ+zzNtz F8snJuW98CVRqUzXcM67xfDmQmN0yoptX29ZSRDZyENwXsOrWnl2EOsJdtowtXw4HoZP QriQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9yMrdTNz9TTOLl7s7jHHhG7B/YYZk6CJYXUwzk1dI3M=; b=HPc0zA7e7XUUJyIJ/t1cIjCvnS3OxEEkDKWZdZ5dacRb2mJcJgrIqTFfvLzQVmhpYK 4TjxESax1OG7m+9yI0sUiikfEx5QZqrh2o07qtv6WfVWhAARyJt5CXnvSaHWAI7tMtIP rPb/X+fP0eMMqmUa6jvEMDXyALJkpHnDpVeTx3N0ymPmXOTGev2mh0Ch+vmLu8FRZ+p9 HdvlSK15MtFGJWms9Lmbn2MdrH+tkmdftCmjSF5e+/Y6dqx1QIwZy3GpOqYz5S6Mhp8A 5RQXu4mXeEhu4iK+0lkj+qXmt2jNydpzndaV7PHpixwOhxnln3JmbTFsYFoVjg+EDXkf U0zA== X-Gm-Message-State: AJIora9trzdNnQu2i4RliKTQdG0/H5XBM12HJVo3H3+fRaGGDa5LQ9cd MjlMoLleCJ/bG+NemVXy7gapaw== X-Google-Smtp-Source: AGRyM1sgyhUmhZEF6CCSDj84K5hnyMkfRoi9L85LXbJYYnWZwIhGZwDNCqTTANv1CNtXtXju7yL0iw== X-Received: by 2002:a9d:2602:0:b0:61c:30c1:fa03 with SMTP id a2-20020a9d2602000000b0061c30c1fa03mr8841527otb.86.1658029689329; Sat, 16 Jul 2022 20:48:09 -0700 (PDT) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id e65-20020aca3744000000b0033a169f9282sm3004515oia.52.2022.07.16.20.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jul 2022 20:48:08 -0700 (PDT) From: Bjorn Andersson To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Wolfram Sang Cc: linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] i2c: qcom-geni: Silence NACK and GENI_TIMEOUT Date: Sat, 16 Jul 2022 20:50:27 -0700 Message-Id: <20220717035027.2135106-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220717035027.2135106-1-bjorn.andersson@linaro.org> References: <20220717035027.2135106-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Turn NACK and GENI_TIMEOUT into debug prints to silence the kernel log when running things such as i2cdetect to scan the bus. Signed-off-by: Bjorn Andersson --- drivers/i2c/busses/i2c-qcom-geni.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index e212e7ae7ad2..6ac179a373ff 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -208,6 +208,10 @@ static void geni_i2c_err(struct geni_i2c_dev *gi2c, int err) case GENI_ABORT_DONE: gi2c->abort_done = true; break; + case NACK: + case GENI_TIMEOUT: + dev_dbg(gi2c->se.dev, "%s\n", gi2c_log[err].msg); + break; default: dev_err(gi2c->se.dev, "%s\n", gi2c_log[err].msg); geni_i2c_err_misc(gi2c);