From patchwork Mon Mar 20 14:50:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 72202 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1261672wrt; Mon, 20 Mar 2023 07:57:20 -0700 (PDT) X-Google-Smtp-Source: AK7set9N5SNykrrrGl725GwpGDYj+tjcwg3QDavH31upB89pZ/0X1sxZ/WzVJUORoOToVTN8ZKAi X-Received: by 2002:a05:6a20:bf1a:b0:d9:896b:8c0f with SMTP id gc26-20020a056a20bf1a00b000d9896b8c0fmr4428346pzb.24.1679324239722; Mon, 20 Mar 2023 07:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679324239; cv=none; d=google.com; s=arc-20160816; b=fHxL/Hs6t3hLzuC5vW4HwIvq6XsXePfIP0KjuwPVl3W37HZrjl8k1i9vmWdApcLX0J xDHngF87y9/lw22ouRq9GGW+TS+3nOGfOMz546tKw3ZQwBALhsXYgPbpBqQUYx/46iJx t+KRHqfI7g0a8oa+3TZDYRRX8qP6AWOO5axTk3m+yz7xoc6pBpSLqCJbeyYS3/cbZmdg a07+28Bu54QPw1aoZXjiPa4PObHoBGvEqXBh4kJntQ0071O2Omse2Pbg80LNk7msSCkl +Il2PEdoGvL8b+np67tfNggjClhvQtatGPEmk/Bekr5BUkIuuJzXWICG4K539dPu9MVs Rxaw== 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=pn9VGQBxO0VW8CThpup8iOfOpiJuYyrE48H21arWabA=; b=iFkdgAaP1oAwuDmjKfnNUdWI964KfRMMqQD3RHwttafm4kxGe+/11uQyEc2wiSjIb1 wYCv2plWWFglkZhTQlCkfPt9g6Q8QGGHrwax6Bz9aP+tnAADLpc+nuLPVqSdKXsOAsEq f/THlxH5g/J72q2EXBTGTDyH+7Cn+wqk4pp8OO81Ow1YBd5u3iX4BymLmKhrTkCWSC/Z y4JiAo5gnwkuH71sIHD4Uo0yvnRGPq3DygX0kNvB5Kegk+ayvyow1nqFdKSvUuuRN4BW 15JNAGLMmCRWeXkezDjuzO0Jv6aX7ME4qJ84n/hS9AegenerTqZShL12HOw5DwK38FWi ldBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PPOV3xzK; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020a63fb17000000b0050bf4d0379asi10475519pgh.450.2023.03.20.07.57.04; Mon, 20 Mar 2023 07:57:19 -0700 (PDT) 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=@linaro.org header.s=google header.b=PPOV3xzK; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231994AbjCTOwi (ORCPT + 99 others); Mon, 20 Mar 2023 10:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbjCTOwF (ORCPT ); Mon, 20 Mar 2023 10:52:05 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5666928D0E for ; Mon, 20 Mar 2023 07:50:32 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id d7so13273776qtr.12 for ; Mon, 20 Mar 2023 07:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679323827; 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=pn9VGQBxO0VW8CThpup8iOfOpiJuYyrE48H21arWabA=; b=PPOV3xzK+7nwJdGa5mz7vqiQRiXzw677QBbck0mYP/jr+bKo3tFkmHx/pPMW1Tyl18 IpKhhBXpD7UAFS3OafL5z/0LZQasbe/tivkm9pTXL5KPewQ1tdimFO0u+PY7c+DnfDsf C60nJQLuTSpqcWigH9ZrHKL21rIC+kszpNiaPBPwYOoDJWRXIRRtOPvdTCbulHcMcoIb sXiIeg4z2ibqGZN2F0ju4p5GtmvU1adwcjalaQDNpe+PQbDgXxQaEH4NlKDGB02MZM50 3bUhgWzE4pJN5VsP9bf5GmErm+GoU9Ac67hn6/J9iOHZv7E/rgPdz79mwRLYXBs4kZJ8 HvzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679323827; 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=pn9VGQBxO0VW8CThpup8iOfOpiJuYyrE48H21arWabA=; b=S9m0fROgrJ+oXPewfee9xiXLHCaL0OQIHNW8uELOgYgLYneyKvnC4i86mfKWGL+f2r YoevhvOm40nXzeX6HM/Y6qYrYMU887ZbFGAWHn8Y3X3He2sCgtZH23maUd1v+27Qr6rk 0lsPI5QV0N/0tvjICS5GCePFWDQwdolm/lOQNz3enD4/r9MZkXL8Ws0uf3EyVRbG4S+Z 710q7/6VqqNlcqs+bqIgBzkYFj8/MvFBbfdRCYE8xvZJcif6JMThKU+UBSElliwX5YCc e+o7Z/DaiPkFZFsyc3OYghjVFxHOKg3r65PtBX97i2VQujtWIL2fMrDZFZP/Zwkivn6y 5SEQ== X-Gm-Message-State: AO0yUKX0Lho094MDi1oC2SkUa1NFgr8SvayXjzi3DqyGklU+IqB9oU83 WcXNNVPXOgKpxCGTvgXuutjdhQ== X-Received: by 2002:a05:622a:15d0:b0:3b4:7efb:36a7 with SMTP id d16-20020a05622a15d000b003b47efb36a7mr19636317qty.27.1679323826323; Mon, 20 Mar 2023 07:50:26 -0700 (PDT) Received: from fedora.attlocal.net (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id o14-20020ac872ce000000b003e03178112dsm2661003qtp.13.2023.03.20.07.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 07:50:26 -0700 (PDT) From: William Breathitt Gray To: Mark Brown , Linus Walleij , Bartosz Golaszewski Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Andy Shevchenko , William Breathitt Gray Subject: [PATCH v3 1/2] gpio: 104-dio-48e: Implement struct dio48e_gpio Date: Mon, 20 Mar 2023 10:50:15 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1760899094145398040?= X-GMAIL-MSGID: =?utf-8?q?1760899094145398040?= A private data structure struct dio48e_gpio is introduced to facilitate passage of the regmap and IRQ mask state for the device to the callback dio48e_handle_mask_sync(). This is in preparation for the removal of the handle_mask_sync() map parameter in a subsequent patch. Signed-off-by: William Breathitt Gray Reviewed-by: Linus Walleij --- Changes in v3: - Inline dio48gpio->map usage in dio48e_handle_mask_sync() to avoid redefining map parameter drivers/gpio/gpio-104-dio-48e.c | 35 ++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104-dio-48e.c index 74e2721f2613..3516321c92b0 100644 --- a/drivers/gpio/gpio-104-dio-48e.c +++ b/drivers/gpio/gpio-104-dio-48e.c @@ -99,13 +99,23 @@ static const struct regmap_irq dio48e_regmap_irqs[] = { DIO48E_REGMAP_IRQ(0), DIO48E_REGMAP_IRQ(1), }; +/** + * struct dio48e_gpio - GPIO device private data structure + * @map: Regmap for the device + * @irq_mask: Current IRQ mask state on the device + */ +struct dio48e_gpio { + struct regmap *map; + unsigned int irq_mask; +}; + static int dio48e_handle_mask_sync(struct regmap *const map, const int index, const unsigned int mask_buf_def, const unsigned int mask_buf, void *const irq_drv_data) { - unsigned int *const irq_mask = irq_drv_data; - const unsigned int prev_mask = *irq_mask; + struct dio48e_gpio *const dio48egpio = irq_drv_data; + const unsigned int prev_mask = dio48egpio->irq_mask; int err; unsigned int val; @@ -114,19 +124,19 @@ static int dio48e_handle_mask_sync(struct regmap *const map, const int index, return 0; /* remember the current mask for the next mask sync */ - *irq_mask = mask_buf; + dio48egpio->irq_mask = mask_buf; /* if all previously masked, enable interrupts when unmasking */ if (prev_mask == mask_buf_def) { - err = regmap_write(map, DIO48E_CLEAR_INTERRUPT, 0x00); + err = regmap_write(dio48egpio->map, DIO48E_CLEAR_INTERRUPT, 0x00); if (err) return err; - return regmap_write(map, DIO48E_ENABLE_INTERRUPT, 0x00); + return regmap_write(dio48egpio->map, DIO48E_ENABLE_INTERRUPT, 0x00); } /* if all are currently masked, disable interrupts */ if (mask_buf == mask_buf_def) - return regmap_read(map, DIO48E_DISABLE_INTERRUPT, &val); + return regmap_read(dio48egpio->map, DIO48E_DISABLE_INTERRUPT, &val); return 0; } @@ -167,7 +177,7 @@ static int dio48e_probe(struct device *dev, unsigned int id) struct regmap *map; int err; struct regmap_irq_chip *chip; - unsigned int irq_mask; + struct dio48e_gpio *dio48egpio; struct regmap_irq_chip_data *chip_data; if (!devm_request_region(dev, base[id], DIO48E_EXTENT, name)) { @@ -185,12 +195,14 @@ static int dio48e_probe(struct device *dev, unsigned int id) return dev_err_probe(dev, PTR_ERR(map), "Unable to initialize register map\n"); - chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); - if (!chip) + dio48egpio = devm_kzalloc(dev, sizeof(*dio48egpio), GFP_KERNEL); + if (!dio48egpio) return -ENOMEM; - chip->irq_drv_data = devm_kzalloc(dev, sizeof(irq_mask), GFP_KERNEL); - if (!chip->irq_drv_data) + dio48egpio->map = map; + + chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); + if (!chip) return -ENOMEM; chip->name = name; @@ -205,6 +217,7 @@ static int dio48e_probe(struct device *dev, unsigned int id) chip->irqs = dio48e_regmap_irqs; chip->num_irqs = ARRAY_SIZE(dio48e_regmap_irqs); chip->handle_mask_sync = dio48e_handle_mask_sync; + chip->irq_drv_data = dio48egpio; /* Initialize to prevent spurious interrupts before we're ready */ err = dio48e_irq_init_hw(map); From patchwork Mon Mar 20 14:50:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 72201 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1261469wrt; Mon, 20 Mar 2023 07:56:52 -0700 (PDT) X-Google-Smtp-Source: AK7set+plzD7bPpnTehrGSj5n24RBgud/nwcvo8ifjLS7cMi3cCAZAYCn9GFKei9ce15A/ZbFepZ X-Received: by 2002:a17:902:ce81:b0:1a0:7602:589e with SMTP id f1-20020a170902ce8100b001a07602589emr22057560plg.40.1679324212086; Mon, 20 Mar 2023 07:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679324212; cv=none; d=google.com; s=arc-20160816; b=MgngkVTQwcxwi5vuYl7m/1B4iy3atuzGq3v+OaO1Q9c2MRHjQIj8WrB/qN0bl9s1XE GhIO0t8m/NfS7rDzcNIHnJ4h0XoUxeDeyzUDnDDWnCn66rbzy3JChH3y8u9VFw1NBIBn yHtMKdXyhMWgLKGCfTHBXdszuDgQUbkUNxyWhTtivM7KFgYLusxO118Bf1ALuGTpIcMV dTZhta2DAMmHpIqRCKnitRpq05PdVVoNVrvHtOSQge+OLEmjPTcm3DjDzRdaC3xdaLwc d2/pfr4rwKwwTt81on0kz+lqpnL+vCW2ErZyMEXgKqeZWsrj7j5taSmLcuRZryNHceto NSrw== 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=2ubabgTfuQRUHcQ6nKf64nxm8BOFtXJ8YmpeRNoMRoE=; b=mFPAQdm+fmx4BfB388TCs64yYAxeIGdarK3xDxPjiRe6qs4LyXzfwUlg2p7uJpi7oy E1zHlDlQde/4qJZvskd71JAonELcV1+/6M6REzZo5bEmECvI3uXbbHlcwlpEe3sDjNap gM5jON0OoPomoQacsR130svcOdNFL4Z2FutuLzdbGaNoRRUWrMq/G+FDuj9aisRDqZKp J7IpgewlzIjyStJADNhDnVQWEQkpbhV6NmXaIrzytXRjMmGpbPfBN6Gz54jx3D8/icMW cOJ5hFNF7SFDVpfwR123Mg4YdD80Mu8gvE5izRTKrXteLSY9n6DPReW99PHtOJH/gp07 QoKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VgzMDQtz; 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=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a170902ac8600b001a1a83b02a4si9804025plr.258.2023.03.20.07.56.37; Mon, 20 Mar 2023 07:56:52 -0700 (PDT) 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=@linaro.org header.s=google header.b=VgzMDQtz; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232053AbjCTOwl (ORCPT + 99 others); Mon, 20 Mar 2023 10:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231979AbjCTOwP (ORCPT ); Mon, 20 Mar 2023 10:52:15 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D3728E84 for ; Mon, 20 Mar 2023 07:50:33 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id c10so2094474qtj.10 for ; Mon, 20 Mar 2023 07:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679323828; 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=2ubabgTfuQRUHcQ6nKf64nxm8BOFtXJ8YmpeRNoMRoE=; b=VgzMDQtzc2uS93M5NqYUM9GW1/DSCkXn5WixLv5WihMtmetUYprltbDnXBQm4g76vJ JJw6O8YxEABBK0ksy6TriZYj+5onqsoNZYlcXamfnOf2nzh6GG8zMvj0SkxFt243/QkN m5YqZDjgG1kqvCZPpQbhgzpGX32BfqKuUAZnWF2Degt46aFo45W8FZFOuf/IED7HG1FG 4iY1kCEh8pc+cT3SbHT74+rmOOuyJtjJxtSU1fCP98zFpbr6ZheUp2rtVPvQot7SFFpZ VN2ArSINAz+oF5RqsIGJiOXnsNcfpTrDp8uHeWJHvq4z1/c86rl+MQZc2DxuDBnjFXI1 NvdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679323828; 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=2ubabgTfuQRUHcQ6nKf64nxm8BOFtXJ8YmpeRNoMRoE=; b=ev3Yj0q4ptYlTCB7sBj9hh26oL9iZ93CaZRgdJergYh5j9F6FSqyVxYO54OwGitTtQ hb2pvI+pN9s1vyxVofMhjIf48HHRY6DZsJBXLlwf8IkOdC3qAThh8UgfTqu5c9qHIcxT JuvsHMYPvQxMvtz7L2L6TheYl/twTMWzvhZ9hEtpZ2JnLv8d1wSIXW6lKe4+37PNt8wH bDWlRH/JFYfxnyf10HOd6noMy7DdcUJCK8QVylXRXad40i4XciiApgVnLhU6Y396EnUb z3pqy0aCeL8rrq496Vo4wcZwmUEmLBlf6/dFXxefGwdokcj/K/rIhxedMpdBhEzYhMUH nHyw== X-Gm-Message-State: AO0yUKXMJELYl0Q/gDwS+aWtAcBtbJIj00qxMKEidZaLzdqm0iI3KBwW uyYgAsxg8dCIKyyqLVxvDZm4NQ== X-Received: by 2002:ac8:5f86:0:b0:3d2:a927:21bc with SMTP id j6-20020ac85f86000000b003d2a92721bcmr25454885qta.18.1679323827850; Mon, 20 Mar 2023 07:50:27 -0700 (PDT) Received: from fedora.attlocal.net (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id o14-20020ac872ce000000b003e03178112dsm2661003qtp.13.2023.03.20.07.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 07:50:27 -0700 (PDT) From: William Breathitt Gray To: Mark Brown , Linus Walleij , Bartosz Golaszewski Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Andy Shevchenko , William Breathitt Gray Subject: [PATCH v3 2/2] regmap-irq: Drop map from handle_mask_sync() parameters Date: Mon, 20 Mar 2023 10:50:16 -0400 Message-Id: <1f44fb0fbcd3dccea3371215b00f1b9a956c1a12.1679323449.git.william.gray@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1760899065132279089?= X-GMAIL-MSGID: =?utf-8?q?1760899065132279089?= Remove the map parameter from the struct regmap_irq_chip callback handle_mask_sync() because it can be passed via the irq_drv_data parameter instead. The gpio-104-dio-48e driver is the only consumer of this callback and is thus updated accordingly. Reviewed-by: Linus Walleij Signed-off-by: William Breathitt Gray --- drivers/base/regmap/regmap-irq.c | 5 ++--- drivers/gpio/gpio-104-dio-48e.c | 2 +- include/linux/regmap.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 8c903b8c9714..a9337192ddd3 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -116,8 +116,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data) for (i = 0; i < d->chip->num_regs; i++) { if (d->mask_base) { if (d->chip->handle_mask_sync) - d->chip->handle_mask_sync(d->map, i, - d->mask_buf_def[i], + d->chip->handle_mask_sync(i, d->mask_buf_def[i], d->mask_buf[i], d->chip->irq_drv_data); else { @@ -915,7 +914,7 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode, if (d->mask_base) { if (chip->handle_mask_sync) { - ret = chip->handle_mask_sync(d->map, i, + ret = chip->handle_mask_sync(i, d->mask_buf_def[i], d->mask_buf[i], chip->irq_drv_data); diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104-dio-48e.c index 3516321c92b0..509864d36940 100644 --- a/drivers/gpio/gpio-104-dio-48e.c +++ b/drivers/gpio/gpio-104-dio-48e.c @@ -109,7 +109,7 @@ struct dio48e_gpio { unsigned int irq_mask; }; -static int dio48e_handle_mask_sync(struct regmap *const map, const int index, +static int dio48e_handle_mask_sync(const int index, const unsigned int mask_buf_def, const unsigned int mask_buf, void *const irq_drv_data) diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 4d10790adeb0..6e18d8b405b1 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -1644,8 +1644,7 @@ struct regmap_irq_chip { int (*handle_pre_irq)(void *irq_drv_data); int (*handle_post_irq)(void *irq_drv_data); - int (*handle_mask_sync)(struct regmap *map, int index, - unsigned int mask_buf_def, + int (*handle_mask_sync)(int index, unsigned int mask_buf_def, unsigned int mask_buf, void *irq_drv_data); int (*set_type_virt)(unsigned int **buf, unsigned int type, unsigned long hwirq, int reg);