From patchwork Sat Nov 12 15:18:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 19205 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1319392wru; Sat, 12 Nov 2022 07:28:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf5n01S4pKCRIVK09AEdiA0eG6mVwfutqv5FE6dJybYONeZmwHeRFNNRiyD9WqAisNCrkEz0 X-Received: by 2002:a17:90a:4d85:b0:212:8210:a61e with SMTP id m5-20020a17090a4d8500b002128210a61emr6676032pjh.135.1668266894645; Sat, 12 Nov 2022 07:28:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668266894; cv=none; d=google.com; s=arc-20160816; b=d5rcD1OSdcqa43sSJZHbWlkvee0KzBAGwMe6Hm3VI76V0Fl+iNe2GXNoN4pO+q+Ebn cccrKRL9Mii+kq5NCknlDYKreINw+ZGI/15IRuxG8Supys4jiaD/hM9akDNkHi+rYVRl ANI6I1gZgfI5RnTIDk0hS+FdhOxEaGSJoTj8s34Q9fPQdbXt/E2ozetLsSIYa4oxQ1Dr uXevZC0IIfOygufBG1b+pU8NxJfbztRrw0jdvK2LXwNd6wYSpkyyIZuC/kRqgaVb7W/R uz9gixGPZLnR06g+i1AIckB3hhNXq9ZNt9c43Rz2rE5ussy8gf/motE4XWVPbGjCSlYF louA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+keRvM59J/ih6ioqd6X30y/hoD2Rt/b5OT/Ve+w9Ocs=; b=cFiOvSQL4YRJlcAx8NdHC2dYSHKdUx5R6WLYHhEUkOrP2hg6qcoMdc8zgE3iinw3KQ WFhJwp7dRITpJH6Rw5Y/Iq9deDctd5g2IyvjcnvQALpzJ401KO6L76uk8plP1V9cvUzQ hKkxX09y8iRmo2em7ius4FEeo39LrkejF2m3RDuYgBT4Rv0tKx9Er4k3sNap1SVbUl24 DZ/Ye67RK1OdtZSEV0hkf0APjOnDkQcJIZrWKRBzKnt4dafJB0Z+JkNYuRm6xzkad0jU YoQxIU9jVX/RKgvRHpBE7YzL/34RpB+jRJ7VyfT9yAsHjTcWMSYNrGvkfZ2RZnoFvOk7 aVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hFKO8FAK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a17090aad4800b001fe280041e8si5006720pjv.37.2022.11.12.07.27.59; Sat, 12 Nov 2022 07:28:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hFKO8FAK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235016AbiKLPU6 (ORCPT + 99 others); Sat, 12 Nov 2022 10:20:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234995AbiKLPUK (ORCPT ); Sat, 12 Nov 2022 10:20:10 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD1111B1C3 for ; Sat, 12 Nov 2022 07:19:54 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id j15so10073273wrq.3 for ; Sat, 12 Nov 2022 07:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+keRvM59J/ih6ioqd6X30y/hoD2Rt/b5OT/Ve+w9Ocs=; b=hFKO8FAKU3bulnKjk44/RipPhrbZia1EvS3q77VHIMZXX94pRlhjD8m2VgQg8LnbD0 PSmqqxKmRJxAWW6JjHo28GpcMUj0b6rmkCMqsOwrvhM3cXfPPMNcWBuQGdY3DR6K7zpY Qv1x5OqWtRmwbdUdCN0bxGxM/JqD2s6x7Zr36+Bp2YRuF8YZRJwztWne3QcDZF7Ln+ac MCSFr4XuRsjoQVVAcZhdPOlQ0ctjQm6VbsLWxnO/0etWK253c1BKHFr2kQoZsJTM55G6 u4ZkL6dY4msSXtcjJHF9b2Ud8IjrtrseNPiJGF29la2C5WuWrlCUkdX9alqupBKWHE7N kVlw== 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:message-id:reply-to; bh=+keRvM59J/ih6ioqd6X30y/hoD2Rt/b5OT/Ve+w9Ocs=; b=j3rIhdbTHG7flA3zrdRjP+zjwIWWyQZhCINnuWnIERswjG4a+Bc4TXr+JyZb+tUSgc Ra4/8yZQKTuuGZnG4rFeB3P6vvRAK15NL9Yh7qtyBV/2z+DSg1UxR+07UGkp/VOboi4D 3/mdNCnOpcmCPOLM2lTw0mORi/A6kFhWUFjcSHB183F8GSvuRGHfdipOthP6kfGWTmkJ 1LAJgHTBxNcsRxe+v+5wwGZCRBBV7e4rEUS/n5vMXrLxSWDhoiPY0jjVy7fjsHmj8u3X /dC3OvlSBwIqoxSEboODIptJiY+STkhai9VkZqePbpWJ939w1LkVcZTMRT80dCKVzVh9 gmqA== X-Gm-Message-State: ANoB5pkdBPaBYKqZlgJSQiYV1lJLNPL3kjIeH+jc0vZeLUv4KtjPLmyI BH/NX317scz+mcYMhP0FlFU= X-Received: by 2002:a5d:46c9:0:b0:236:62e3:6202 with SMTP id g9-20020a5d46c9000000b0023662e36202mr3692588wrs.47.1668266393972; Sat, 12 Nov 2022 07:19:53 -0800 (PST) Received: from localhost (94.197.38.186.threembb.co.uk. [94.197.38.186]) by smtp.gmail.com with ESMTPSA id c17-20020a5d63d1000000b002322bff5b3bsm5504758wrw.54.2022.11.12.07.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 07:19:53 -0800 (PST) From: Aidan MacDonald To: lee@kernel.org Cc: mani@kernel.org, cristian.ciocaltea@gmail.com, wens@csie.org, tharvey@gateworks.com, cw00.choi@samsung.com, krzysztof.kozlowski@linaro.org, brgl@bgdev.pl, mazziesaccount@gmail.com, orsonzhai@gmail.com, baolin.wang@linux.alibaba.com, zhang.lyra@gmail.com, jernej.skrabec@gmail.com, samuel@sholland.org, linux-kernel@vger.kernel.org, linux-actions@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 18/18] mfd: wcd934x: Convert irq chip to config regs Date: Sat, 12 Nov 2022 15:18:35 +0000 Message-Id: <20221112151835.39059-19-aidanmacdonald.0x0@gmail.com> In-Reply-To: <20221112151835.39059-1-aidanmacdonald.0x0@gmail.com> References: <20221112151835.39059-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749304627096455285?= X-GMAIL-MSGID: =?utf-8?q?1749304627096455285?= Type registers are deprecated and will eventually be removed from regmap-irq. The same functionality can be replicated with config registers. Signed-off-by: Aidan MacDonald --- drivers/mfd/wcd934x.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/wcd934x.c b/drivers/mfd/wcd934x.c index 68e2fa2fda99..07e884087f2c 100644 --- a/drivers/mfd/wcd934x.c +++ b/drivers/mfd/wcd934x.c @@ -55,17 +55,22 @@ static const struct regmap_irq wcd934x_irqs[] = { WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_SOUNDWIRE, 2, BIT(4)), }; +static const unsigned int wcd934x_config_regs[] = { + WCD934X_INTR_LEVEL0, +}; + static const struct regmap_irq_chip wcd934x_regmap_irq_chip = { .name = "wcd934x_irq", .status_base = WCD934X_INTR_PIN1_STATUS0, .mask_base = WCD934X_INTR_PIN1_MASK0, .ack_base = WCD934X_INTR_PIN1_CLEAR0, - .type_base = WCD934X_INTR_LEVEL0, - .num_type_reg = 4, - .type_in_mask = false, .num_regs = 4, .irqs = wcd934x_irqs, .num_irqs = ARRAY_SIZE(wcd934x_irqs), + .config_base = wcd934x_config_regs, + .num_config_bases = ARRAY_SIZE(wcd934x_config_regs), + .num_config_regs = 4, + .set_type_config = regmap_irq_set_type_config_simple, }; static bool wcd934x_is_volatile_register(struct device *dev, unsigned int reg)