regmap-irq: Place kernel doc of struct regmap_irq_chip in order
PATCH v2 1/1 regmap-irq: Place kernel doc of struct regmap_irq_chip in order
It seems that a couple of members got lost theirorder, put them back. Besides that, split field descriptions into groups in the same way as it's done in the structure definition.
---
v2: rebased on the latest Linux Next (Mark)
include/linux/regmap.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
include/linux/regmap.h +7 -4
@@ -1551,6 +1551,7 @@ struct regmap_irq_chip_data;* @use_ack: Use @ack register even if it is zero. * @ack_invert: Inverted ack register: cleared bits for ack. * @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts. +* @status_invert: Inverted status register: cleared bits are active interrupts. * @wake_invert: Inverted wake register: cleared bits are wake enabled. * @type_in_mask: Use the mask registers for controlling irq type. Use this if * the hardware provides separate bits for rising/falling edge
@@ -1560,18 +1561,19 @@ struct regmap_irq_chip_data;* @clear_on_unmask: For chips with interrupts cleared on read: read the status * registers before unmasking interrupts to clear any bits * set when they were masked. +* @runtime_pm: Hold a runtime PM lock on the device when accessing it. * @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. 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. * * @num_regs: Number of registers in each control bank. +* * @irqs: Descriptors for individual IRQs. Interrupt numbers are * assigned based on the index in the array of the interrupt. * @num_irqs: Number of descriptors. +* * @num_type_reg: Number of type registers. Deprecated, use config registers * instead. * @num_virt_regs: Number of non-standard irq configuration registers.
@@ -1579,6 +1581,7 @@ struct regmap_irq_chip_data;* instead. * @num_config_bases: Number of config base registers. * @num_config_regs: Number of config registers for each config base register. +* * @handle_pre_irq: Driver specific callback to handle interrupt from device * before regmap_irq_handler process the interrupts. * @handle_post_irq: Driver specific callback to handle interrupt from device
@@ -1625,12 +1628,12 @@ struct regmap_irq_chip { unsigned int use_ack:1; unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1; - unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;int num_regs;
Signature · 1 line
2.39.1
Quoted 1 line · Andy Shevchenko
It seems that a couple of members got lost theirorder, put them back.
Looks like a typographical error here: "theirorder".
Quoted 53 lines
Besides that, split field descriptions into groups in the same way as it's done in the structure definition.
Signed-off-by Andy Shevchenko <[email protected]>---
v2: rebased on the latest Linux Next (Mark)include/linux/regmap.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)include/linux/regmap.h +5
-2@@ -1551,6 +1551,7 @@ struct regmap_irq_chip_data;* @use_ack: Use @ack register even if it is zero. * @ack_invert: Inverted ack register: cleared bits for ack. * @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts. +* @status_invert: Inverted status register: cleared bits are active interrupts. * @wake_invert: Inverted wake register: cleared bits are wake enabled. * @type_in_mask: Use the mask registers for controlling irq type. Use this if * the hardware provides separate bits for rising/falling edge @@ -1560,18 +1561,19 @@ struct regmap_irq_chip_data;* @clear_on_unmask: For chips with interrupts cleared on read: read the status * registers before unmasking interrupts to clear any bits * set when they were masked. +* @runtime_pm: Hold a runtime PM lock on the device when accessing it. * @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. 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. * * @num_regs: Number of registers in each control bank. +* * @irqs: Descriptors for individual IRQs. Interrupt numbers are * assigned based on the index in the array of the interrupt. * @num_irqs: Number of descriptors. +* * @num_type_reg: Number of type registers. Deprecated, use config registers * instead. * @num_virt_regs: Number of non-standard irq configuration registers. @@ -1579,6 +1581,7 @@ struct regmap_irq_chip_data;* instead. * @num_config_bases: Number of config base registers. * @num_config_regs: Number of config registers for each config base register. +* * @handle_pre_irq: Driver specific callback to handle interrupt from device * before regmap_irq_handler process the interrupts. * @handle_post_irq: Driver specific callback to handle interrupt from device @@ -1625,12 +1628,12 @@ struct regmap_irq_chip { unsigned int use_ack:1;
include/linux/regmap.h struct regmap_irq_chip { · line 1633
Quoted 10 lines
include/linux/regmap.h +2
-2unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1; - unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;
These don't look alphabetical, so what is the order for these?
William Breathitt Gray
Quoted 6 lines
include/linux/regmap.h +0
-0int num_regs;Signature · 1 line
2.39.1
Quoted 4 lines · William Breathitt Gray
Quoted 1 line · Andy Shevchenko
It seems that a couple of members got lost theirorder, put them back.
Looks like a typographical error here: "theirorder".
Ah, thanks!
...
Quoted 5 lines
Quoted 5 lines
include/linux/regmap.h +1
-0unsigned int use_ack:1; unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1;
Quoted 8 lines
include/linux/regmap.h struct regmap_irq_chip { · line 1633
Quoted 6 lines
include/linux/regmap.h +1
-2- unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;These don't look alphabetical, so what is the order for these?
Nope, the order is to follow:
a) kernel doc
b) semantics of each of the groups
Do you think the order can be improved? Can you point out how?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 16 lines · Andy Shevchenko
Quoted 14 lines · William Breathitt Gray
include/linux/regmap.h struct regmap_irq_chip { · line 1633
Quoted 11 lines · Andy Shevchenko
include/linux/regmap.h +2
-2unsigned int use_ack:1; unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1; - unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;These don't look alphabetical, so what is the order for these?
Quoted 5 lines
Nope, the order is to follow:
a) kernel doc
b) semantics of each of the groupsDo you think the order can be improved? Can you point out how?
No, I don't have any particular improvement suggestions, I'm just want to understand the current order for when I introduce something new here (e.g. no_status). If I understand correctly, status_invert was moved up to be with the other "*_invert" flags, but why was runtime_pm moved to above not_fixed_stride rather than below it?
William Breathitt Gray
Quoted 21 lines · William Breathitt Gray
Quoted 20 lines · Andy Shevchenko
Quoted 14 lines · William Breathitt Gray
include/linux/regmap.h struct regmap_irq_chip { · line 1633
Quoted 11 lines · Andy Shevchenko
include/linux/regmap.h +2
-2unsigned int use_ack:1; unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1; - unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;These don't look alphabetical, so what is the order for these?
Nope, the order is to follow:
a) kernel doc
b) semantics of each of the groups
Quoted 6 lines
Quoted 1 line
Do you think the order can be improved? Can you point out how?
No, I don't have any particular improvement suggestions, I'm just want to understand the current order for when I introduce something new here (e.g.
no_status). If I understand correctly,status_invertwas moved up to be with the other "*_invert" flags,
As far as I read these there are IRQ related flags, and some others.
Quoted 2 lines
but why was
runtime_pmmoved
to abovenot_fixed_striderather than below it?
Do you think that not_fixed_stride belongs to "*mask" group?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 22 lines · Andy Shevchenko
Quoted 21 lines · William Breathitt Gray
Quoted 20 lines · Andy Shevchenko
Quoted 14 lines · William Breathitt Gray
include/linux/regmap.h struct regmap_irq_chip { · line 1633
Quoted 11 lines · Andy Shevchenko
include/linux/regmap.h +2
-2unsigned int use_ack:1; unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1; - unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;These don't look alphabetical, so what is the order for these?
Nope, the order is to follow:
a) kernel doc
b) semantics of each of the groups
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Do you think the order can be improved? Can you point out how?
No, I don't have any particular improvement suggestions, I'm just want to understand the current order for when I introduce something new here (e.g.
no_status). If I understand correctly,status_invertwas moved up to be with the other "*_invert" flags,As far as I read these there are IRQ related flags, and some others.
Okay, that makes sense to me too.
Quoted 4 lines
Quoted 2 lines
but why was
runtime_pmmoved
to abovenot_fixed_striderather than below it?Do you think that
not_fixed_stridebelongs to "*mask" group?
However, I don't think runtime_pm belongs to a "*mask" group either because it's a lock for power management if I'm not mistaken. So if we can move runtime_pm below not_fixed_stride then we can avoid the respective runtime_pm kernel doc line move which makes the diff for this patch slightly simpler.
William Breathitt Gray
Quoted 37 lines · William Breathitt Gray
Quoted 22 lines · Andy Shevchenko
Quoted 21 lines · William Breathitt Gray
Quoted 20 lines · Andy Shevchenko
Quoted 14 lines · William Breathitt Gray
include/linux/regmap.h struct regmap_irq_chip { · line 1633
Quoted 11 lines · Andy Shevchenko
include/linux/regmap.h +2
-2unsigned int use_ack:1; unsigned int ack_invert:1; unsigned int clear_ack:1; + unsigned int status_invert:1; unsigned int wake_invert:1; - unsigned int runtime_pm:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; + unsigned int runtime_pm:1; unsigned int not_fixed_stride:1; - unsigned int status_invert:1;These don't look alphabetical, so what is the order for these?
Nope, the order is to follow:
a) kernel doc
b) semantics of each of the groupsQuoted 8 lines
Quoted 6 lines
Quoted 1 line
Do you think the order can be improved? Can you point out how?
No, I don't have any particular improvement suggestions, I'm just want to understand the current order for when I introduce something new here (e.g.
no_status). If I understand correctly,status_invertwas moved up to be with the other "*_invert" flags,As far as I read these there are IRQ related flags, and some others.
Okay, that makes sense to me too.
Quoted 3 lines
Quoted 2 lines
but why was
runtime_pmmoved
to abovenot_fixed_striderather than below it?
Quoted 7 lines
Quoted 1 line
Do you think that
not_fixed_stridebelongs to "*mask" group?However, I don't think
runtime_pmbelongs to a "*mask" group either because it's a lock for power management if I'm not mistaken. So if we can moveruntime_pmbelownot_fixed_stridethen we can avoid the respectiveruntime_pmkernel doc line move which makes the diff for this patch slightly simpler.
Good point! I will address this in v3.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 5 lines · Andy Shevchenko
It seems that a couple of members got lost theirorder, put them back. Besides that, split field descriptions into groups in the same way as it's done in the structure definition.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next
Thanks!
[1/1] regmap-irq: Place kernel doc of struct regmap_irq_chip in order
commit: 9b400171a69d2487c3196cc3b6de60de3b08e1ee
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark