History

Merge tag 'regmap-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap updates from Mark Brown: "There are only two changes here: - fix for conflicting attributes on the rbtree node structure - implementation of main status register support in the interrupt code which supports chips that have a register to cut down on the number of per-interrupt status registers that need to be checked when handling interrupts" * tag 'regmap-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Remove attribute packed from struct 'regcache_rbtree_node' regmap: regmap-irq: Add main status register support

Linus Torvalds committed 7 years ago

Commit e48b0442 parents 42eaf18 66fb1813 files · +127 −5Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/regmap.h+31−0
@@ -1131,11 +1131,37 @@ struct regmap_irq { · 1130 unmodified lines
1131 .reg_offset = (_id) / (_reg_bits), \1131 .reg_offset = (_id) / (_reg_bits), \
1132 }1132 }
1133 1133
1134#define REGMAP_IRQ_MAIN_REG_OFFSET(arr) \
1135 { .num_regs = ARRAY_SIZE((arr)), .offset = &(arr)[0] }
1136
1137struct regmap_irq_sub_irq_map {
1138 unsigned int num_regs;
1139 unsigned int *offset;
1140};
1141
1134/**1142/**
1135 * struct regmap_irq_chip - Description of a generic regmap irq_chip.1143 * struct regmap_irq_chip - Description of a generic regmap irq_chip.
1136 *1144 *
1137 * @name: Descriptive name for IRQ controller.1145 * @name: Descriptive name for IRQ controller.
1138 *1146 *
1147 * @main_status: Base main status register address. For chips which have
1148 * interrupts arranged in separate sub-irq blocks with own IRQ
1149 * registers and which have a main IRQ registers indicating
1150 * sub-irq blocks with unhandled interrupts. For such chips fill
1151 * sub-irq register information in status_base, mask_base and
1152 * ack_base.
1153 * @num_main_status_bits: Should be given to chips where number of meaningfull
1154 * main status bits differs from num_regs.
1155 * @sub_reg_offsets: arrays of mappings from main register bits to sub irq
1156 * registers. First item in array describes the registers
1157 * for first main status bit. Second array for second bit etc.
1158 * Offset is given as sub register status offset to
1159 * status_base. Should contain num_regs arrays.
1160 * Can be provided for chips with more complex mapping than
1161 * 1.st bit to 1.st sub-reg, 2.nd bit to 2.nd sub-reg, ...
1162 * @num_main_regs: Number of 'main status' irq registers for chips which have
1163 * main_status set.
1164 *
1139 * @status_base: Base status register address.1165 * @status_base: Base status register address.
1140 * @mask_base: Base mask register address.1166 * @mask_base: Base mask register address.
1141 * @mask_writeonly: Base mask register is write only.1167 * @mask_writeonly: Base mask register is write only.
@@ -1181,6 +1207,11 @@ struct regmap_irq { · 39 unmodified lines
1181struct regmap_irq_chip {1207struct regmap_irq_chip {
1182 const char *name;1208 const char *name;
1183 1209
1210 unsigned int main_status;
1211 unsigned int num_main_status_bits;
1212 struct regmap_irq_sub_irq_map *sub_reg_offsets;
1213 int num_main_regs;
1214
1184 unsigned int status_base;1215 unsigned int status_base;
1185 unsigned int mask_base;1216 unsigned int mask_base;
1186 unsigned int unmask_base;1217 unsigned int unmask_base;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t