Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3550124rwb; Sat, 12 Nov 2022 07:46:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Fso5tc+DaBb71OcVaWZ40XzEhhc83YhWp9iiT+oVqnn0gecxZxGKvTsIiYLuJ0UNJMWYV X-Received: by 2002:a17:902:9f8f:b0:186:b889:dd6f with SMTP id g15-20020a1709029f8f00b00186b889dd6fmr7116477plq.97.1668267964310; Sat, 12 Nov 2022 07:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668267964; cv=none; d=google.com; s=arc-20160816; b=NFaqK+5SCicBCJFI2Dv0icQlEJDzumPJzzFbjEeQ66ZiOYbZwTUdfLuuM0Q1ZK2AoO fgkSVDzpy30SqIX5XvdGmNEud3x62X1ecqSQAkO4OuVupmTTZ4fdP4WCjv077Ot6r5o0 psZmrCP7rkDIFEhMRLwJUDGFy9/0OrwaZ5kwpqlFarEN20gqw8PN8Tv6QVXcK65CUMRp VefSIj58aB7c3f9jjdfXfkW+tP79hXmXkjlGllWIxTESgXTFNmCE6r+Ao9m0EyXnXgNv 4LrO+S0heoqsOyujsEdrbf+3gHqHSnv1bVEI9aQmr/fKtChVxhEdsIUgug2xIqJ8Qdvl tNKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:references:dkim-signature; bh=Lbz4g2YMYSuPD799i5WJED461h5UyiK8NmeMAuncHWI=; b=057alC9dD1TvE5gm8Q5jWR1TI7NZTyvqscOpOEOrTn5cLaVmemxy/Se/tFazqQFY3H Ie5hHLc2zXjW1w8hHi0godCbBEuarLpK9tFSkuN82OgO5HL2TcxQjo73PBeGJ+fhXPlq tII9N6L1O7c+agSMxWXPrTpaJhVdSkaTWM4ORBHmV2HV0E10Qm4b8zbvAKLVk8nOuuvm wCarSWBmMVWRAb5eMg4AP/DVoviEsz3DRd1EGcIOQB5n+Qb9Ikd/bTllLVmbO+XPdx3b D2sjj4nksD6fYj5zGrmyJ7DjR0apb6uDBlULDnBerErcVMtpG5+mpcv2NYc/kpkzWdxB 4+nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pLUuOI27; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd9-20020a056a00278900b0056e2b0193bdsi5735473pfb.141.2022.11.12.07.45.51; Sat, 12 Nov 2022 07:46:04 -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=pLUuOI27; 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 S235035AbiKLPcu (ORCPT + 90 others); Sat, 12 Nov 2022 10:32:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbiKLPcs (ORCPT ); Sat, 12 Nov 2022 10:32:48 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA061743A for ; Sat, 12 Nov 2022 07:32:48 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id t4so4540835wmj.5 for ; Sat, 12 Nov 2022 07:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :references:from:to:cc:subject:date:message-id:reply-to; bh=Lbz4g2YMYSuPD799i5WJED461h5UyiK8NmeMAuncHWI=; b=pLUuOI271qJDl6toNpbkD/sakufpMWz0Z1f6FUcNur+DNeXti+ouc0g2L8VvnDO8nQ uPgCPmENfqW+lVSkFzffR1WMnJkhDi3xx9CZlz+XVX3UyLX6IhimQ3tSyFK4q85V8vCM hpvfAT85kXOtJIJP49Dd87UrV33KnD3Q7AZkrJVmMAY+Gz5/vlbunaobuOv0PLbREMGj ABmR9C8h565egWw7Wn/X2J/QGfOn1yv1siwHC2xdn2Dif+8pNgPxiPCg8ohB2c4yu/8P uQZ7cw+hiDyOpvEob0yKHA/kfyZ7ntqsOp3zPQjpqYCQAcT+R19MEWtPqHY+U62ZyaSj D8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :references:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Lbz4g2YMYSuPD799i5WJED461h5UyiK8NmeMAuncHWI=; b=EGhOsde+MZO03vV8s+xLKlHBtxMHKsyCBfIThPNJhz6MkLST2roJ+jb2QC3DBSXMOe GpaLJ882HKouY6gP+auy4IhOW9ME62KidvEFV9JFcYjyfln34OGC2uvHANBtXydflVX5 mtCSIWkBoIVwSpvp8/Kk/W2p2StxgMgN2hwENl5fOKeVaNWlzJ7M3i0o2uBOe8WuCnat rgtUcl0fsr3JLuGWQ6JmLZVbdgwPLRODGPfXgJ5aSfl5y91v5kMwBwPslBl+bYIrVQEu Ez6Vd23bH+bz8KgBJLJ58ClhtkCkHuz7Ch97xOmh7VdZBda/Sxrj7X8j4m/6h1Q0SxyM UD7A== X-Gm-Message-State: ANoB5pkOmug1jZmEn4xPKiAWAoZ9qtAiNKAPxPSYkZ9/Yntb5zyeyEmc adSadWjMUwjQNO3eJxMXNBY= X-Received: by 2002:a05:600c:448a:b0:3cf:894b:fe6a with SMTP id e10-20020a05600c448a00b003cf894bfe6amr4213547wmo.198.1668267166645; Sat, 12 Nov 2022 07:32:46 -0800 (PST) Received: from localhost (94.197.38.186.threembb.co.uk. [94.197.38.186]) by smtp.gmail.com with ESMTPSA id r11-20020a5d694b000000b0023691d62cffsm4563556wrw.70.2022.11.12.07.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 07:32:46 -0800 (PST) References: <20221112151835.39059-1-aidanmacdonald.0x0@gmail.com> <20221112151835.39059-19-aidanmacdonald.0x0@gmail.com> 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: Re: [PATCH 18/18] mfd: wcd934x: Convert irq chip to config regs Date: Sat, 12 Nov 2022 15:31:14 +0000 In-reply-to: <20221112151835.39059-19-aidanmacdonald.0x0@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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 > 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(-) Forgot to include this here:-- One issue with WCD934x - after applying the patch, a bug in regmap-irq will cause a null pointer deref when setting the IRQ type, but a fix is already in the regmap tree. Link: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git/commit/?id=84498d1fb35de6ab71bdfdb6270a464fb4a0951b > 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)