From patchwork Sat Sep 5 17:39:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11759539 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 BF2D792C for ; Sun, 6 Sep 2020 14:57:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 29D0A20714 for ; Sun, 6 Sep 2020 14:57:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="JC9dsVZd"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="PQI3pEBu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29D0A20714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 EC491183E; Sun, 6 Sep 2020 16:57:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EC491183E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599404272; bh=v/FDH+c2doE/6yujT3oE4Lns3BucZB9ANJaur8sLrKo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JC9dsVZdq+rseaVbSKzMi58jPDucteFG/njLyCeULWGWmEo7g6EYFPuJwRF+MeYKb Buq2pm4Qlwv3I60maBf7RmIznI0tymC99r00TvwA5Oe+WirLHH69q+YC49tV7x8DXp zV4iTZZ9ZmB5ipn+L7o60WZr8hdjwn8SSUFVBIp8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 67BA3F80272; Sun, 6 Sep 2020 16:56:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B98DBF8028A; Sat, 5 Sep 2020 19:40:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (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 A7019F800B4 for ; Sat, 5 Sep 2020 19:40:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A7019F800B4 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="PQI3pEBu" Received: by mail-qt1-x841.google.com with SMTP id p65so7205053qtd.2 for ; Sat, 05 Sep 2020 10:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0O2sDN9MRUJx80UJH/oPfzt4dGApmPFTm8Og0trLMlM=; b=PQI3pEBu3s9c3wGVmIuNH334mS4Xc4eJzP8j71PrrLcxVfR5EeZBMcR+Auusaw6/Ff 1Fw+D1h5tmrw410p9aWH+jF5Z6dnxjbIEeE8J+In0S47NcWyOr0vBighN1vBS3/I+N8t n9VYeGfCxt7F4CbUBDAUk9DlIoEz+kJfWhdIGY/EY2XPGAsDrKhZQlUhDEf/ez9cb9Z0 +hIc9YK3pnmY/ms0/Uo1h0c7mEiEpKJx0wPTUtky8whMSvqzRf3vJ0tXk2/adb+V0Xkl nyEaTca83iCgVUT5X2KZzNhHyEgCmexoxmyxXY5r6kPXh9lsiSd/W+eN1IAo++f2Wkiy iW9w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0O2sDN9MRUJx80UJH/oPfzt4dGApmPFTm8Og0trLMlM=; b=ATEl8oUCHCQR/U4SNr+yLOgRPgw3bfhgH9GJ8CGjd7tk+kS08nAReebPkq7EPzrMRx L82fyEps6HzXiqgDjIbW3Y4YdukdTurpAF5qrwaj68AdipC2Pj2VYrz2AagsrZDz4kPB 1inpEjgetJLMlIbRT0cdICoIIcbE1Xb21JpTLRaxgdcKH7o7dE8bjIvOzv6FNbiQTkPj VDqqCBCTsI3XA1BXN7YolI3jHnfe9ktzzfQoY93DS4hqT3CX/5eJ+Ip+7ZbIBBgb5nMr QEDpBFGi4HzFoAAK8Q+o+bO1FTI7e3q/Aor22qEykxw5vsk/9sYsd6VXjuYvw1eV1P3m KvLg== X-Gm-Message-State: AOAM5338XKjxlhfE9kMLU65EbJvfqHzavXURRDpj3MOrEZAIDIsxYzT/ op4703LfeYF79/CMBGFqyag3vGgb677DkhlJM+g= X-Google-Smtp-Source: ABdhPJxvu7IqOsyVda774F6SOjLfLez3tafKaihOLf6twPF1uFQYTPqcfzR9nDz531vmBmKxjwOt6w== X-Received: by 2002:aed:2d06:: with SMTP id h6mr14027558qtd.301.1599327605930; Sat, 05 Sep 2020 10:40:05 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id k22sm4612076qkk.13.2020.09.05.10.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 10:40:05 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Subject: [PATCH v2 1/4] soundwire: qcom: fix abh/ahb typo Date: Sat, 5 Sep 2020 13:39:02 -0400 Message-Id: <20200905173905.16541-2-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200905173905.16541-1-jonathan@marek.ca> References: <20200905173905.16541-1-jonathan@marek.ca> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 06 Sep 2020 16:56:12 +0200 Cc: "moderated list:SOUNDWIRE SUBSYSTEM" , open list , Pierre-Louis Bossart , Bjorn Andersson , Vinod Koul , Andy Gross , Srinivas Kandagatla , Sanyog Kale , Bard Liao 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" The function name qcom_swrm_abh_reg_read should say ahb, fix that. Signed-off-by: Jonathan Marek Reviewed-by: Srinivas Kandagatla --- drivers/soundwire/qcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 915c2cf0c274..d1e33ef1afac 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -114,7 +114,7 @@ struct qcom_swrm_ctrl { #define to_qcom_sdw(b) container_of(b, struct qcom_swrm_ctrl, bus) -static int qcom_swrm_abh_reg_read(struct qcom_swrm_ctrl *ctrl, int reg, +static int qcom_swrm_ahb_reg_read(struct qcom_swrm_ctrl *ctrl, int reg, u32 *val) { struct regmap *wcd_regmap = ctrl->regmap; @@ -754,7 +754,7 @@ static int qcom_swrm_probe(struct platform_device *pdev) return -ENOMEM; if (dev->parent->bus == &slimbus_bus) { - ctrl->reg_read = qcom_swrm_abh_reg_read; + ctrl->reg_read = qcom_swrm_ahb_reg_read; ctrl->reg_write = qcom_swrm_ahb_reg_write; ctrl->regmap = dev_get_regmap(dev->parent, NULL); if (!ctrl->regmap) From patchwork Sat Sep 5 17:39:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11759541 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 9F23B13B1 for ; Sun, 6 Sep 2020 14:58:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 64C8C20714 for ; Sun, 6 Sep 2020 14:58:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="hqSXFYEy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="jAX0shsQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64C8C20714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 C2BB8173A; Sun, 6 Sep 2020 16:57:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C2BB8173A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599404318; bh=MZ7OvjM2jwO2ZHxawypfTK89AHKp5wvRrFbnrLiysh8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hqSXFYEyOdUjJjs4KrmBVu4s59fi60mi08JiaSj98PcJpQryqJdniTXNtpi4Pw1QT YzfOLGGs/gfJ/uuzlu0SQhU0WHgClmRV+ibn4CaWYYmiXSoYpLuObszk56mLUugD3Z xmsU2qXC0BjS17D68/HSHZKi2g7pI2TT9/abldLo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 377C1F802C3; Sun, 6 Sep 2020 16:56:16 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9E2FDF8020D; Sat, 5 Sep 2020 19:40:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (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 C7EF7F800F0 for ; Sat, 5 Sep 2020 19:40:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C7EF7F800F0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="jAX0shsQ" Received: by mail-qt1-x844.google.com with SMTP id 92so7170535qtb.6 for ; Sat, 05 Sep 2020 10:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gCuchGSyeN1SA4c28kpGChZYxpEctYzHgQAHlgn61ZY=; b=jAX0shsQRBi8WwQiwWenimkMPM+JLgv8FYxLya1CKoQSuwc6jUwz9RwHz+pEnoIL2q 9kGXSYgaDZrH0Wkkx+Ufc79W0ByqnBlqByqTcz+KZARiExXjzW4FhNK6Zvm/EvjZLf6+ l2bti/wH7Uu64/ak9oJ288mcso3jkdCGH3b2IMyTPUj70J0LHTctw85xs82V0eiJRcKb E87tkV6eDeM/aTQOvzZ7+7SRkqIFqPX54w7qcAWsd44l+XyywcK48wgQh85prip1qOl0 1K4ztZFzkJEXPRPHwpGzLUi2LMS2z8O3nh+gaG+uO1YmkxYvnHC4CZAnLNd5kCxuEsYo I4Aw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=gCuchGSyeN1SA4c28kpGChZYxpEctYzHgQAHlgn61ZY=; b=ob0U6PrEyNQiEZ030psJNtRlm+RJC1AfuxE4uZNIFKTjRfqkJadYE8/Bgdl+Oz53Tp RqazceAFpLt+MWOc253EhQw6VKWvVt3VO5e+7nmoObngT8j1faIBQraQ1ITfR4yDNj9Z ZXgjDg25QmBXrOM6+7YqoU4ghUgyrX2fWg0HA97px5XgRbniwdb7QsOwtw2nrJzlasa5 BKVokcZXNFbPGkd1nDnQTvXKnNiVLnvqx++ernJnFOO/D4oVvXt/jMZuQO2fOoSGIFXm Uhp2DQwMR8YGs+NroKTJPTpBcbXs6IIFPsPfRSRb3dF8/jUtv7Eq2ZV2Uf3TQaAPlH7p fSbA== X-Gm-Message-State: AOAM5315Qi1lOUMjl+LUXdhkfYPbD7wiy/hxygZ4DeLK/w6p1SAkA/bD QnV/h7sD5XZfLOOfxRGyyfM19MOwrtS14WAzCwY= X-Google-Smtp-Source: ABdhPJwuhACwry7xvRE2wBQ9naoMrPAAX6O0+ahqxxrxKUd9wiHRK3QwKSBHcf43LGWu25mqzk01FA== X-Received: by 2002:ac8:4906:: with SMTP id e6mr7514712qtq.360.1599327607134; Sat, 05 Sep 2020 10:40:07 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id k22sm4612076qkk.13.2020.09.05.10.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 10:40:06 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Subject: [PATCH v2 2/4] soundwire: qcom: avoid dependency on CONFIG_SLIMBUS Date: Sat, 5 Sep 2020 13:39:03 -0400 Message-Id: <20200905173905.16541-3-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200905173905.16541-1-jonathan@marek.ca> References: <20200905173905.16541-1-jonathan@marek.ca> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 06 Sep 2020 16:56:12 +0200 Cc: "moderated list:SOUNDWIRE SUBSYSTEM" , open list , Pierre-Louis Bossart , Bjorn Andersson , Vinod Koul , Andy Gross , Sanyog Kale , Bard Liao 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" The driver may be used without slimbus, so don't depend on slimbus. Signed-off-by: Jonathan Marek --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/qcom.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig index fa2b4ab92ed9..f83d02c9c60a 100644 --- a/drivers/soundwire/Kconfig +++ b/drivers/soundwire/Kconfig @@ -33,7 +33,7 @@ config SOUNDWIRE_INTEL config SOUNDWIRE_QCOM tristate "Qualcomm SoundWire Master driver" - depends on SLIMBUS + imply SLIMBUS depends on SND_SOC help SoundWire Qualcomm Master driver. diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index d1e33ef1afac..6401ad451eee 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -753,7 +753,11 @@ static int qcom_swrm_probe(struct platform_device *pdev) if (!ctrl) return -ENOMEM; +#if IS_ENABLED(CONFIG_SLIBMUS) if (dev->parent->bus == &slimbus_bus) { +#else + if (false) { +#endif ctrl->reg_read = qcom_swrm_ahb_reg_read; ctrl->reg_write = qcom_swrm_ahb_reg_write; ctrl->regmap = dev_get_regmap(dev->parent, NULL); From patchwork Sat Sep 5 17:39:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11759543 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 EBB5792C for ; Sun, 6 Sep 2020 14:59:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 003B620714 for ; Sun, 6 Sep 2020 14:59:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rYt2ryTr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="blpD3fnj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 003B620714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 755631847; Sun, 6 Sep 2020 16:58:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 755631847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599404354; bh=jQbH0v81HdTlQFu0Sl71JVcVCjKdbTy8X1NnDW7bM8Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rYt2ryTrkSOWTUD3MYv2j62eYbtf+VO++GqlNax9uJswVreKTNFIBvQrXmE3Xz5k5 BCkOISm20ixjUz5paKQ2MQmRWmsaKSw6snhGYXQyObuB+SN98muS7eTPcZtabe9fqK 8wSpq3d7sdT/iAo51SodWakEk3TuTkkqBgM6n4YQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 115C6F802DC; Sun, 6 Sep 2020 16:56:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id F04F5F8025F; Sat, 5 Sep 2020 19:40:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (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 374EDF80217 for ; Sat, 5 Sep 2020 19:40:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 374EDF80217 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="blpD3fnj" Received: by mail-qv1-xf42.google.com with SMTP id j10so4636928qvk.11 for ; Sat, 05 Sep 2020 10:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=clxiZVTp9IbXkL/ODJWDej3rLeQuCQZfJj2JCOZ4XcQ=; b=blpD3fnjIVvM2UjG69yRj3YsVpySHlyRssil72WnBLEgXMyIIgE2fFoHiWmPNv5KfQ ZITYlMCVFWQEv1GdzHRxmoCEy/B0MTqX9yk68IsSNZqS75q6ClyWfS4otL6JK08bTcko XbSKbb7N3OC2PHCyYzV6wHXyNxG8XXzbON8uVjINd1sBlqg4qiqwfRX+Eg0t7FCNYqtb SeotVZ6KCCgexrPc6a1EFS3twfu3vAa+w/rz8OU9K82KJVXjQ4fDdMHIRx1sUinY0+OI IeVt0MK6rT6xu92SG7kzODJ4kWv4PfDuuHc6naWm1/eH40hkZK7LDFKi9om9i67vAmBk IkYQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=clxiZVTp9IbXkL/ODJWDej3rLeQuCQZfJj2JCOZ4XcQ=; b=pH+s98NelXeW/MPmK8cyk0WOMd1eQ8jXDvxWNP9OP4o62y+kqP95LHoz+iyuMUvfjX 8UYgnk7KJslMZgfTbbLpP0QvHlEKwsjXGpE+f08BZy72YSydZiAaczrxIU5apTnoNQyB IBIUl7iiYCWgNWK5YWlGP6CsbFaOeWG2zew62jJIuZm8QT8byQuEBM4ZL4s+WW/aO1UB ot04rcroi6FG1XXDen0VRJTqGMl1+YOWgB4gvxLsnvnjHWUCcOusUCL6Gx1mLwdhpoTo 1S96kIpgeFAHRUbPQNfuh92ye3qON9wmT2oe37ua3RJhoq8gadvGJ/+6i97im94HDJJ6 TCWg== X-Gm-Message-State: AOAM5320tInZPfeRqOlGm+Qh8d+WjqMkZMZh0kH7bm8i7ZSmaEWBorbl a+vSCKX3ueNLnpf33Z58lbXDsg== X-Google-Smtp-Source: ABdhPJzUx2oIqqILgTzU+sFcy14bKR7Lc4YYcEuNwCsXTBdV0KZMOPD0VXj9GSfNBWcaubjZI7bJtw== X-Received: by 2002:a0c:edaa:: with SMTP id h10mr12414932qvr.12.1599327608255; Sat, 05 Sep 2020 10:40:08 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id k22sm4612076qkk.13.2020.09.05.10.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 10:40:07 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Subject: [PATCH v2 3/4] soundwire: qcom: add support for mmio soundwire master devices Date: Sat, 5 Sep 2020 13:39:04 -0400 Message-Id: <20200905173905.16541-4-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200905173905.16541-1-jonathan@marek.ca> References: <20200905173905.16541-1-jonathan@marek.ca> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 06 Sep 2020 16:56:12 +0200 Cc: "moderated list:SOUNDWIRE SUBSYSTEM" , open list , Pierre-Louis Bossart , Bjorn Andersson , Vinod Koul , Andy Gross , Sanyog Kale , Bard Liao 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" Adds support for qcom soundwire devices with memory mapped IO registers. Signed-off-by: Jonathan Marek --- drivers/soundwire/qcom.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 6401ad451eee..ff28794868ca 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -34,6 +34,7 @@ #define SWRM_INTERRUPT_STATUS_SPECIAL_CMD_ID_FINISHED BIT(10) #define SWRM_INTERRUPT_MASK_ADDR 0x204 #define SWRM_INTERRUPT_CLEAR 0x208 +#define SWRM_INTERRUPT_CPU_EN 0x210 #define SWRM_CMD_FIFO_WR_CMD 0x300 #define SWRM_CMD_FIFO_RD_CMD 0x304 #define SWRM_CMD_FIFO_CMD 0x308 @@ -90,6 +91,7 @@ struct qcom_swrm_ctrl { struct sdw_bus bus; struct device *dev; struct regmap *regmap; + void __iomem *mmio; struct completion *comp; struct work_struct slave_work; /* read/write lock */ @@ -154,6 +156,20 @@ static int qcom_swrm_ahb_reg_write(struct qcom_swrm_ctrl *ctrl, return SDW_CMD_OK; } +static int qcom_swrm_cpu_reg_read(struct qcom_swrm_ctrl *ctrl, int reg, + u32 *val) +{ + *val = readl(ctrl->mmio + reg); + return SDW_CMD_OK; +} + +static int qcom_swrm_cpu_reg_write(struct qcom_swrm_ctrl *ctrl, int reg, + int val) +{ + writel(val, ctrl->mmio + reg); + return SDW_CMD_OK; +} + static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *ctrl, u8 cmd_data, u8 dev_addr, u16 reg_addr) { @@ -310,6 +326,12 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl) ctrl->reg_write(ctrl, SWRM_COMP_CFG_ADDR, SWRM_COMP_CFG_IRQ_LEVEL_OR_PULSE_MSK | SWRM_COMP_CFG_ENABLE_MSK); + + /* enable CPU IRQs */ + if (ctrl->mmio) { + ctrl->reg_write(ctrl, SWRM_INTERRUPT_CPU_EN, + SWRM_INTERRUPT_STATUS_RMSK); + } return 0; } @@ -764,8 +786,11 @@ static int qcom_swrm_probe(struct platform_device *pdev) if (!ctrl->regmap) return -EINVAL; } else { - /* Only WCD based SoundWire controller is supported */ - return -ENOTSUPP; + ctrl->reg_read = qcom_swrm_cpu_reg_read; + ctrl->reg_write = qcom_swrm_cpu_reg_write; + ctrl->mmio = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(ctrl->mmio)) + return PTR_ERR(ctrl->mmio); } ctrl->irq = of_irq_get(dev->of_node, 0); From patchwork Sat Sep 5 17:39:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 11759545 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 3951B15E4 for ; Sun, 6 Sep 2020 14:59:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 64AC020714 for ; Sun, 6 Sep 2020 14:59:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="slEnJskw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="PuHiboVv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64AC020714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 DD22E186C; Sun, 6 Sep 2020 16:58:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DD22E186C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599404373; bh=1HMiG1sAZtH3NqA99cbxYEoKhmf3G43H/4a34CA0wFg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=slEnJskwvA1g4KmNqr5VMj3xCTUXaDVSSEYG3/UOdIrtsTY4j6M7hs20jqzsE4a9V /+DO2hEDOoqKONZ7GgiPQJOBn5rrgqS3RKa4h/UarEMhkHkzFboxObj9ntzi7masrp HLdbRtyVToPRkfG79KSVSe+8vlpBgUJ9rpkG4gic= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 06ACEF802E0; Sun, 6 Sep 2020 16:56:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24F96F80217; Sat, 5 Sep 2020 19:40:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) (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 449A0F8021D for ; Sat, 5 Sep 2020 19:40:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 449A0F8021D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=marek-ca.20150623.gappssmtp.com header.i=@marek-ca.20150623.gappssmtp.com header.b="PuHiboVv" Received: by mail-qv1-xf42.google.com with SMTP id z18so1125620qvp.6 for ; Sat, 05 Sep 2020 10:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RD8l2fQQKOKDdGKnl9LX5y5DxoMGyqywKhbieLOAYr0=; b=PuHiboVvZl6Td+/ckTlRqbM9dwWXBWl4PN09T0xtiWJgefJnVhpJXu5vM3U0vAqw6H ZjrAAxYAEzRXxJW3vx2JJkznP/wiioILpGd9nSkKf55fGA9rUQQ7/OqWo3dBmT8yDT9I cmrWs4iNIE9Dlalqoa4IAnvnmSTHSE/Ea4gc5eeoBCmxN7H5wpekwjsXUcxkXE6h73V2 SlJrQ0F9LucPIBPU2rqpDUEU/vLDc41HHqaxAVE0SIdsGKpWpRbWUioJ3dgBm4Y/yDAC aBnOzrm54i4p7O4NM5WwpOq3/C25gbO9aHDCMlKatvwvdMC4lv4j3d0rnht9jvM5zB1X bh9w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=RD8l2fQQKOKDdGKnl9LX5y5DxoMGyqywKhbieLOAYr0=; b=bhOAeTaRzTLt0+Wvve5x1V5vVkwESygx/q8pua0faCiaHxU/pi/pAty0SVCnWOhCED J2w2LhMCuJ0wmZZ23x9W06SryxunDhL4KER3Nby75lkohc2gsT8x+HFNX2qO27R56uBo bITMEKPp26QSMgm/f8qHZIf6zjv11ZgSHDRUUq3E7sHG8I0e8vMINFYvRd/iTB06txq+ m9Oc+zyP9AT0mvXvo8+sVGkMxZDJboCerdpmTkBtoiKmuG1VTyM9swe2BND7/8N3EMyI SaNuXz7RmuED4AIJGHZR7BnDt11PguU4RyI1BJEeJiwykhrLsOAEGARzS0NpGCiEZ6wn qpfg== X-Gm-Message-State: AOAM531Vl5olI5MUqswd9wERqxQrrwz02OIMnBSjdjtxDpCXdQShA8i2 +j0Sk5Lqng/jyXYj4mT2yWcR2g== X-Google-Smtp-Source: ABdhPJyuTKQWKjzMrkVdkHqOR6fCSGGE/V7bCG1Lo7qkVruNXgOL6QgxAZm9hgFSj6oY52+0zPPJNA== X-Received: by 2002:a0c:9ac5:: with SMTP id k5mr13293584qvf.112.1599327609464; Sat, 05 Sep 2020 10:40:09 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id k22sm4612076qkk.13.2020.09.05.10.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 10:40:09 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Subject: [PATCH v2 4/4] soundwire: qcom: add v1.5.1 compatible Date: Sat, 5 Sep 2020 13:39:05 -0400 Message-Id: <20200905173905.16541-5-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200905173905.16541-1-jonathan@marek.ca> References: <20200905173905.16541-1-jonathan@marek.ca> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 06 Sep 2020 16:56:12 +0200 Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:SOUNDWIRE SUBSYSTEM" , open list , Pierre-Louis Bossart , Rob Herring , Bjorn Andersson , Vinod Koul , Andy Gross , Sanyog Kale , Bard Liao 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" Add a compatible string for HW version v1.5.1 on sm8250 SoCs. Signed-off-by: Jonathan Marek --- Documentation/devicetree/bindings/soundwire/qcom,sdw.txt | 1 + drivers/soundwire/qcom.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt index 436547f3b155..b104be131235 100644 --- a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt +++ b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt @@ -11,6 +11,7 @@ board specific bus parameters. Example: "qcom,soundwire-v1.3.0" "qcom,soundwire-v1.5.0" + "qcom,soundwire-v1.5.1" "qcom,soundwire-v1.6.0" - reg: Usage: required diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index ff28794868ca..41dda3b85413 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -888,6 +888,7 @@ static int qcom_swrm_remove(struct platform_device *pdev) static const struct of_device_id qcom_swrm_of_match[] = { { .compatible = "qcom,soundwire-v1.3.0", }, + { .compatible = "qcom,soundwire-v1.5.1", }, {/* sentinel */}, };