From: William Breathitt Gray <william.gray@linaro.org>
To: Mark Brown <broonie@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
William Breathitt Gray <william.gray@linaro.org>
Subject: [PATCH v3 2/2] regmap-irq: Drop map from handle_mask_sync() parameters
Date: Mon, 20 Mar 2023 10:50:16 -0400 [thread overview]
Message-ID: <1f44fb0fbcd3dccea3371215b00f1b9a956c1a12.1679323449.git.william.gray@linaro.org> (raw)
In-Reply-To: <cover.1679323449.git.william.gray@linaro.org>
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 <linus.walleij@linaro.org>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
---
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);
--
2.39.2
WARNING: multiple messages have this Message-ID
From: William Breathitt Gray <william.gray@linaro.org>
To: Mark Brown <broonie@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
William Breathitt Gray <william.gray@linaro.org>
Subject: [RESEND PATCH v3 2/2] regmap-irq: Drop map from handle_mask_sync() parameters
Date: Fri, 7 Apr 2023 07:47:33 -0400 [thread overview]
Message-ID: <1f44fb0fbcd3dccea3371215b00f1b9a956c1a12.1679323449.git.william.gray@linaro.org> (raw)
Message-ID: <20230407114733.jML3Q1qNKtdjqTGmJAD_o76JYYoppVosdnsF8uYInrk@z> (raw)
In-Reply-To: <cover.1679323449.git.william.gray@linaro.org>
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 <linus.walleij@linaro.org>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
---
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);
--
2.39.2
next prev parent reply other threads:[~2023-03-20 14:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 14:50 [PATCH v3 0/2] " William Breathitt Gray
2023-03-20 14:50 ` [PATCH v3 1/2] gpio: 104-dio-48e: Implement struct dio48e_gpio William Breathitt Gray
2023-04-07 11:47 ` [RESEND PATCH " William Breathitt Gray
2023-04-11 20:23 ` [PATCH " Mark Brown
2023-04-11 18:36 ` William Breathitt Gray
2023-04-11 21:15 ` Mark Brown
2023-04-11 21:35 ` William Breathitt Gray
2023-04-21 8:20 ` Linus Walleij
2023-03-20 14:50 ` William Breathitt Gray [this message]
2023-04-07 11:47 ` [RESEND PATCH v3 2/2] regmap-irq: Drop map from handle_mask_sync() parameters William Breathitt Gray
2023-03-20 15:32 ` [PATCH v3 0/2] " Andy Shevchenko
2023-03-22 16:55 ` Bartosz Golaszewski
2023-04-07 11:47 ` [RESEND PATCH " William Breathitt Gray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f44fb0fbcd3dccea3371215b00f1b9a956c1a12.1679323449.git.william.gray@linaro.org \
--to=william.gray@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®