mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
regmap: Fixes for v5.0
The cleanups for the way we handle type information introduced during the merge window revealed that we'd been abusing the irq APIs for a long time, causing breakage for systems. This pull request has a couple of minimal fixes for that which restore the previous behaviour for the time being, we'll fix it properly for v5.1 but that'd be a bit much to do as a bug fix. -----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlxByIkTHGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0FErB/4/Od1iLnxAqb8dFmMFA/xbW8V/zmE3 8BLWUv8URhitdNPfdzWws+hD1AP5GfzoMyUiuP+BB6+x4JCBnL10vwAw7V0YYEox NrVB9ALYdu7cGPu809cVqIretGxW28T8PsJehcoHDvSYLXaaIr36tHApIbWlT3bn Sh166tTylLZG4bQ/KN0yEcNhyqqU6Lschp1CD7KSXux9jeMFxpQSCR9yJ2qhUbR4 igNayb4F8jCXU9R1WSD2pE3hTtsvTd/0i87HEzMq4jfSr3dck0dsW7tkewfe/MBl 1UM+6s46vqEl0u+9whJupDYvNr5ztF+wHnU85E6cX3gP442vk1sxnHaM =HTMs -----END PGP SIGNATURE----- Merge tag 'regmap-fix-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "The cleanups for the way we handle type information introduced during the merge window revealed that we'd been abusing the irq APIs for a long time, causing breakage for systems. This has a couple of minimal fixes for that which restore the previous behaviour for the time being, we'll fix it properly for v5.1 but that'd be a bit much to do as a bug fix" * tag 'regmap-fix-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: do not write mask register if mask_base is zero regmap: regmap-irq: silently ignore unsupported type settings
This commit is contained in:
commit
6e4673b42e
1 changed files with 7 additions and 1 deletions
|
@ -108,6 +108,9 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
|
||||||
* suppress pointless writes.
|
* suppress pointless writes.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < d->chip->num_regs; i++) {
|
for (i = 0; i < d->chip->num_regs; i++) {
|
||||||
|
if (!d->chip->mask_base)
|
||||||
|
continue;
|
||||||
|
|
||||||
reg = d->chip->mask_base +
|
reg = d->chip->mask_base +
|
||||||
(i * map->reg_stride * d->irq_reg_stride);
|
(i * map->reg_stride * d->irq_reg_stride);
|
||||||
if (d->chip->mask_invert) {
|
if (d->chip->mask_invert) {
|
||||||
|
@ -258,7 +261,7 @@ static int regmap_irq_set_type(struct irq_data *data, unsigned int type)
|
||||||
const struct regmap_irq_type *t = &irq_data->type;
|
const struct regmap_irq_type *t = &irq_data->type;
|
||||||
|
|
||||||
if ((t->types_supported & type) != type)
|
if ((t->types_supported & type) != type)
|
||||||
return -ENOTSUPP;
|
return 0;
|
||||||
|
|
||||||
reg = t->type_reg_offset / map->reg_stride;
|
reg = t->type_reg_offset / map->reg_stride;
|
||||||
|
|
||||||
|
@ -588,6 +591,9 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
|
||||||
/* Mask all the interrupts by default */
|
/* Mask all the interrupts by default */
|
||||||
for (i = 0; i < chip->num_regs; i++) {
|
for (i = 0; i < chip->num_regs; i++) {
|
||||||
d->mask_buf[i] = d->mask_buf_def[i];
|
d->mask_buf[i] = d->mask_buf_def[i];
|
||||||
|
if (!chip->mask_base)
|
||||||
|
continue;
|
||||||
|
|
||||||
reg = chip->mask_base +
|
reg = chip->mask_base +
|
||||||
(i * map->reg_stride * d->irq_reg_stride);
|
(i * map->reg_stride * d->irq_reg_stride);
|
||||||
if (chip->mask_invert)
|
if (chip->mask_invert)
|
||||||
|
|
Loading…
Reference in a new issue