From patchwork Fri Sep 23 15:57:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 608599 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8622ECAAD8 for ; Fri, 23 Sep 2022 15:58:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 725373E; Fri, 23 Sep 2022 17:57:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 725373E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663948728; bh=Y/9GpdglSciFv5lO8I8anvVgjOIIcqQkf3S26XMLo7M=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=WzwbVc1GnEuvrpZdjGGbNf/jgs9DmfCInoWfHpYGmU9/q57QacLThydQJ92/rwdvs KtTdIKfneAyrBuqbg+vns1aY7DSfwcSvohZjwglrcqnxwRgqWUQbVXiMRdO4qjWWXn qAYhN16rnJBZXvTXFw9vdbInuCYIWAGoDzG/69xw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E23D5F80269; Fri, 23 Sep 2022 17:57:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E04F4F804D1; Fri, 23 Sep 2022 17:57:55 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87E49F801EC for ; Fri, 23 Sep 2022 17:57:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87E49F801EC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MKPUXAAv" Received: by mail-lf1-x133.google.com with SMTP id j16so1005613lfg.1 for ; Fri, 23 Sep 2022 08:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=hOgaSJV/qvshW50YoXul8vltWjgqBUI4d7EfeiEA4BM=; b=MKPUXAAvaHSrIM4Us8EwlpoRHPY3EvytcNQ8V3FJPDu62QIfKK6mI4892tWNP6yehZ erE4WyAyNalnxfDd0xlZnH3CMUresc4WdqtqUf9OTfZP+N68rTDd6KH4jCfX/YOvGtTJ nOreixgDnKWdczMNGBvh89puBhDNp6OubPGDI9I7PlcdEjvXcrC801omCmI7XnzwmZYy ll3q3W3p8htZqu9vWdSfGGHl2uHMBjU44UdMnMmWNLIZlCHzZqJtMxTigiymKohb03/t ykKlSKpek5vY+sibK/yXD1+exLoXM2nKkv4Gpv9UI8wtAjPoK5coIKiyCYSpfRcVhrFq 1+DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=hOgaSJV/qvshW50YoXul8vltWjgqBUI4d7EfeiEA4BM=; b=W00s8T5B722KLK6+qQsgBQd1AlobysAjneSC5SuCSUYAwAAtS15Q1NNIgzoM3s2hWK wHK9aUT7D20S+ShZFXaOtdcc0RZj8dMIP3BYd7DCmYJ8rBozorWRYAiZAof4YJdxpiTx NYPgFU0T+wMINZePTsenX3QPZMLQ1cuJaY3xzprsIxORgVu0DdnobqS1C6NQSiED8D18 /itd44tNDRZsW//W3GeXVk8xYgPzoDvEDDUNQ8Rw6HqEuTVAR3ptCPOx0NHWZ7AjMubb firS2eTigPKJaSW4rb063N+XzieKAGsFvE77wqLmwwhZyhSnvldZPQX2j+dQmjSlcEZW w9Lw== X-Gm-Message-State: ACrzQf3E3X63KZkEdjoqdhAG1rJduU2Qt/sWBI5KaD3oxjdGSjEhcJa5 8YmxwZT1peTHxoaZF3B3lBDz5w== X-Google-Smtp-Source: AMsMyM6a0qhq/H+1+xSmcaZG6QjlDYqHTpFfeGibPe6fhDBAO3rpFsP92G7Vzpexp0uDV9zvPHflWw== X-Received: by 2002:a05:6512:3f90:b0:48a:826d:f727 with SMTP id x16-20020a0565123f9000b0048a826df727mr3317397lfa.281.1663948667475; Fri, 23 Sep 2022 08:57:47 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id be17-20020a056512251100b0049a4862966fsm1502286lfb.146.2022.09.23.08.57.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:57:47 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] slimbus: stream: add checks for invalid unprepare/disable usage Date: Fri, 23 Sep 2022 17:57:36 +0200 Message-Id: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Cc: Krzysztof Kozlowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" slim_disable_stream() and slim_stream_unprepare() are exported, so add sanity checks preventing unmatched/invalid calls. Signed-off-by: Krzysztof Kozlowski --- drivers/slimbus/stream.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/slimbus/stream.c b/drivers/slimbus/stream.c index 75f87b3d8b95..7bb073ca6006 100644 --- a/drivers/slimbus/stream.c +++ b/drivers/slimbus/stream.c @@ -407,6 +407,9 @@ int slim_stream_disable(struct slim_stream_runtime *stream) struct slim_controller *ctrl = stream->dev->ctrl; int ret, i; + if (!stream->ports || !stream->num_ports) + return -EINVAL; + if (ctrl->disable_stream) ctrl->disable_stream(stream); @@ -438,6 +441,9 @@ int slim_stream_unprepare(struct slim_stream_runtime *stream) { int i; + if (!stream->ports || !stream->num_ports) + return -EINVAL; + for (i = 0; i < stream->num_ports; i++) slim_disconnect_port(stream, &stream->ports[i]); From patchwork Fri Sep 23 15:57:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 609155 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E8D5ECAAD8 for ; Fri, 23 Sep 2022 15:59:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4C45483E; Fri, 23 Sep 2022 17:58:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4C45483E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663948756; bh=vWUxtbWP6tdrbx8LpwJUKttZ+VXef6bXKaXQHRjlm28=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AKhPFokBXrIbOYUEHAdLgDL5JEKW+muPK19SACjwa+sYh2vYnFtn5EWZ4dTMithe+ dTbfd4brsJzpLXAGYuJrtYZ5J5vsRjIVuaIrHYSr7V/8I71FGbEd15AtK5dl/BqHj9 3PZQpj7rYaPs/F2DVwLCwPkLc/hZ5ymeoFoXsLMc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 124E7F80539; Fri, 23 Sep 2022 17:58:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B5E02F804AC; Fri, 23 Sep 2022 17:57:56 +0200 (CEST) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4C534F80224 for ; Fri, 23 Sep 2022 17:57:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4C534F80224 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K90C3hBC" Received: by mail-lj1-x235.google.com with SMTP id h3so586766lja.1 for ; Fri, 23 Sep 2022 08:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=QErVhPRsr6N34SxJtyWhiwnyHyeW0kuOVw7a/uaJPXU=; b=K90C3hBC6wd5wX5fUY+1rT0FrcxSVMtXeBam2xxfpXbCDnmo2fyDcdgG9nSnADKhgc o2OWb061x6VWvbk9dEQrp/ePFAimAEzue6BUNwKD8D+jnciw5fX8KSljEMbkxJ4ubc5+ JcsV14M4u1b4vcTxCWhY/vF4t5qB+ONaqEsca+a0xJ8LewPoup13Tr+JooMVwEw/6NfW VL9HsHhxI9BEbeBoZsgPhA7P5nhbAvydwvQo8DZ9hwF9uZ+OY35lyF9WSCg/iLLERh1O Hy6hTcAaGuVVEh5xCawr/KmXvG54ToUvvcdhRwVK6HCyTvcjHApHE4dAHP4Q5DniMhzR lwUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=QErVhPRsr6N34SxJtyWhiwnyHyeW0kuOVw7a/uaJPXU=; b=oTXFx1lEoSpP/c6b6XXp4F+QzLo04ARLJbi0KMYNz0SqhagN24eG/UNkEA8KYEyhZo 9QpUvEWIbVS0CkWxs0ZAZBk6BUIYArEfDssqLLbhrneJs9cf8KjiCCUC+JjTk9mo1GZW h/624bOj0lfVzlcmqF8AhVNtraAQ0G1BfZo5dwLpgrPIlkD0c0+6goPGfkkNn213SNCB t+ou/srr8tfOsQF/KV48GNIpYF+uhRCOOagLbEjbfougj1r+vVIeUjgpGTqvv0VcAFET lLevsk6u3obqJnKy5r811IcL7RB/clpvq0sGWgHilO72aeVviq6KxmOIGQjGus0cBl1W QMiA== X-Gm-Message-State: ACrzQf0AUS04AgU9Bc/R4xmR9F2TnCpCRAmR0ProzwSGfSeX/F1VncgS gL/VwH+PcoLEJbfpvO0zU+HObkz/EI8vsg== X-Google-Smtp-Source: AMsMyM75V1fMGaL7US5/aDsMjZmatRFTONq2M7J8EAALYekOySKgoE+XfmX2rP9Y0C4bmxwyKYSNYQ== X-Received: by 2002:a2e:9dd3:0:b0:26c:3c23:a7e0 with SMTP id x19-20020a2e9dd3000000b0026c3c23a7e0mr3014306ljj.22.1663948668446; Fri, 23 Sep 2022 08:57:48 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id be17-20020a056512251100b0049a4862966fsm1502286lfb.146.2022.09.23.08.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:57:48 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] slimbus: qcom-ctrl: drop unneeded qcom, apq8064-slim compatible Date: Fri, 23 Sep 2022 17:57:37 +0200 Message-Id: <20220923155740.422411-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> References: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Cc: Krzysztof Kozlowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Bindings require usage of fallback "qcom,slim" compatible, so "qcom,apq8064-slim" is redundant. Signed-off-by: Krzysztof Kozlowski --- drivers/slimbus/qcom-ctrl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index c0c4f895d76e..bb106eab8ae2 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -718,7 +718,6 @@ static const struct dev_pm_ops qcom_slim_dev_pm_ops = { static const struct of_device_id qcom_slim_dt_match[] = { { .compatible = "qcom,slim", }, - { .compatible = "qcom,apq8064-slim", }, {} }; From patchwork Fri Sep 23 15:57:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 608597 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 534B6C6FA82 for ; Fri, 23 Sep 2022 16:00:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 784743E8; Fri, 23 Sep 2022 17:59:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 784743E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663948798; bh=mCHXx38IstsDqAUs/xAPl6O4Pl7snAUXeESg7cqzA4I=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pHSOg8YSzMS9nfzH2wbgJuxyUMLarM2Fd72H3bIUb2Esgd+NzzlmrtzqPtHS7eFYj KHhBvJhouIjE0MpPCAuzkM5HF6LKzmOi3I38822ZfCen2PxRCEWgZJuuOpgQ1B453Z hl3arzBtovP3XJTjVssKMw+/3MaRAJ99WpHGilAo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 97719F80553; Fri, 23 Sep 2022 17:58:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CCB4AF8054A; Fri, 23 Sep 2022 17:58:02 +0200 (CEST) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7B87FF80224 for ; Fri, 23 Sep 2022 17:57:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7B87FF80224 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LUo2rWaB" Received: by mail-lj1-x22b.google.com with SMTP id h3so586823lja.1 for ; Fri, 23 Sep 2022 08:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=VC1ShBinIqlUH1hwjZ0lvI11uSYreZCKq6nMNs4Lha8=; b=LUo2rWaB9RNZIuVN22URCpGUShqbj1RtLH4LDikewtvOqTAqfJXZ01/q3OA4cQFe2r rmUX/Io+HB42E1wsgx5NxXzKex2A/vixXIowzZLEWZjHCRloK5+O9EUhyfIX+/vNZb53 lklZ7ezAUeV1hCBlHn6bRJlhOwCUNkLvsTB/O5c4RgPfhl9Y0upBqM2dhbvCDCtKrWzH GrDjXjpo6MnoBc6peM6sM28l5HVHBxTC4AwGz5i0xlIhVSIUOLfPgsr4IX3G6vgPqNG4 U0BMxk37eVSn9j23UnDYMTdJjDhYnda4EXC0jnndchsujS//ZjuMAJ8d4SEL0PH5BalV LqqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=VC1ShBinIqlUH1hwjZ0lvI11uSYreZCKq6nMNs4Lha8=; b=Fno8glCGiYUWndc8IMbupo9lWMxzwZk+ZcqqP8Nmqz9l5O8/v/JxCpn5dXryipi8Bv XSxRLxKclryWsL69wyKgyma78oZ/Lh6wfkRqw1odSCvVKM2dXCKSSXJTP723XwQoAPbM +2noekhNgiTKbdU12QWYOd3fXyqnNUitwZnecOu8ruJZYiuNbS/+Bb1A1KASFsuRmb1C 8iyazHGFi5FaftYyHAcZlAMi8RrA2iZRGP1BygKXgUPdy5ZTCsd6uUGANPIqQWuN7uy3 dPzzS1/xnFQQT1o3rrl4PCJ0y8dhhLWc7/m7IilNOue5QM1i3XDZWNc4rmiC5u5UX0Op BkwA== X-Gm-Message-State: ACrzQf2rOL1ED7hIXMO46ZtUgDNu9ZL00VPG1WEU7tU6OeCXykVdg70F D8+6DTs34F6cSu5d40gc5YPUag== X-Google-Smtp-Source: AMsMyM7NzE8WlaF6baserwi0wmCOiMlgLtJ9FQsC9L9lPmRslOyURxlpjODRw+Jo6rE4joL576SKYA== X-Received: by 2002:a2e:a9a9:0:b0:26c:6ec5:290 with SMTP id x41-20020a2ea9a9000000b0026c6ec50290mr2944124ljq.186.1663948669439; Fri, 23 Sep 2022 08:57:49 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id be17-20020a056512251100b0049a4862966fsm1502286lfb.146.2022.09.23.08.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:57:49 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname() Date: Fri, 23 Sep 2022 17:57:38 +0200 Message-Id: <20220923155740.422411-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> References: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Cc: Krzysztof Kozlowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Simplify the code with devm_platform_ioremap_resource_byname(). Signed-off-by: Krzysztof Kozlowski --- drivers/slimbus/qcom-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index bb106eab8ae2..400b7b385a44 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -488,7 +488,6 @@ static int qcom_slim_probe(struct platform_device *pdev) { struct qcom_slim_ctrl *ctrl; struct slim_controller *sctrl; - struct resource *slim_mem; int ret, ver; ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL); @@ -519,8 +518,7 @@ static int qcom_slim_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ctrl); dev_set_drvdata(ctrl->dev, ctrl); - slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl"); - ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem); + ctrl->base = devm_platform_ioremap_resource_byname(pdev, "ctrl"); if (IS_ERR(ctrl->base)) return PTR_ERR(ctrl->base); From patchwork Fri Sep 23 15:57:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 608598 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CEF9C6FA8B for ; Fri, 23 Sep 2022 15:59:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 77125826; Fri, 23 Sep 2022 17:58:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 77125826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663948765; bh=dWsPbHyRn1Kw68WQytw7fmieAtju/ZHKC2yycx7ntjw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=k/Yvtby99KCF8yx9rju3AHS4HXyIyepYlyCABuT3fAMHMOBsPUwY1e+s6Zdf3XbMo iODPPLUo6x1HDCkYg05GRjFEXF+2bYlv1NkeLKxGTJvAe9ZUXmboQNKLWqavmoPB6l VmXa/xCf4vD8CdJdM4a86WxCHu+64oENgsfNYWNQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7D3EAF80543; Fri, 23 Sep 2022 17:58:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 995A1F804AC; Fri, 23 Sep 2022 17:57:57 +0200 (CEST) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 52DF9F80269 for ; Fri, 23 Sep 2022 17:57:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52DF9F80269 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NxT9e5oC" Received: by mail-lj1-x232.google.com with SMTP id b24so553298ljk.6 for ; Fri, 23 Sep 2022 08:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=9pEICJNZ5nO4P1+qOCCLWpWUXxTuEVpFceB0baO81JE=; b=NxT9e5oCLYKT3a6UU77vYEEwrXRUDdJCwgbS+hOxcuLdlHIMlTMMxhSgdQnrZzyEly JHxvA7uR2vuZXCbjYsfLJ+AyHAJiFgQ1vFYG01HGsmhe/BN4RcBkH2iPXCgoN492oL+m ++JDv5Oy+UDcW3Ne7acj8VTsu7SavjAnbCTaZ1e/VREnOGufN1N9whgAGD87ZcOupuvF LVDjVzNcmPZ8TfenVaL/R3n7vmimEBiW7S070ZDPd8MdF9hddErFB14sjuNi2DsPa8os uIhn3RSCCCxjbwVQlx5094CsuZ8I77E5lmPFDmFyIdwsrXquoMGN4iLqfbZFhZppZpjc O00Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=9pEICJNZ5nO4P1+qOCCLWpWUXxTuEVpFceB0baO81JE=; b=76r4Rix+QyJlkBySFr4pAFSZmzqSSAxRTfE0R20d4GojCMha6J/UUFUhco0W80ndb8 20bEWXM75BL/Idzy/xV5lMhxZr0e1k9rafjTVWqar6Yh5Y9UKn7qFPL0rPq7AWhsriWu jgm/hLRshutbPVguTHbrv2N0kfZb3UI4fqBhJibq9tFXv+1VY/cbdPDHanLgjF19wZpW GXyMg5YQIgWYhHKQSuYyNXq5Onnh+39d5dsAeFZfgvcfKbuNmiouHD4fl1emwJ0xdtS+ cnJ5zMl72gKVD/Hhuf9sO3ZyjzQ5tAKSRji0K8hkFa4ryvxSL0oC0yDXRVqq1nVea9GC osvQ== X-Gm-Message-State: ACrzQf3nLzvocRWo8xLekVKsFWpymObyCP/n1VHKd/gn3P2TQecGGOeM fq9eJ0ysV5BjKLOj8zBi+x/s2Q== X-Google-Smtp-Source: AMsMyM5oOoFxS2EKXFonjqhk3x8OIxrbxXsljwIAKoZi/K/SCJqMWRX+2YH61wuqXvRvi2m8t9zeOg== X-Received: by 2002:a2e:b889:0:b0:26c:22e0:71aa with SMTP id r9-20020a2eb889000000b0026c22e071aamr3188671ljp.501.1663948670392; Fri, 23 Sep 2022 08:57:50 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id be17-20020a056512251100b0049a4862966fsm1502286lfb.146.2022.09.23.08.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:57:49 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource() Date: Fri, 23 Sep 2022 17:57:39 +0200 Message-Id: <20220923155740.422411-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> References: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Cc: Krzysztof Kozlowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Simplify the code with devm_platform_get_and_ioremap_resource(). Signed-off-by: Krzysztof Kozlowski --- drivers/slimbus/qcom-ngd-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index cec11aa106bf..548dd7661334 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1522,7 +1522,6 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct qcom_slim_ngd_ctrl *ctrl; - struct resource *res; int ret; struct pdr_service *pds; @@ -1532,8 +1531,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) dev_set_drvdata(dev, ctrl); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctrl->base = devm_ioremap_resource(dev, res); + ctrl->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(ctrl->base)) return PTR_ERR(ctrl->base); From patchwork Fri Sep 23 15:57:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 609154 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 403DFC6FA8B for ; Fri, 23 Sep 2022 15:59:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4D40E20C; Fri, 23 Sep 2022 17:58:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4D40E20C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663948779; bh=uMlxFBrBE+svxrBZO/C5NohXWLN9BPzCo4Rd4RJLgFw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Iq97D6RcZdRey7fowUO+bqtv96bL+JXEy5sBKezBByDojCqsd4fZQw0hHFycAbZgx iuiriAMXeWEKc8gwEk5IpPJHBIDyoWpjoHF5TPMIViyHcSmVy4CEFYWC0bpXc6HWNv 4bmLsmKToL4iXQa3Akpf6bn1cn4ZjmRp8EjyaYWs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 05083F80549; Fri, 23 Sep 2022 17:58:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 58940F80551; Fri, 23 Sep 2022 17:58:01 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 70338F80124 for ; Fri, 23 Sep 2022 17:57:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 70338F80124 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DSFhUhEI" Received: by mail-lf1-x136.google.com with SMTP id f9so994652lfr.3 for ; Fri, 23 Sep 2022 08:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=oMr0u4U4uB857JftbbkRJcLFLiEsse/bULU+XmmO99c=; b=DSFhUhEI5jIJ0l79fZ/RpiMJcCABCZt41//uZqQbhGP+SMHboZlWew64YaUL1Zt6N1 WROtxtQ0pjiBJrz3Wwk+Z4gL6aQmsyhW2wZg/WwUBlp0wdev6ge4JNVSnEcEPt68091w cZGTSk4LWL3RB3uOZXbgOKMNCpVqIEBTwkJzSXYfiUAfKN96zhSkqOh2/hbanYKv6qYI kM5t9xA10/DXsmypKJulAM6TKIfLSMN67PwQ/1h6RDXckeoIKj4WEA+fnzbArU+kBCh1 bQu6GcdEMfLxrIVD5Z1e3hxwW1meD2gZDnV8/5c3YFVQeKDDeWpq9kh4UORGoymDNHE3 mSeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=oMr0u4U4uB857JftbbkRJcLFLiEsse/bULU+XmmO99c=; b=uL1UsfwUtWzSQu4PDOExsBFY9fkn3VXmEB2fcgz7OWqy/gQlpLs0FvT7/bxihIg4Wt pT0RNwj8bFYXYNPaEHiHFivedSXNqaG1OECCS8BnNrZJ5ofYUV9EobO93363m0OYKzK0 YtRxhxKnQ5IWj7JsmA3Wuv7EDn2vpsO1AYOLM6SFmDxAKiehtVG6Meljvx0GuLMpvrcn zn0lCp8PXX6sjv1tGzSTlTS62gKFiblBThoLmTAXeWawvGCQ1KcTewWbwmDJ+GXHy+76 UADVsv+az4rf0HeSG1rLpgmdHpk3nAUaJjTPdeMAmCgK1VdkaSpdu8qavFEJXbQQnTKi O5WA== X-Gm-Message-State: ACrzQf1UjGQQMuinAdhlA9Yyn8Po363/k7xne3qBfz2ygwsIr0uLRi5y 7FM7YdPImaX/VAXk4hfiqTzCNA== X-Google-Smtp-Source: AMsMyM6SHmdPjbUQmqQLrTntDA+yJrodNrgqKTD0Yq6Gwj0hUWQkPwkCKVr0Q4Ko35CpEspD8KIpAw== X-Received: by 2002:a05:6512:1590:b0:49a:9db4:5a31 with SMTP id bp16-20020a056512159000b0049a9db45a31mr3367232lfb.667.1663948671660; Fri, 23 Sep 2022 08:57:51 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id be17-20020a056512251100b0049a4862966fsm1502286lfb.146.2022.09.23.08.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:57:50 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] slimbus: qcom-ngd-ctrl: reinit the reconf completion flag Date: Fri, 23 Sep 2022 17:57:40 +0200 Message-Id: <20220923155740.422411-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> References: <20220923155740.422411-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Cc: Krzysztof Kozlowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Reinitialize the reconf completion flag when ngd registers are not retainied or when enumeration is lost for ngd. Signed-off-by: Krzysztof Kozlowski --- drivers/slimbus/qcom-ngd-ctrl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 548dd7661334..e8ebfcd0655c 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1136,6 +1136,12 @@ static int qcom_slim_ngd_power_up(struct qcom_slim_ngd_ctrl *ctrl) return 0; } + /* + * Reinitialize only when registers are not retained or when enumeration + * is lost for ngd. + */ + reinit_completion(&ctrl->reconf); + writel_relaxed(DEF_NGD_INT_MASK, ngd->base + NGD_INT_EN); rx_msgq = readl_relaxed(ngd->base + NGD_RX_MSGQ_CFG);