]> Git Repo - J-linux.git/commitdiff
Merge tag 'mfd-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
authorLinus Torvalds <[email protected]>
Mon, 14 Jan 2019 18:24:36 +0000 (06:24 +1200)
committerLinus Torvalds <[email protected]>
Mon, 14 Jan 2019 18:24:36 +0000 (06:24 +1200)
Pull MFD updates from Lee Jones:
 "New Device Support
   - Add support for Power Supply to AXP813
   - Add support for GPIO, ADC, AC and Battery Power Supply to AXP803
   - Add support for UART to Exynos LPASS

  Fix-ups:
   - Use supplied MACROS; ti_am335x_tscadc
   - Trivial spelling/whitespace/alignment; tmio, axp20x, rave-sp
   - Regmap changes; bd9571mwv, wm5110-tables
   - Kconfig dependencies; MFD_AT91_USART
   - Supply shared data for child-devices; madera-core
   - Use new of_node_name_eq() API call; max77620, stmpe
   - Use managed resources (devm_*); tps65218
   - Comment descriptions; ingenic-tcu
   - Coding style; madera-core

  Bug Fixes:
   - Fix section mismatches; twl-core, db8500-prcmu
   - Correct error path related issues; mt6397-core, ab8500-core, mc13xxx-core
   - IRQ related fixes; tps6586x
   - Ensure proper initialisation sequence; qcom_rpm
   - Repair potential memory leak; cros_ec_dev"

* tag 'mfd-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (25 commits)
  mfd: exynos-lpass: Enable UART module support
  mfd: mc13xxx: Fix a missing check of a register-read failure
  mfd: cros_ec: Add commands to control codec
  mfd: madera: Remove spurious semicolon in while loop
  mfd: rave-sp: Fix typo in rave_sp_checksum comment
  mfd: ingenic-tcu: Fix bit field description in header
  mfd: tps65218: Use devm_regmap_add_irq_chip and clean up error path in probe()
  mfd: Use of_node_name_eq() for node name comparisons
  mfd: cros_ec_dev: Add missing mfd_remove_devices() call in remove
  mfd: axp20x: Add supported cells for AXP803
  mfd: axp20x: Re-align MFD cell entries
  mfd: axp20x: Add AC power supply cell for AXP813
  mfd: wm5110: Add missing ASRC rate register
  mfd: qcom_rpm: write fw_version to CTRL_REG
  mfd: tps6586x: Handle interrupts on suspend
  mfd: madera: Add shared data for accessory detection
  mfd: at91-usart: Add platform dependency
  mfd: bd9571mwv: Add volatile register to make DVFS work
  mfd: ab8500-core: Return zero in get_register_interruptible()
  mfd: tmio: Typo s/use use/use/
  ...

1  2 
drivers/mfd/axp20x.c
drivers/mfd/cros_ec_dev.c
include/linux/mfd/tmio.h

diff --combined drivers/mfd/axp20x.c
index e1450a56fc070c42c718843b406270d589a20715,f8e0fa97bb31e9ad097ea66039aa6d7cd37bd5a6..3c97f2c0fdfed37288d9e57744f3e97df2b2725d
   * published by the Free Software Foundation.
   */
  
 -#include <linux/err.h>
 +#include <linux/acpi.h>
 +#include <linux/bitops.h>
  #include <linux/delay.h>
 +#include <linux/err.h>
  #include <linux/interrupt.h>
  #include <linux/kernel.h>
 +#include <linux/mfd/axp20x.h>
 +#include <linux/mfd/core.h>
  #include <linux/module.h>
 +#include <linux/of_device.h>
  #include <linux/pm_runtime.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
 -#include <linux/mfd/axp20x.h>
 -#include <linux/mfd/core.h>
 -#include <linux/of_device.h>
 -#include <linux/acpi.h>
  
 -#define AXP20X_OFF    0x80
 +#define AXP20X_OFF    BIT(7)
  
  #define AXP806_REG_ADDR_EXT_ADDR_MASTER_MODE  0
  #define AXP806_REG_ADDR_EXT_ADDR_SLAVE_MODE   BIT(4)
@@@ -641,9 -640,9 +641,9 @@@ static const struct mfd_cell axp221_cel
  
  static const struct mfd_cell axp223_cells[] = {
        {
-               .name                   = "axp221-pek",
-               .num_resources          = ARRAY_SIZE(axp22x_pek_resources),
-               .resources              = axp22x_pek_resources,
+               .name           = "axp221-pek",
+               .num_resources  = ARRAY_SIZE(axp22x_pek_resources),
+               .resources      = axp22x_pek_resources,
        }, {
                .name           = "axp22x-adc",
                .of_compatible  = "x-powers,axp221-adc",
                .name           = "axp20x-battery-power-supply",
                .of_compatible  = "x-powers,axp221-battery-power-supply",
        }, {
-               .name                   = "axp20x-regulator",
+               .name           = "axp20x-regulator",
        }, {
                .name           = "axp20x-ac-power-supply",
                .of_compatible  = "x-powers,axp221-ac-power-supply",
  
  static const struct mfd_cell axp152_cells[] = {
        {
-               .name                   = "axp20x-pek",
-               .num_resources          = ARRAY_SIZE(axp152_pek_resources),
-               .resources              = axp152_pek_resources,
+               .name           = "axp20x-pek",
+               .num_resources  = ARRAY_SIZE(axp152_pek_resources),
+               .resources      = axp152_pek_resources,
        },
  };
  
@@@ -698,87 -697,101 +698,101 @@@ static const struct resource axp288_cha
  
  static const struct mfd_cell axp288_cells[] = {
        {
-               .name = "axp288_adc",
-               .num_resources = ARRAY_SIZE(axp288_adc_resources),
-               .resources = axp288_adc_resources,
-       },
-       {
-               .name = "axp288_extcon",
-               .num_resources = ARRAY_SIZE(axp288_extcon_resources),
-               .resources = axp288_extcon_resources,
-       },
-       {
-               .name = "axp288_charger",
-               .num_resources = ARRAY_SIZE(axp288_charger_resources),
-               .resources = axp288_charger_resources,
-       },
-       {
-               .name = "axp288_fuel_gauge",
-               .num_resources = ARRAY_SIZE(axp288_fuel_gauge_resources),
-               .resources = axp288_fuel_gauge_resources,
-       },
-       {
-               .name = "axp221-pek",
-               .num_resources = ARRAY_SIZE(axp288_power_button_resources),
-               .resources = axp288_power_button_resources,
-       },
-       {
-               .name = "axp288_pmic_acpi",
+               .name           = "axp288_adc",
+               .num_resources  = ARRAY_SIZE(axp288_adc_resources),
+               .resources      = axp288_adc_resources,
+       }, {
+               .name           = "axp288_extcon",
+               .num_resources  = ARRAY_SIZE(axp288_extcon_resources),
+               .resources      = axp288_extcon_resources,
+       }, {
+               .name           = "axp288_charger",
+               .num_resources  = ARRAY_SIZE(axp288_charger_resources),
+               .resources      = axp288_charger_resources,
+       }, {
+               .name           = "axp288_fuel_gauge",
+               .num_resources  = ARRAY_SIZE(axp288_fuel_gauge_resources),
+               .resources      = axp288_fuel_gauge_resources,
+       }, {
+               .name           = "axp221-pek",
+               .num_resources  = ARRAY_SIZE(axp288_power_button_resources),
+               .resources      = axp288_power_button_resources,
+       }, {
+               .name           = "axp288_pmic_acpi",
        },
  };
  
  static const struct mfd_cell axp803_cells[] = {
        {
-               .name                   = "axp221-pek",
-               .num_resources          = ARRAY_SIZE(axp803_pek_resources),
-               .resources              = axp803_pek_resources,
+               .name           = "axp221-pek",
+               .num_resources  = ARRAY_SIZE(axp803_pek_resources),
+               .resources      = axp803_pek_resources,
+       }, {
+               .name           = "axp20x-gpio",
+               .of_compatible  = "x-powers,axp813-gpio",
+       }, {
+               .name           = "axp813-adc",
+               .of_compatible  = "x-powers,axp813-adc",
+       }, {
+               .name           = "axp20x-battery-power-supply",
+               .of_compatible  = "x-powers,axp813-battery-power-supply",
+       }, {
+               .name           = "axp20x-ac-power-supply",
+               .of_compatible  = "x-powers,axp813-ac-power-supply",
+               .num_resources  = ARRAY_SIZE(axp20x_ac_power_supply_resources),
+               .resources      = axp20x_ac_power_supply_resources,
        },
-       {       .name                   = "axp20x-regulator" },
+       {       .name           = "axp20x-regulator" },
  };
  
  static const struct mfd_cell axp806_self_working_cells[] = {
        {
-               .name                   = "axp221-pek",
-               .num_resources          = ARRAY_SIZE(axp806_pek_resources),
-               .resources              = axp806_pek_resources,
+               .name           = "axp221-pek",
+               .num_resources  = ARRAY_SIZE(axp806_pek_resources),
+               .resources      = axp806_pek_resources,
        },
-       {       .name                   = "axp20x-regulator" },
+       {       .name           = "axp20x-regulator" },
  };
  
  static const struct mfd_cell axp806_cells[] = {
        {
-               .id                     = 2,
-               .name                   = "axp20x-regulator",
+               .id             = 2,
+               .name           = "axp20x-regulator",
        },
  };
  
  static const struct mfd_cell axp809_cells[] = {
        {
-               .name                   = "axp221-pek",
-               .num_resources          = ARRAY_SIZE(axp809_pek_resources),
-               .resources              = axp809_pek_resources,
+               .name           = "axp221-pek",
+               .num_resources  = ARRAY_SIZE(axp809_pek_resources),
+               .resources      = axp809_pek_resources,
        }, {
-               .id                     = 1,
-               .name                   = "axp20x-regulator",
+               .id             = 1,
+               .name           = "axp20x-regulator",
        },
  };
  
  static const struct mfd_cell axp813_cells[] = {
        {
-               .name                   = "axp221-pek",
-               .num_resources          = ARRAY_SIZE(axp803_pek_resources),
-               .resources              = axp803_pek_resources,
+               .name           = "axp221-pek",
+               .num_resources  = ARRAY_SIZE(axp803_pek_resources),
+               .resources      = axp803_pek_resources,
        }, {
-               .name                   = "axp20x-regulator",
+               .name           = "axp20x-regulator",
        }, {
-               .name                   = "axp20x-gpio",
-               .of_compatible          = "x-powers,axp813-gpio",
+               .name           = "axp20x-gpio",
+               .of_compatible  = "x-powers,axp813-gpio",
        }, {
-               .name                   = "axp813-adc",
-               .of_compatible          = "x-powers,axp813-adc",
+               .name           = "axp813-adc",
+               .of_compatible  = "x-powers,axp813-adc",
        }, {
                .name           = "axp20x-battery-power-supply",
                .of_compatible  = "x-powers,axp813-battery-power-supply",
+       }, {
+               .name           = "axp20x-ac-power-supply",
+               .of_compatible  = "x-powers,axp813-ac-power-supply",
+               .num_resources  = ARRAY_SIZE(axp20x_ac_power_supply_resources),
+               .resources      = axp20x_ac_power_supply_resources,
        },
  };
  
index b99a194ce5a4a2926d8eda42e610c64ab34c5edb,ff788d3e6d5f32e83415fe6f77865a24b74e9f31..2d0fee488c5aa85ad9fa906f6decdbc68dd54ee0
@@@ -263,11 -263,6 +263,11 @@@ static const struct file_operations fop
  #endif
  };
  
 +static void cros_ec_class_release(struct device *dev)
 +{
 +      kfree(to_cros_ec_dev(dev));
 +}
 +
  static void cros_ec_sensors_register(struct cros_ec_dev *ec)
  {
        /*
@@@ -400,7 -395,7 +400,7 @@@ static int ec_device_probe(struct platf
        int retval = -ENOMEM;
        struct device *dev = &pdev->dev;
        struct cros_ec_platform *ec_platform = dev_get_platdata(dev);
 -      struct cros_ec_dev *ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL);
 +      struct cros_ec_dev *ec = kzalloc(sizeof(*ec), GFP_KERNEL);
  
        if (!ec)
                return retval;
        ec->class_dev.devt = MKDEV(ec_major, pdev->id);
        ec->class_dev.class = &cros_class;
        ec->class_dev.parent = dev;
 +      ec->class_dev.release = cros_ec_class_release;
  
        retval = dev_set_name(&ec->class_dev, "%s", ec_platform->ec_name);
        if (retval) {
@@@ -499,6 -493,7 +499,7 @@@ static int ec_device_remove(struct plat
  
        cros_ec_debugfs_remove(ec);
  
+       mfd_remove_devices(ec->dev);
        cdev_del(&ec->cdev);
        device_unregister(&ec->class_dev);
        return 0;
diff --combined include/linux/mfd/tmio.h
index e2687a30e5a190edeff1e4e72cdcf9c68576cb84,aa696bcb1d12e7503ed3c8a2f948519322e013ad..739b7bf37eaa5aa615d44fee25de958f61cc8f0f
   * idle before writing to some registers.
   */
  #define TMIO_MMC_HAS_IDLE_WAIT                BIT(4)
 -/*
 - * A GPIO is used for card hotplug detection. We need an extra flag for this,
 - * because 0 is a valid GPIO number too, and requiring users to specify
 - * cd_gpio < 0 to disable GPIO hotplug would break backwards compatibility.
 - */
 -#define TMIO_MMC_USE_GPIO_CD          BIT(5)
 +
 +/* BIT(5) is unused */
  
  /*
   * Some controllers have CMD12 automatically
@@@ -79,7 -83,7 +79,7 @@@
  /* Some controllers have a CBSY bit */
  #define TMIO_MMC_HAVE_CBSY            BIT(11)
  
- /* Some controllers that support HS400 use use 4 taps while others use 8. */
+ /* Some controllers that support HS400 use 4 taps while others use 8. */
  #define TMIO_MMC_HAVE_4TAP_HS400      BIT(13)
  
  int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
@@@ -100,6 -104,7 +100,6 @@@ struct tmio_mmc_data 
        unsigned long                   capabilities2;
        unsigned long                   flags;
        u32                             ocr_mask;       /* available voltages */
 -      unsigned int                    cd_gpio;
        int                             alignment_shift;
        dma_addr_t                      dma_rx_offset;
        unsigned int                    max_blk_count;
This page took 0.06317 seconds and 4 git commands to generate.