From: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
To: broonie@kernel.org
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
andy.shevchenko@gmail.com, krzk@kernel.org,
m.szyprowski@samsung.com, mazziesaccount@gmail.com,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: [PATCH v3 12/12] regmap-irq: Deprecate the not_fixed_stride flag
Date: Sun, 3 Jul 2022 12:21:01 +0100 [thread overview]
Message-ID: <20220703112101.24493-13-aidanmacdonald.0x0@gmail.com> (raw)
In-Reply-To: <20220703112101.24493-1-aidanmacdonald.0x0@gmail.com>
This flag is a bit of a hack and the same thing can be accomplished
using a custom ->get_irq_reg() callback. Add a warning to catch any
use of the flag.
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
---
drivers/base/regmap/regmap-irq.c | 2 ++
include/linux/regmap.h | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index ec658755dd1b..4ef9488d05cd 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -739,6 +739,8 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
}
if (chip->not_fixed_stride) {
+ dev_warn(map->dev, "not_fixed_stride is deprecated; use ->get_irq_reg() instead");
+
for (i = 0; i < chip->num_regs; i++)
if (chip->sub_reg_offsets[i].num_regs != 1)
return -EINVAL;
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index ae5f1f7d4b5a..84ab1c32271f 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1493,8 +1493,10 @@ struct regmap_irq_chip_data;
* registers before unmasking interrupts to clear any bits
* set when they were masked.
* @not_fixed_stride: Used when chip peripherals are not laid out with fixed
- * stride. Must be used with sub_reg_offsets containing the
- * offsets to each peripheral.
+ * stride. Must be used with sub_reg_offsets containing the
+ * offsets to each peripheral. Deprecated; the same thing
+ * can be accomplished with a @get_irq_reg callback, without
+ * the need for a @sub_reg_offsets table.
* @status_invert: Inverted status register: cleared bits are active interrupts.
* @runtime_pm: Hold a runtime PM lock on the device when accessing it.
*
--
2.35.1
next prev parent reply other threads:[~2022-07-03 11:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-03 11:20 [PATCH v3 00/12] regmap-irq cleanups and refactoring Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 01/12] regmap-irq: Convert bool bitfields to unsigned int Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 02/12] regmap-irq: Remove unused type_reg_stride field Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 03/12] regmap-irq: Cleanup sizeof(...) use in memory allocation Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 04/12] regmap-irq: Remove an unnecessary restriction on type_in_mask Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 05/12] regmap-irq: Remove inappropriate uses of regmap_irq_update_bits() Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 06/12] regmap-irq: Remove mask_writeonly and regmap_irq_update_bits() Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 07/12] regmap-irq: Refactor checks for status bulk read support Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 08/12] regmap-irq: Introduce config registers for irq types Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 09/12] regmap-irq: Deprecate type registers and virtual registers Aidan MacDonald
2022-07-03 11:20 ` [PATCH v3 10/12] regmap-irq: Fix inverted handling of unmask registers Aidan MacDonald
2022-07-03 11:21 ` [PATCH v3 11/12] regmap-irq: Add get_irq_reg() callback Aidan MacDonald
2022-07-03 11:21 ` Aidan MacDonald [this message]
2022-07-03 14:27 ` [PATCH v3 00/12] regmap-irq cleanups and refactoring Andy Shevchenko
2022-07-04 10:34 ` Mark Brown
2022-07-04 10:58 ` Aidan MacDonald
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=20220703112101.24493-13-aidanmacdonald.0x0@gmail.com \
--to=aidanmacdonald.0x0@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mazziesaccount@gmail.com \
--cc=rafael@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®