From patchwork Thu Jul 21 10:25:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 12924962 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 E4E09C433EF for ; Thu, 21 Jul 2022 10:26:20 +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 BC50617AD; Thu, 21 Jul 2022 12:25:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BC50617AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658399178; bh=/v4JuBa2l55jmeFpnvtOTtVPoVHNXHtXEpINh/16zaI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FnzWCeiumLck3mh5e2QYKplpolyCTHT8tMhXBFcQr4wiEXzPWIxkCnArF1xe4YKjz tYl/VX6P9GfMUeP9dMndy/8TIgLSQrrnr3DZ3hWecvS3u5aKFNNayIb5fGUkoq8JN+ bL/uE3DIAo3RztwlE+kWBc6QKf8HX6EdUdo21Yy8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1B833F8016D; Thu, 21 Jul 2022 12:25:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 66320F8047C; Thu, 21 Jul 2022 12:24:59 +0200 (CEST) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 98CFCF80169 for ; Thu, 21 Jul 2022 12:24:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 98CFCF80169 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EM1Fkaou" Received: by mail-ed1-x536.google.com with SMTP id z22so1567713edd.6 for ; Thu, 21 Jul 2022 03:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dnjcUJZ0kP3zLVkI00AAytAat4+SP0QD4gn/D4v+BD0=; b=EM1FkaouTqByZK/MLu7Gh8P+yVBOtMGiUCl9XnlpiY9BYdL9D17dk4fgt7jHA689FC 8hVvNiHElxWiFBkrxZzxr9j9Ew6eqS1+dnIVwKz0ZfUMsxbTtRFLKO4oJJT9TRHHQFEd U8woqsMio5/pgULp2gqs1Fx+AdA1lIY/XpheRDCa6QoYQu3xSnTLtnGz8PV2o4hidVLK 15fQsJNR4BB9Xclu74BJfA6J3sUeLwss1SNkEbwhx5CxxC6nogpBzn0wJzt4leORq0lX 4/QL69AQXYk2QIDCZnxx37rnItIvp1T+jnQSFfgFc8if27fyjzxa/1pO/7jqjxsdjn6j vFaQ== 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=dnjcUJZ0kP3zLVkI00AAytAat4+SP0QD4gn/D4v+BD0=; b=uCGdvExFkw+gBXGIbl90jF6zTgZ491BoGKZw1bxp7YUTyyG1yAqmYRbTEuHIL/Xfw8 VnhyYB/pUbEZq8BQDuVMRiI16WdzUg0yWrNpSe+FE8brC9BGC1O9RsxkCosfuIAl0NFV RS3gs49tFn85zxPs2Se2jRSI5qmPHlu0A4IGsyPF824LGpIO0ibIw5vrKNj+PcGEMucd fXmk19mqrdvFH1YsXdkZBiiRPGFUbG95U4Tck/4Ku+1h8s/Sni2xzlHhmQ2OBP4cC9XJ c47rdpH5o+K/Xvqe4GcYsQbOHwRoPIfDfbwXl76TNDhgUU5z6+PCaBjYXWwzMJkFiROx r1zA== X-Gm-Message-State: AJIora+997Jo4q8sQCAulyX5Dkb8pv36CD96l5UNlqkNMTIX43e7qHgN kMC33gGg5pG0y3XQcynjgoU= X-Google-Smtp-Source: AGRyM1sjm77tFldslhTTtKG6r/nB5ftOMbBvPBn0I5SNviJAxfO6zmsuOVFu8GtH/lDpkb2LWoMdlg== X-Received: by 2002:a05:6402:11c9:b0:43b:b905:cb88 with SMTP id j9-20020a05640211c900b0043bb905cb88mr8429851edw.102.1658399092334; Thu, 21 Jul 2022 03:24:52 -0700 (PDT) Received: from localhost (92.40.202.7.threembb.co.uk. [92.40.202.7]) by smtp.gmail.com with ESMTPSA id b21-20020a17090630d500b0072aa1313f5csm652000ejb.201.2022.07.21.03.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 03:24:51 -0700 (PDT) From: Aidan MacDonald To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com Subject: [PATCH -next 1/2] sound: soc: codecs: wcd9335: Convert irq chip to config regs Date: Thu, 21 Jul 2022 11:25:57 +0100 Message-Id: <20220721102558.25457-2-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20220721102558.25457-1-aidanmacdonald.0x0@gmail.com> References: <20220721102558.25457-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" Type registers in regmap-irq have been deprecated in favor of config registers, which are more general. Chips using type_base can switch over to a single config base register and a standard ->set_irq_type() callback provided by regmap-irq, which uses the type info associated with each 'struct regmap_irq' to update type registers in the same way as the old code did. Signed-off-by: Aidan MacDonald --- sound/soc/codecs/wcd9335.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 3cb7a3eab8c7..81678c85ff7b 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -5031,16 +5031,22 @@ static const struct regmap_irq wcd9335_codec_irqs[] = { }, }; +static const unsigned int wcd9335_config_regs[] = { + WCD9335_INTR_LEVEL0, +}; + static const struct regmap_irq_chip wcd9335_regmap_irq1_chip = { .name = "wcd9335_pin1_irq", .status_base = WCD9335_INTR_PIN1_STATUS0, .mask_base = WCD9335_INTR_PIN1_MASK0, .ack_base = WCD9335_INTR_PIN1_CLEAR0, - .type_base = WCD9335_INTR_LEVEL0, - .num_type_reg = 4, .num_regs = 4, .irqs = wcd9335_codec_irqs, .num_irqs = ARRAY_SIZE(wcd9335_codec_irqs), + .config_base = wcd9335_config_regs, + .num_config_bases = ARRAY_SIZE(wcd9335_config_regs), + .num_config_regs = 4, + .set_type_config = regmap_irq_set_type_config_simple, }; static int wcd9335_parse_dt(struct wcd9335_codec *wcd) From patchwork Thu Jul 21 10:25:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 12924963 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 A5B98C433EF for ; Thu, 21 Jul 2022 10:26:43 +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 BC9EB1779; Thu, 21 Jul 2022 12:25:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BC9EB1779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658399201; bh=bz4CoGFADMH5B+74PxV09Hchvj2e4wkShPJ21OWaDhM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VzkDSlpaZfMds4OBJUfLrARgb1IR6rLZY1M/ffwRQESMdAqeC9fi7O/NbJc4vJIXw NSmtOp8YCOoSkE2U6wyMRAxAxvqCwI63u/3F9Rydcqjt0RljmJbnrP4j6sVbNNXS9P X6UzsJn9r2NqE1j4L93BDktuw+D6CgAOpm/bjAMc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3466CF80539; Thu, 21 Jul 2022 12:25:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64FBCF80528; Thu, 21 Jul 2022 12:25:01 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 508D8F80166 for ; Thu, 21 Jul 2022 12:24:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 508D8F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BXbAH2Qp" Received: by mail-ej1-x62d.google.com with SMTP id b11so2306645eju.10 for ; Thu, 21 Jul 2022 03:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DDlxv6f17NMMsNj65PpLbDHfFZ9n6R5iig5GSNIQc60=; b=BXbAH2QpOuEtDBsyknn63KMdYDqwYJ04QkYENBBBubvPKw5ufJQQ2RYWkh8TUehmAp eRg1pqewIA/nWrCKjZm9eUb5/F7/+M3SfQb3fG2M/j37/NW+H4x5xwUZB8pLViC0hPap mpJRkHmRolRjatLFK46JVrwFPwWbLIjnK/IPCnz962aIg/Ya09URDokHXSDpIDp++KMU IvdBpBpqCcplCkrF6gXYiY5M/0zk2Ofj6aGIuMQ3j/QygHzKx4yIlYJ5mdI9YATue7Lz mzIUg11Y/4YGn1/EkK5qinmyWQ1dBof6ytJgv5ZSspVQS1IpsGnFb75wrOwzRzVcwf/U M+9g== 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=DDlxv6f17NMMsNj65PpLbDHfFZ9n6R5iig5GSNIQc60=; b=BAQByTaov9aXMbdjidGjFYuEyVB5m5EOg3d9xYS+VuGl6GPUTswQS5CcjSLrnh9V15 gN0llGKhpr8knZAB7ZhQIEtaO6+beLc74NLZU4kprF/rfP4FH0C7I4hu58jXOHWZpPPa +Yy053XQEDk1THioJmvsNZ1lCsq9v83Nc/qTiMeHRGidEe1i/yJUJRkeNlQZObOiJt6R xCIBy2pI3qXfgeCUBw4OfPIgyMwuKL2bz+v48tomg//nGSZRc6JxT+CPiuajGtAZwLJW kUrpYk9US4XdfHrtgdWj15Lt8F2P+gWq+Ukcq1zHAfbQY/dA3XKY42AAsJPwJIm2sm3s cOow== X-Gm-Message-State: AJIora8T/OPPzPmXOvNqAA5VQ+lo7wKPJ7LjqQHLUyOVRahnyLuNPg0K eww2Syjymselwafnltivw40= X-Google-Smtp-Source: AGRyM1uT4hp2Itp4P40blzsKlm6eCx6+8avKdG3J/Wu5vQx5h0kQMV6Q9zWDGrdUxUc9Zz0qPjlN4g== X-Received: by 2002:a17:906:9c84:b0:6e0:7c75:6f01 with SMTP id fj4-20020a1709069c8400b006e07c756f01mr40510180ejc.103.1658399093753; Thu, 21 Jul 2022 03:24:53 -0700 (PDT) Received: from localhost (92.40.202.7.threembb.co.uk. [92.40.202.7]) by smtp.gmail.com with ESMTPSA id bv4-20020a170906b1c400b0072f0dbaf2f7sm653335ejb.214.2022.07.21.03.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 03:24:53 -0700 (PDT) From: Aidan MacDonald To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com Subject: [PATCH -next 2/2] sound: soc: codecs: wcd938x: Remove spurious type_base from irq chip Date: Thu, 21 Jul 2022 11:25:58 +0100 Message-Id: <20220721102558.25457-3-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20220721102558.25457-1-aidanmacdonald.0x0@gmail.com> References: <20220721102558.25457-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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" There is no reason to set type_base here: the chip doesn't set num_type_regs and none of the IRQs have type information so it's not possible for regmap-irq to configure IRQ types. Type registers are also deprecated in regmap-irq, so any IRQ type support in the future should be implemented using config registers instead. Signed-off-by: Aidan MacDonald --- sound/soc/codecs/wcd938x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index 781ae569be29..aca06a4026f3 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -1298,7 +1298,6 @@ static struct regmap_irq_chip wcd938x_regmap_irq_chip = { .num_regs = 3, .status_base = WCD938X_DIGITAL_INTR_STATUS_0, .mask_base = WCD938X_DIGITAL_INTR_MASK_0, - .type_base = WCD938X_DIGITAL_INTR_LEVEL_0, .ack_base = WCD938X_DIGITAL_INTR_CLEAR_0, .use_ack = 1, .runtime_pm = true,