]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Merge tag 'mfd-next-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Oct 2022 18:24:20 +0000 (11:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Oct 2022 18:24:20 +0000 (11:24 -0700)
Pull MFD updates from Lee Jones:
 "Core Frameworks:
   - Fix 'mfd_of_node_list' OF node entry resource leak

  New Drivers:
   - Add support for Ocelot VSC7512 Networking Chip
   - Add support for MediaTek MT6370 subPMIC
   - Add support for Richtek RT5120 (I2C) PMIC

  New Device Support:
   - Add support for Rockchip RV1126 and RK3588 to Syscon
   - Add support for Rockchip RK817 Battery Charger to RK808
   - Add support for Silergy SY7636a Voltage Regulator to Simple MFD
   - Add support for Qualcomm PMP8074 PMIC to QCOM SPMI
   - Add support for Secure Update to Intel M10 BMC

  New Functionality:
   - Provide SSP type to Intel's LPSS (PCI) SPI driver

  Fix-ups:
   - Remove legacy / unused code; stmpe, intel_soc_pmic_crc, syscon
   - Unify / simplify; intel_soc_pmic_crc
   - Trivial reordering / spelling, etc; Makefile, twl-core
   - Convert to managed resources; intel_soc_pmic_crc
   - Use appropriate APIs; intel_soc_pmic_crc
   - strscpy() conversion; htc-i2cpld, lpc_ich, mfd-core
   - GPIOD conversion; htc-i2cpld, stmpe
   - Add missing header file includes; twl4030-irq
   - DT goodies; stmpe, mediatek,mt6370, x-powers,axp152,
     aspeed,ast2x00-scu, mediatek,mt8195-scpsys, qcom,spmi-pmic, syscon,
     qcom,tcsr, rockchip,rk817, sprd,ums512-glbreg, dlg,da9063

  Bug Fixes:
   - Properly check return values; sm501, htc-i2cpld
   - Repair Two-Wire Bus Mode; da9062-core
   - Fix error handling; intel_soc_pmic_core, fsl-imx25-tsadc, lp8788,
     lp8788-irq"

* tag 'mfd-next-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (60 commits)
  mfd: syscon: Remove repetition of the regmap_get_val_endian()
  mfd: ocelot-spi: Add missing MODULE_DEVICE_TABLE
  power: supply: Add charger driver for Rockchip RK817
  dt-bindings: mfd: mt6370: Fix the indentation in the example
  mfd: da9061: Fix Failed to set Two-Wire Bus Mode.
  mfd: htc-i2cpld: Fix an IS_ERR() vs NULL bug in htcpld_core_probe()
  dt-bindings: mfd: qcom,tcsr: Drop simple-mfd from IPQ6018
  mfd: sm501: Add check for platform_driver_register()
  dt-bindings: mfd: mediatek: Add scpsys compatible for mt8186
  mfd: twl4030: Add missed linux/device.h header
  dt-bindings: mfd: dlg,da9063: Add missing regulator patterns
  dt-bindings: mfd: sprd: Add bindings for ums512 global registers
  mfd: intel_soc_pmic_chtdc_ti: Switch from __maybe_unused to pm_sleep_ptr() etc
  dt-bindings: mfd: syscon: Add rk3588 QoS register compatible
  mfd: stmpe: Switch to using gpiod API
  mfd: qcom-spmi-pmic: Add pm7250b compatible
  dt-bindings: mfd: Add missing (unevaluated|additional)Properties on child nodes
  mfd/omap1: htc-i2cpld: Convert to a pure GPIO driver
  mfd: intel-m10-bmc: Add d5005 bmc secure update driver
  dt-bindings: mfd: syscon: Drop ref from reg-io-width
  ...

1  2 
Documentation/devicetree/bindings/mfd/syscon.yaml
Documentation/devicetree/bindings/power/mediatek,power-controller.yaml
MAINTAINERS
drivers/hwmon/Kconfig
drivers/mfd/da9062-core.c
drivers/mfd/intel_soc_pmic_crc.c
drivers/mfd/lp8788.c
drivers/mfd/rk808.c
drivers/mfd/twl-core.c
drivers/regulator/Kconfig

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
index 5bb0367bd974f1a70cc0e51ee8dde95f683bbc86,40f14a0c0790f8992c31db7aae190c50bd32ff45..b1548a933dc3ee841e7dcb96c4c0363e8dedbd3c
@@@ -147,3 -163,116 +163,114 @@@ static const struct crystal_cove_confi
        .regmap_config = &crystal_cove_regmap_config,
        .irq_chip = &crystal_cove_irq_chip,
  };
 -static int crystal_cove_i2c_remove(struct i2c_client *i2c)
+ static int crystal_cove_i2c_probe(struct i2c_client *i2c)
+ {
+       const struct crystal_cove_config *config;
+       struct device *dev = &i2c->dev;
+       struct intel_soc_pmic *pmic;
+       int ret;
+       if (soc_intel_is_byt())
+               config = &crystal_cove_config_byt_crc;
+       else
+               config = &crystal_cove_config_cht_crc;
+       pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);
+       if (!pmic)
+               return -ENOMEM;
+       i2c_set_clientdata(i2c, pmic);
+       pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config);
+       if (IS_ERR(pmic->regmap))
+               return PTR_ERR(pmic->regmap);
+       pmic->irq = i2c->irq;
+       ret = devm_regmap_add_irq_chip(dev, pmic->regmap, pmic->irq,
+                                      config->irq_flags | IRQF_ONESHOT,
+                                      0, config->irq_chip, &pmic->irq_chip_data);
+       if (ret)
+               return ret;
+       ret = enable_irq_wake(pmic->irq);
+       if (ret)
+               dev_warn(dev, "Can't enable IRQ as wake source: %d\n", ret);
+       /* Add lookup table for crc-pwm */
+       pwm_add_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup));
+       /* To distuingish this domain from the GPIO/charger's irqchip domains */
+       irq_domain_update_bus_token(regmap_irq_get_domain(pmic->irq_chip_data),
+                                   DOMAIN_BUS_NEXUS);
+       ret = mfd_add_devices(dev, PLATFORM_DEVID_NONE, config->cell_dev,
+                             config->n_cell_devs, NULL, 0,
+                             regmap_irq_get_domain(pmic->irq_chip_data));
+       if (ret)
+               pwm_remove_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup));
+       return ret;
+ }
 -
 -      return 0;
++static void crystal_cove_i2c_remove(struct i2c_client *i2c)
+ {
+       /* remove crc-pwm lookup table */
+       pwm_remove_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup));
+       mfd_remove_devices(&i2c->dev);
+ }
+ static void crystal_cove_shutdown(struct i2c_client *i2c)
+ {
+       struct intel_soc_pmic *pmic = i2c_get_clientdata(i2c);
+       disable_irq(pmic->irq);
+       return;
+ }
+ static int crystal_cove_suspend(struct device *dev)
+ {
+       struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
+       disable_irq(pmic->irq);
+       return 0;
+ }
+ static int crystal_cove_resume(struct device *dev)
+ {
+       struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
+       enable_irq(pmic->irq);
+       return 0;
+ }
+ static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, crystal_cove_suspend, crystal_cove_resume);
+ static const struct acpi_device_id crystal_cove_acpi_match[] = {
+       { "INT33FD" },
+       { },
+ };
+ MODULE_DEVICE_TABLE(acpi, crystal_cove_acpi_match);
+ static struct i2c_driver crystal_cove_i2c_driver = {
+       .driver = {
+               .name = "crystal_cove_i2c",
+               .pm = pm_sleep_ptr(&crystal_cove_pm_ops),
+               .acpi_match_table = crystal_cove_acpi_match,
+       },
+       .probe_new = crystal_cove_i2c_probe,
+       .remove = crystal_cove_i2c_remove,
+       .shutdown = crystal_cove_shutdown,
+ };
+ module_i2c_driver(crystal_cove_i2c_driver);
+ MODULE_DESCRIPTION("I2C driver for Intel SoC PMIC");
+ MODULE_LICENSE("GPL v2");
+ MODULE_AUTHOR("Yang, Bin <bin.yang@intel.com>");
+ MODULE_AUTHOR("Zhu, Lejun <lejun.zhu@linux.intel.com>");
index e7c601bca9ef41fe5f6e66aa5d9f39b052b29b46,998e8cc408a0e9ff15aebe607a81ee30691a96bd..724a5712b36baa1ffda07a8e7a5d0e302f3f20df
@@@ -195,11 -195,19 +195,19 @@@ static int lp8788_probe(struct i2c_clie
        if (ret)
                return ret;
  
-       return mfd_add_devices(lp->dev, -1, lp8788_devs,
-                              ARRAY_SIZE(lp8788_devs), NULL, 0, NULL);
+       ret = mfd_add_devices(lp->dev, -1, lp8788_devs,
+                             ARRAY_SIZE(lp8788_devs), NULL, 0, NULL);
+       if (ret)
+               goto err_exit_irq;
+       return 0;
+ err_exit_irq:
+       lp8788_irq_exit(lp);
+       return ret;
  }
  
 -static int lp8788_remove(struct i2c_client *cl)
 +static void lp8788_remove(struct i2c_client *cl)
  {
        struct lp8788 *lp = i2c_get_clientdata(cl);
  
Simple merge
Simple merge
Simple merge