diff options
author | Guru Das Srinagesh <gurus@codeaurora.org> | 2021-03-24 22:28:54 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-31 15:53:38 +0300 |
commit | 394409aafd017adfcffd075595cb01cc456a9327 (patch) | |
tree | 08cab3a0f76452b6e01c5091e24db3bea39f9e72 /drivers/base | |
parent | 4c5014456305482412b35a081ca0fb4fefd69764 (diff) | |
download | linux-394409aafd017adfcffd075595cb01cc456a9327.tar.xz |
regmap-irq: Add driver callback to configure virtual regs
Enable drivers to configure and modify "virtual" registers, which are
non-standard registers that further configure irq type on some devices.
Since they are non-standard, enable drivers to configure them according
to their particular idiosyncrasies by specifying an optional callback
function while registering with the framework.
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Link: https://lore.kernel.org/r/07e058cdec2297d15c95c825aa0263064d962d5a.1616613838.git.gurus@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index d1ade76a6c93..e6343ccc6aa1 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -333,6 +333,11 @@ static int regmap_irq_set_type(struct irq_data *data, unsigned int type) default: return -EINVAL; } + + if (d->chip->set_type_virt) + return d->chip->set_type_virt(d->virt_buf, type, data->hwirq, + reg); + return 0; } |