diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-07-05 12:10:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-07-05 12:10:34 -0700 |
commit | 463c09d09d426d4dfe1a83e1461e28d6b2d7f66a (patch) | |
tree | b1ee085006f743e2fcac4365286f26ebde05f54a /drivers/mfd/wcd934x.c | |
parent | 18ef082713ad1104c32cd17a15abdc3f43c9b28a (diff) | |
parent | 8a14ded5a8cb7d4146c12f984b5346bffde9b70f (diff) |
Merge tag 'mfd-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull mfd updates from Lee Jones:
"Core Frameworks:
- Fix Software Node clean-up code
New Drivers:
- Add support for MediaTek MT6359 PMIC
- Add support for Qualcomm PM8008 PMIC
- Add support for Richtek RT4831
New Device Support:
- Add support for Audio CODECs to Rockchip RK817
- Add support for Alder Lake-M to Intel LPSS PCI
- Add support for Periph Device Charge to ChromeOS EC
New Functionality:
- Provide additional IRQs for wcd934x
- Add optional Reset functionality to lp87565
Fix-ups:
- Namespacing & visibility fixes to lp87565
- Differentiate between Power and Home key IRQs in mt6358
- Export I2C device tables in da9052-i2c, stmpe-i2c
- Adapt IRQ flags in max8907, rn5t61, max8907
- Make some functions/devices optional in axp20x, cros_ec_dev
- Explicitly include used header files in ioc3
- Remove superfluous lines in MAINTAINERS, sec-core, st,stm32-timers
- Resolve Kerneldoc issues in omap-usb-host, omap-usb-tll, si476x-cmd, si476x-i2c
- Convert arizona-core to a module
- Copyright changes in hi655x-pmic
- Drop support for board file initialisation in sec-core
- Trivial spelling, whitespace etc updates in lp87565, si476x-cmd,
mt6360-core, wm831x-core, twl-core, db8500-prcmu
- Simplify various implementations of wcd934x, mt6360-core, max8997,
max8998, da9052-i2c, da9062-core, sec-core,
- Device Tree binding changes in google,cros-ec,
richtek,rt4831-backlight, db8500-prcmu, qcom,pm8008, qcom,spmi-pmic
- Use provided APIs to simplify t7l66xb, as3722, da9055-core,
tps80031, 88pm800, 88pm805, asic3, sun6i-prcm, wm831x-core,
wm831x-otp, ucb1x00-assabet, timberdale, sm501, pcf50633-core,
kempld-core, janz-cmodio, intel_soc_pmic_bxtwc, ab8500-core
Bug Fixes:
- Fix unused variable warning in rk817_codec
- Fix regulator voltage configuration in rohm-bd71828
- Fix ongoing freeing of regmap_config 'name' issue in syscon
- Fix error handling path in da9063-i2c
- Fix Kconfig issues in MFD_MP2629
- Fix DMA mask warnings in motorola-cpcap"
* tag 'mfd-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (83 commits)
mfd: cros_ec: Add peripheral device charger
mfd: max8907: Remove IRQF_NO_AUTOEN flag
mfd: ab8500-core: Use DEVICE_ATTR_RO/RW macro
mfd: intel_soc_pmic_bxtwc: Use DEVICE_ATTR_ADMIN_RW macro
mfd: janz-cmodio: Use DEVICE_ATTR_RO macro
mfd: kempld-core: Use DEVICE_ATTR_RO macro
mfd: pcf50633: Use DEVICE_ATTR_ADMIN_RO macro
mfd: sm501: Use DEVICE_ATTR_RO macro
mfd: timberdale: Use DEVICE_ATTR_RO macro
mfd: ucb1x00-assabet: Use DEVICE_ATTR_RO macro
mfd: wm831x: Use DEVICE_ATTR_RO macro
mfd: wm831x: Use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_IRQ() to simplify code
dt-bindings: mfd: stm32-timers: Remove #address/size cells from required properties
mfd: sun6i-prcm: Use DEFINE_RES_MEM() to simplify code
mfd: asic3: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
mfd: 88pm805: Use DEFINE_RES_IRQ_NAMED() to simplify code
mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code
mfd: tps80031: Use DEFINE_RES_IRQ() to simplify code
mfd: da9055: Use DEFINE_RES_IRQ_NAMED() to simplify code
mfd: as3722: Use DEFINE_RES_IRQ_NAMED() to simplify code
...
Diffstat (limited to 'drivers/mfd/wcd934x.c')
-rw-r--r-- | drivers/mfd/wcd934x.c | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/drivers/mfd/wcd934x.c b/drivers/mfd/wcd934x.c index c274d733b656..aa19a6a4fdbf 100644 --- a/drivers/mfd/wcd934x.c +++ b/drivers/mfd/wcd934x.c @@ -17,6 +17,21 @@ #include <linux/regulator/consumer.h> #include <linux/slimbus.h> +#define WCD934X_REGMAP_IRQ_REG(_irq, _off, _mask) \ + [_irq] = { \ + .reg_offset = (_off), \ + .mask = (_mask), \ + .type = { \ + .type_reg_offset = (_off), \ + .types_supported = IRQ_TYPE_EDGE_BOTH, \ + .type_reg_mask = (_mask), \ + .type_level_low_val = (_mask), \ + .type_level_high_val = (_mask), \ + .type_falling_val = 0, \ + .type_rising_val = 0, \ + }, \ + } + static const struct mfd_cell wcd934x_devices[] = { { .name = "wcd934x-codec", @@ -30,32 +45,15 @@ static const struct mfd_cell wcd934x_devices[] = { }; static const struct regmap_irq wcd934x_irqs[] = { - [WCD934X_IRQ_SLIMBUS] = { - .reg_offset = 0, - .mask = BIT(0), - .type = { - .type_reg_offset = 0, - .types_supported = IRQ_TYPE_EDGE_BOTH, - .type_reg_mask = BIT(0), - .type_level_low_val = BIT(0), - .type_level_high_val = BIT(0), - .type_falling_val = 0, - .type_rising_val = 0, - }, - }, - [WCD934X_IRQ_SOUNDWIRE] = { - .reg_offset = 2, - .mask = BIT(4), - .type = { - .type_reg_offset = 2, - .types_supported = IRQ_TYPE_EDGE_BOTH, - .type_reg_mask = BIT(4), - .type_level_low_val = BIT(4), - .type_level_high_val = BIT(4), - .type_falling_val = 0, - .type_rising_val = 0, - }, - }, + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_SLIMBUS, 0, BIT(0)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_HPH_PA_OCPL_FAULT, 0, BIT(2)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_HPH_PA_OCPR_FAULT, 0, BIT(3)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_MBHC_SW_DET, 1, BIT(0)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_MBHC_ELECT_INS_REM_DET, 1, BIT(1)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_MBHC_BUTTON_PRESS_DET, 1, BIT(2)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_MBHC_BUTTON_RELEASE_DET, 1, BIT(3)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_MBHC_ELECT_INS_REM_LEG_DET, 1, BIT(4)), + WCD934X_REGMAP_IRQ_REG(WCD934X_IRQ_SOUNDWIRE, 2, BIT(4)), }; static const struct regmap_irq_chip wcd934x_regmap_irq_chip = { |