diff options
| -rw-r--r-- | drivers/iio/adc/ti_am335x_adc.c | 5 | ||||
| -rw-r--r-- | drivers/mfd/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/mfd/ab8500-core.c | 2 | ||||
| -rw-r--r-- | drivers/mfd/axp20x.c | 126 | ||||
| -rw-r--r-- | drivers/mfd/bd9571mwv.c | 1 | ||||
| -rw-r--r-- | drivers/mfd/cros_ec_dev.c | 1 | ||||
| -rw-r--r-- | drivers/mfd/db8500-prcmu.c | 4 | ||||
| -rw-r--r-- | drivers/mfd/exynos-lpass.c | 4 | ||||
| -rw-r--r-- | drivers/mfd/madera-core.c | 5 | ||||
| -rw-r--r-- | drivers/mfd/max77620.c | 2 | ||||
| -rw-r--r-- | drivers/mfd/mc13xxx-core.c | 4 | ||||
| -rw-r--r-- | drivers/mfd/mt6397-core.c | 3 | ||||
| -rw-r--r-- | drivers/mfd/qcom_rpm.c | 4 | ||||
| -rw-r--r-- | drivers/mfd/rave-sp.c | 2 | ||||
| -rw-r--r-- | drivers/mfd/stmpe.c | 12 | ||||
| -rw-r--r-- | drivers/mfd/ti_am335x_tscadc.c | 5 | ||||
| -rw-r--r-- | drivers/mfd/tps65218.c | 24 | ||||
| -rw-r--r-- | drivers/mfd/tps6586x.c | 24 | ||||
| -rw-r--r-- | drivers/mfd/twl-core.c | 4 | ||||
| -rw-r--r-- | drivers/mfd/wm5110-tables.c | 2 | ||||
| -rw-r--r-- | include/linux/mfd/cros_ec_commands.h | 94 | ||||
| -rw-r--r-- | include/linux/mfd/ingenic-tcu.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/madera/core.h | 7 | ||||
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 4 | ||||
| -rw-r--r-- | include/linux/mfd/tmio.h | 2 |
25 files changed, 244 insertions, 100 deletions
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index cafb1dcadc48..9d984f2a8ba7 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c | |||
| @@ -142,7 +142,10 @@ static void tiadc_step_config(struct iio_dev *indio_dev) | |||
| 142 | stepconfig |= STEPCONFIG_MODE_SWCNT; | 142 | stepconfig |= STEPCONFIG_MODE_SWCNT; |
| 143 | 143 | ||
| 144 | tiadc_writel(adc_dev, REG_STEPCONFIG(steps), | 144 | tiadc_writel(adc_dev, REG_STEPCONFIG(steps), |
| 145 | stepconfig | STEPCONFIG_INP(chan)); | 145 | stepconfig | STEPCONFIG_INP(chan) | |
| 146 | STEPCONFIG_INM_ADCREFM | | ||
| 147 | STEPCONFIG_RFP_VREFP | | ||
| 148 | STEPCONFIG_RFM_VREFN); | ||
| 146 | 149 | ||
| 147 | if (adc_dev->open_delay[i] > STEPDELAY_OPEN_MASK) { | 150 | if (adc_dev->open_delay[i] > STEPDELAY_OPEN_MASK) { |
| 148 | dev_warn(dev, "chan %d open delay truncating to 0x3FFFF\n", | 151 | dev_warn(dev, "chan %d open delay truncating to 0x3FFFF\n", |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 8c5dfdce4326..f461460a2aeb 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
| @@ -102,6 +102,7 @@ config MFD_AAT2870_CORE | |||
| 102 | config MFD_AT91_USART | 102 | config MFD_AT91_USART |
| 103 | tristate "AT91 USART Driver" | 103 | tristate "AT91 USART Driver" |
| 104 | select MFD_CORE | 104 | select MFD_CORE |
| 105 | depends on ARCH_AT91 || COMPILE_TEST | ||
| 105 | help | 106 | help |
| 106 | Select this to get support for AT91 USART IP. This is a wrapper | 107 | Select this to get support for AT91 USART IP. This is a wrapper |
| 107 | over at91-usart-serial driver and usart-spi-driver. Only one function | 108 | over at91-usart-serial driver and usart-spi-driver. Only one function |
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 30d09d177171..11ab17f64c64 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
| @@ -261,7 +261,7 @@ static int get_register_interruptible(struct ab8500 *ab8500, u8 bank, | |||
| 261 | mutex_unlock(&ab8500->lock); | 261 | mutex_unlock(&ab8500->lock); |
| 262 | dev_vdbg(ab8500->dev, "rd: addr %#x => data %#x\n", addr, ret); | 262 | dev_vdbg(ab8500->dev, "rd: addr %#x => data %#x\n", addr, ret); |
| 263 | 263 | ||
| 264 | return ret; | 264 | return (ret < 0) ? ret : 0; |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | static int ab8500_get_register(struct device *dev, u8 bank, | 267 | static int ab8500_get_register(struct device *dev, u8 bank, |
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index e1450a56fc07..3c97f2c0fdfe 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c | |||
| @@ -641,9 +641,9 @@ static const struct mfd_cell axp221_cells[] = { | |||
| 641 | 641 | ||
| 642 | static const struct mfd_cell axp223_cells[] = { | 642 | static const struct mfd_cell axp223_cells[] = { |
| 643 | { | 643 | { |
| 644 | .name = "axp221-pek", | 644 | .name = "axp221-pek", |
| 645 | .num_resources = ARRAY_SIZE(axp22x_pek_resources), | 645 | .num_resources = ARRAY_SIZE(axp22x_pek_resources), |
| 646 | .resources = axp22x_pek_resources, | 646 | .resources = axp22x_pek_resources, |
| 647 | }, { | 647 | }, { |
| 648 | .name = "axp22x-adc", | 648 | .name = "axp22x-adc", |
| 649 | .of_compatible = "x-powers,axp221-adc", | 649 | .of_compatible = "x-powers,axp221-adc", |
| @@ -651,7 +651,7 @@ static const struct mfd_cell axp223_cells[] = { | |||
| 651 | .name = "axp20x-battery-power-supply", | 651 | .name = "axp20x-battery-power-supply", |
| 652 | .of_compatible = "x-powers,axp221-battery-power-supply", | 652 | .of_compatible = "x-powers,axp221-battery-power-supply", |
| 653 | }, { | 653 | }, { |
| 654 | .name = "axp20x-regulator", | 654 | .name = "axp20x-regulator", |
| 655 | }, { | 655 | }, { |
| 656 | .name = "axp20x-ac-power-supply", | 656 | .name = "axp20x-ac-power-supply", |
| 657 | .of_compatible = "x-powers,axp221-ac-power-supply", | 657 | .of_compatible = "x-powers,axp221-ac-power-supply", |
| @@ -667,9 +667,9 @@ static const struct mfd_cell axp223_cells[] = { | |||
| 667 | 667 | ||
| 668 | static const struct mfd_cell axp152_cells[] = { | 668 | static const struct mfd_cell axp152_cells[] = { |
| 669 | { | 669 | { |
| 670 | .name = "axp20x-pek", | 670 | .name = "axp20x-pek", |
| 671 | .num_resources = ARRAY_SIZE(axp152_pek_resources), | 671 | .num_resources = ARRAY_SIZE(axp152_pek_resources), |
| 672 | .resources = axp152_pek_resources, | 672 | .resources = axp152_pek_resources, |
| 673 | }, | 673 | }, |
| 674 | }; | 674 | }; |
| 675 | 675 | ||
| @@ -698,87 +698,101 @@ static const struct resource axp288_charger_resources[] = { | |||
| 698 | 698 | ||
| 699 | static const struct mfd_cell axp288_cells[] = { | 699 | static const struct mfd_cell axp288_cells[] = { |
| 700 | { | 700 | { |
| 701 | .name = "axp288_adc", | 701 | .name = "axp288_adc", |
| 702 | .num_resources = ARRAY_SIZE(axp288_adc_resources), | 702 | .num_resources = ARRAY_SIZE(axp288_adc_resources), |
| 703 | .resources = axp288_adc_resources, | 703 | .resources = axp288_adc_resources, |
| 704 | }, | 704 | }, { |
| 705 | { | 705 | .name = "axp288_extcon", |
| 706 | .name = "axp288_extcon", | 706 | .num_resources = ARRAY_SIZE(axp288_extcon_resources), |
| 707 | .num_resources = ARRAY_SIZE(axp288_extcon_resources), | 707 | .resources = axp288_extcon_resources, |
| 708 | .resources = axp288_extcon_resources, | 708 | }, { |
| 709 | }, | 709 | .name = "axp288_charger", |
| 710 | { | 710 | .num_resources = ARRAY_SIZE(axp288_charger_resources), |
| 711 | .name = "axp288_charger", | 711 | .resources = axp288_charger_resources, |
| 712 | .num_resources = ARRAY_SIZE(axp288_charger_resources), | 712 | }, { |
| 713 | .resources = axp288_charger_resources, | 713 | .name = "axp288_fuel_gauge", |
| 714 | }, | 714 | .num_resources = ARRAY_SIZE(axp288_fuel_gauge_resources), |
| 715 | { | 715 | .resources = axp288_fuel_gauge_resources, |
| 716 | .name = "axp288_fuel_gauge", | 716 | }, { |
| 717 | .num_resources = ARRAY_SIZE(axp288_fuel_gauge_resources), | 717 | .name = "axp221-pek", |
| 718 | .resources = axp288_fuel_gauge_resources, | 718 | .num_resources = ARRAY_SIZE(axp288_power_button_resources), |
| 719 | }, | 719 | .resources = axp288_power_button_resources, |
| 720 | { | 720 | }, { |
| 721 | .name = "axp221-pek", | 721 | .name = "axp288_pmic_acpi", |
| 722 | .num_resources = ARRAY_SIZE(axp288_power_button_resources), | ||
| 723 | .resources = axp288_power_button_resources, | ||
| 724 | }, | ||
| 725 | { | ||
| 726 | .name = "axp288_pmic_acpi", | ||
| 727 | }, | 722 | }, |
| 728 | }; | 723 | }; |
| 729 | 724 | ||
| 730 | static const struct mfd_cell axp803_cells[] = { | 725 | static const struct mfd_cell axp803_cells[] = { |
| 731 | { | 726 | { |
| 732 | .name = "axp221-pek", | 727 | .name = "axp221-pek", |
| 733 | .num_resources = ARRAY_SIZE(axp803_pek_resources), | 728 | .num_resources = ARRAY_SIZE(axp803_pek_resources), |
| 734 | .resources = axp803_pek_resources, | 729 | .resources = axp803_pek_resources, |
| 730 | }, { | ||
| 731 | .name = "axp20x-gpio", | ||
| 732 | .of_compatible = "x-powers,axp813-gpio", | ||
| 733 | }, { | ||
| 734 | .name = "axp813-adc", | ||
| 735 | .of_compatible = "x-powers,axp813-adc", | ||
| 736 | }, { | ||
| 737 | .name = "axp20x-battery-power-supply", | ||
| 738 | .of_compatible = "x-powers,axp813-battery-power-supply", | ||
| 739 | }, { | ||
| 740 | .name = "axp20x-ac-power-supply", | ||
| 741 | .of_compatible = "x-powers,axp813-ac-power-supply", | ||
| 742 | .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), | ||
| 743 | .resources = axp20x_ac_power_supply_resources, | ||
| 735 | }, | 744 | }, |
| 736 | { .name = "axp20x-regulator" }, | 745 | { .name = "axp20x-regulator" }, |
| 737 | }; | 746 | }; |
| 738 | 747 | ||
| 739 | static const struct mfd_cell axp806_self_working_cells[] = { | 748 | static const struct mfd_cell axp806_self_working_cells[] = { |
| 740 | { | 749 | { |
| 741 | .name = "axp221-pek", | 750 | .name = "axp221-pek", |
| 742 | .num_resources = ARRAY_SIZE(axp806_pek_resources), | 751 | .num_resources = ARRAY_SIZE(axp806_pek_resources), |
| 743 | .resources = axp806_pek_resources, | 752 | .resources = axp806_pek_resources, |
| 744 | }, | 753 | }, |
| 745 | { .name = "axp20x-regulator" }, | 754 | { .name = "axp20x-regulator" }, |
| 746 | }; | 755 | }; |
| 747 | 756 | ||
| 748 | static const struct mfd_cell axp806_cells[] = { | 757 | static const struct mfd_cell axp806_cells[] = { |
| 749 | { | 758 | { |
| 750 | .id = 2, | 759 | .id = 2, |
| 751 | .name = "axp20x-regulator", | 760 | .name = "axp20x-regulator", |
| 752 | }, | 761 | }, |
| 753 | }; | 762 | }; |
| 754 | 763 | ||
| 755 | static const struct mfd_cell axp809_cells[] = { | 764 | static const struct mfd_cell axp809_cells[] = { |
| 756 | { | 765 | { |
| 757 | .name = "axp221-pek", | 766 | .name = "axp221-pek", |
| 758 | .num_resources = ARRAY_SIZE(axp809_pek_resources), | 767 | .num_resources = ARRAY_SIZE(axp809_pek_resources), |
| 759 | .resources = axp809_pek_resources, | 768 | .resources = axp809_pek_resources, |
| 760 | }, { | 769 | }, { |
| 761 | .id = 1, | 770 | .id = 1, |
| 762 | .name = "axp20x-regulator", | 771 | .name = "axp20x-regulator", |
| 763 | }, | 772 | }, |
| 764 | }; | 773 | }; |
| 765 | 774 | ||
| 766 | static const struct mfd_cell axp813_cells[] = { | 775 | static const struct mfd_cell axp813_cells[] = { |
| 767 | { | 776 | { |
| 768 | .name = "axp221-pek", | 777 | .name = "axp221-pek", |
| 769 | .num_resources = ARRAY_SIZE(axp803_pek_resources), | 778 | .num_resources = ARRAY_SIZE(axp803_pek_resources), |
| 770 | .resources = axp803_pek_resources, | 779 | .resources = axp803_pek_resources, |
| 771 | }, { | 780 | }, { |
| 772 | .name = "axp20x-regulator", | 781 | .name = "axp20x-regulator", |
| 773 | }, { | 782 | }, { |
| 774 | .name = "axp20x-gpio", | 783 | .name = "axp20x-gpio", |
| 775 | .of_compatible = "x-powers,axp813-gpio", | 784 | .of_compatible = "x-powers,axp813-gpio", |
| 776 | }, { | 785 | }, { |
| 777 | .name = "axp813-adc", | 786 | .name = "axp813-adc", |
| 778 | .of_compatible = "x-powers,axp813-adc", | 787 | .of_compatible = "x-powers,axp813-adc", |
| 779 | }, { | 788 | }, { |
| 780 | .name = "axp20x-battery-power-supply", | 789 | .name = "axp20x-battery-power-supply", |
| 781 | .of_compatible = "x-powers,axp813-battery-power-supply", | 790 | .of_compatible = "x-powers,axp813-battery-power-supply", |
| 791 | }, { | ||
| 792 | .name = "axp20x-ac-power-supply", | ||
| 793 | .of_compatible = "x-powers,axp813-ac-power-supply", | ||
| 794 | .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), | ||
| 795 | .resources = axp20x_ac_power_supply_resources, | ||
| 782 | }, | 796 | }, |
| 783 | }; | 797 | }; |
| 784 | 798 | ||
diff --git a/drivers/mfd/bd9571mwv.c b/drivers/mfd/bd9571mwv.c index 503979c81dae..fab3cdc27ed6 100644 --- a/drivers/mfd/bd9571mwv.c +++ b/drivers/mfd/bd9571mwv.c | |||
| @@ -59,6 +59,7 @@ static const struct regmap_access_table bd9571mwv_writable_table = { | |||
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | static const struct regmap_range bd9571mwv_volatile_yes_ranges[] = { | 61 | static const struct regmap_range bd9571mwv_volatile_yes_ranges[] = { |
| 62 | regmap_reg_range(BD9571MWV_DVFS_MONIVDAC, BD9571MWV_DVFS_MONIVDAC), | ||
| 62 | regmap_reg_range(BD9571MWV_GPIO_IN, BD9571MWV_GPIO_IN), | 63 | regmap_reg_range(BD9571MWV_GPIO_IN, BD9571MWV_GPIO_IN), |
| 63 | regmap_reg_range(BD9571MWV_GPIO_INT, BD9571MWV_GPIO_INT), | 64 | regmap_reg_range(BD9571MWV_GPIO_INT, BD9571MWV_GPIO_INT), |
| 64 | regmap_reg_range(BD9571MWV_INT_INTREQ, BD9571MWV_INT_INTREQ), | 65 | regmap_reg_range(BD9571MWV_INT_INTREQ, BD9571MWV_INT_INTREQ), |
diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c index b99a194ce5a4..2d0fee488c5a 100644 --- a/drivers/mfd/cros_ec_dev.c +++ b/drivers/mfd/cros_ec_dev.c | |||
| @@ -499,6 +499,7 @@ static int ec_device_remove(struct platform_device *pdev) | |||
| 499 | 499 | ||
| 500 | cros_ec_debugfs_remove(ec); | 500 | cros_ec_debugfs_remove(ec); |
| 501 | 501 | ||
| 502 | mfd_remove_devices(ec->dev); | ||
| 502 | cdev_del(&ec->cdev); | 503 | cdev_del(&ec->cdev); |
| 503 | device_unregister(&ec->class_dev); | 504 | device_unregister(&ec->class_dev); |
| 504 | return 0; | 505 | return 0; |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 5970b8def548..aec20e1c7d3d 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c | |||
| @@ -2584,7 +2584,7 @@ static struct irq_chip prcmu_irq_chip = { | |||
| 2584 | .irq_unmask = prcmu_irq_unmask, | 2584 | .irq_unmask = prcmu_irq_unmask, |
| 2585 | }; | 2585 | }; |
| 2586 | 2586 | ||
| 2587 | static __init char *fw_project_name(u32 project) | 2587 | static char *fw_project_name(u32 project) |
| 2588 | { | 2588 | { |
| 2589 | switch (project) { | 2589 | switch (project) { |
| 2590 | case PRCMU_FW_PROJECT_U8500: | 2590 | case PRCMU_FW_PROJECT_U8500: |
| @@ -2732,7 +2732,7 @@ void __init db8500_prcmu_early_init(u32 phy_base, u32 size) | |||
| 2732 | INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work); | 2732 | INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work); |
| 2733 | } | 2733 | } |
| 2734 | 2734 | ||
| 2735 | static void __init init_prcm_registers(void) | 2735 | static void init_prcm_registers(void) |
| 2736 | { | 2736 | { |
| 2737 | u32 val; | 2737 | u32 val; |
| 2738 | 2738 | ||
diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index ca829f85672f..2713de989f05 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c | |||
| @@ -82,11 +82,13 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass) | |||
| 82 | LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S); | 82 | LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S); |
| 83 | 83 | ||
| 84 | regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, | 84 | regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, |
| 85 | LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S); | 85 | LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S | |
| 86 | LPASS_INTR_UART); | ||
| 86 | 87 | ||
| 87 | exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET); | 88 | exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET); |
| 88 | exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET); | 89 | exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET); |
| 89 | exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET); | 90 | exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET); |
| 91 | exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET); | ||
| 90 | } | 92 | } |
| 91 | 93 | ||
| 92 | static void exynos_lpass_disable(struct exynos_lpass *lpass) | 94 | static void exynos_lpass_disable(struct exynos_lpass *lpass) |
diff --git a/drivers/mfd/madera-core.c b/drivers/mfd/madera-core.c index 440030cecbbd..2a77988d0462 100644 --- a/drivers/mfd/madera-core.c +++ b/drivers/mfd/madera-core.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
| 16 | #include <linux/mfd/core.h> | 16 | #include <linux/mfd/core.h> |
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/mutex.h> | ||
| 18 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
| 19 | #include <linux/of.h> | 20 | #include <linux/of.h> |
| 20 | #include <linux/of_gpio.h> | 21 | #include <linux/of_gpio.h> |
| @@ -155,7 +156,7 @@ static int madera_wait_for_boot(struct madera *madera) | |||
| 155 | usleep_range(MADERA_BOOT_POLL_INTERVAL_USEC / 2, | 156 | usleep_range(MADERA_BOOT_POLL_INTERVAL_USEC / 2, |
| 156 | MADERA_BOOT_POLL_INTERVAL_USEC); | 157 | MADERA_BOOT_POLL_INTERVAL_USEC); |
| 157 | regmap_read(madera->regmap, MADERA_IRQ1_RAW_STATUS_1, &val); | 158 | regmap_read(madera->regmap, MADERA_IRQ1_RAW_STATUS_1, &val); |
| 158 | }; | 159 | } |
| 159 | 160 | ||
| 160 | if (!(val & MADERA_BOOT_DONE_STS1)) { | 161 | if (!(val & MADERA_BOOT_DONE_STS1)) { |
| 161 | dev_err(madera->dev, "Polling BOOT_DONE_STS timed out\n"); | 162 | dev_err(madera->dev, "Polling BOOT_DONE_STS timed out\n"); |
| @@ -357,6 +358,8 @@ int madera_dev_init(struct madera *madera) | |||
| 357 | 358 | ||
| 358 | dev_set_drvdata(madera->dev, madera); | 359 | dev_set_drvdata(madera->dev, madera); |
| 359 | BLOCKING_INIT_NOTIFIER_HEAD(&madera->notifier); | 360 | BLOCKING_INIT_NOTIFIER_HEAD(&madera->notifier); |
| 361 | mutex_init(&madera->dapm_ptr_lock); | ||
| 362 | |||
| 360 | madera_set_micbias_info(madera); | 363 | madera_set_micbias_info(madera); |
| 361 | 364 | ||
| 362 | /* | 365 | /* |
diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index d8217366ed36..d8ddd1a6f304 100644 --- a/drivers/mfd/max77620.c +++ b/drivers/mfd/max77620.c | |||
| @@ -280,7 +280,7 @@ static int max77620_config_fps(struct max77620_chip *chip, | |||
| 280 | 280 | ||
| 281 | for (fps_id = 0; fps_id < MAX77620_FPS_COUNT; fps_id++) { | 281 | for (fps_id = 0; fps_id < MAX77620_FPS_COUNT; fps_id++) { |
| 282 | sprintf(fps_name, "fps%d", fps_id); | 282 | sprintf(fps_name, "fps%d", fps_id); |
| 283 | if (!strcmp(fps_np->name, fps_name)) | 283 | if (of_node_name_eq(fps_np, fps_name)) |
| 284 | break; | 284 | break; |
| 285 | } | 285 | } |
| 286 | 286 | ||
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index f475e848252f..d0bf50e3568d 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c | |||
| @@ -274,7 +274,9 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode, | |||
| 274 | 274 | ||
| 275 | mc13xxx->adcflags |= MC13XXX_ADC_WORKING; | 275 | mc13xxx->adcflags |= MC13XXX_ADC_WORKING; |
| 276 | 276 | ||
| 277 | mc13xxx_reg_read(mc13xxx, MC13XXX_ADC0, &old_adc0); | 277 | ret = mc13xxx_reg_read(mc13xxx, MC13XXX_ADC0, &old_adc0); |
| 278 | if (ret) | ||
| 279 | goto out; | ||
| 278 | 280 | ||
| 279 | adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2 | | 281 | adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2 | |
| 280 | MC13XXX_ADC0_CHRGRAWDIV; | 282 | MC13XXX_ADC0_CHRGRAWDIV; |
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 77b64bd64df3..ab24e176ef44 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c | |||
| @@ -329,8 +329,7 @@ static int mt6397_probe(struct platform_device *pdev) | |||
| 329 | 329 | ||
| 330 | default: | 330 | default: |
| 331 | dev_err(&pdev->dev, "unsupported chip: %d\n", id); | 331 | dev_err(&pdev->dev, "unsupported chip: %d\n", id); |
| 332 | ret = -ENODEV; | 332 | return -ENODEV; |
| 333 | break; | ||
| 334 | } | 333 | } |
| 335 | 334 | ||
| 336 | if (ret) { | 335 | if (ret) { |
diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c index 52fafea06067..8d420c37b2a6 100644 --- a/drivers/mfd/qcom_rpm.c +++ b/drivers/mfd/qcom_rpm.c | |||
| @@ -638,6 +638,10 @@ static int qcom_rpm_probe(struct platform_device *pdev) | |||
| 638 | return -EFAULT; | 638 | return -EFAULT; |
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | writel(fw_version[0], RPM_CTRL_REG(rpm, 0)); | ||
| 642 | writel(fw_version[1], RPM_CTRL_REG(rpm, 1)); | ||
| 643 | writel(fw_version[2], RPM_CTRL_REG(rpm, 2)); | ||
| 644 | |||
| 641 | dev_info(&pdev->dev, "RPM firmware %u.%u.%u\n", fw_version[0], | 645 | dev_info(&pdev->dev, "RPM firmware %u.%u.%u\n", fw_version[0], |
| 642 | fw_version[1], | 646 | fw_version[1], |
| 643 | fw_version[2]); | 647 | fw_version[2]); |
diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index 2a8369657e38..26c7b63e008a 100644 --- a/drivers/mfd/rave-sp.c +++ b/drivers/mfd/rave-sp.c | |||
| @@ -109,7 +109,7 @@ struct rave_sp_reply { | |||
| 109 | /** | 109 | /** |
| 110 | * struct rave_sp_checksum - Variant specific checksum implementation details | 110 | * struct rave_sp_checksum - Variant specific checksum implementation details |
| 111 | * | 111 | * |
| 112 | * @length: Caculated checksum length | 112 | * @length: Calculated checksum length |
| 113 | * @subroutine: Utilized checksum algorithm implementation | 113 | * @subroutine: Utilized checksum algorithm implementation |
| 114 | */ | 114 | */ |
| 115 | struct rave_sp_checksum { | 115 | struct rave_sp_checksum { |
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 566caca4efd8..7569a4be0608 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c | |||
| @@ -1302,17 +1302,17 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata, | |||
| 1302 | pdata->autosleep = (pdata->autosleep_timeout) ? true : false; | 1302 | pdata->autosleep = (pdata->autosleep_timeout) ? true : false; |
| 1303 | 1303 | ||
| 1304 | for_each_child_of_node(np, child) { | 1304 | for_each_child_of_node(np, child) { |
| 1305 | if (!strcmp(child->name, "stmpe_gpio")) { | 1305 | if (of_node_name_eq(child, "stmpe_gpio")) { |
| 1306 | pdata->blocks |= STMPE_BLOCK_GPIO; | 1306 | pdata->blocks |= STMPE_BLOCK_GPIO; |
| 1307 | } else if (!strcmp(child->name, "stmpe_keypad")) { | 1307 | } else if (of_node_name_eq(child, "stmpe_keypad")) { |
| 1308 | pdata->blocks |= STMPE_BLOCK_KEYPAD; | 1308 | pdata->blocks |= STMPE_BLOCK_KEYPAD; |
| 1309 | } else if (!strcmp(child->name, "stmpe_touchscreen")) { | 1309 | } else if (of_node_name_eq(child, "stmpe_touchscreen")) { |
| 1310 | pdata->blocks |= STMPE_BLOCK_TOUCHSCREEN; | 1310 | pdata->blocks |= STMPE_BLOCK_TOUCHSCREEN; |
| 1311 | } else if (!strcmp(child->name, "stmpe_adc")) { | 1311 | } else if (of_node_name_eq(child, "stmpe_adc")) { |
| 1312 | pdata->blocks |= STMPE_BLOCK_ADC; | 1312 | pdata->blocks |= STMPE_BLOCK_ADC; |
| 1313 | } else if (!strcmp(child->name, "stmpe_pwm")) { | 1313 | } else if (of_node_name_eq(child, "stmpe_pwm")) { |
| 1314 | pdata->blocks |= STMPE_BLOCK_PWM; | 1314 | pdata->blocks |= STMPE_BLOCK_PWM; |
| 1315 | } else if (!strcmp(child->name, "stmpe_rotator")) { | 1315 | } else if (of_node_name_eq(child, "stmpe_rotator")) { |
| 1316 | pdata->blocks |= STMPE_BLOCK_ROTATOR; | 1316 | pdata->blocks |= STMPE_BLOCK_ROTATOR; |
| 1317 | } | 1317 | } |
| 1318 | } | 1318 | } |
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index c2d47d78705b..fd111296b959 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c | |||
| @@ -264,8 +264,9 @@ static int ti_tscadc_probe(struct platform_device *pdev) | |||
| 264 | cell->pdata_size = sizeof(tscadc); | 264 | cell->pdata_size = sizeof(tscadc); |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells, | 267 | err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, |
| 268 | tscadc->used_cells, NULL, 0, NULL); | 268 | tscadc->cells, tscadc->used_cells, NULL, |
| 269 | 0, NULL); | ||
| 269 | if (err < 0) | 270 | if (err < 0) |
| 270 | goto err_disable_clk; | 271 | goto err_disable_clk; |
| 271 | 272 | ||
diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c index 910f569ff77c..8bcdecf494d0 100644 --- a/drivers/mfd/tps65218.c +++ b/drivers/mfd/tps65218.c | |||
| @@ -235,9 +235,9 @@ static int tps65218_probe(struct i2c_client *client, | |||
| 235 | 235 | ||
| 236 | mutex_init(&tps->tps_lock); | 236 | mutex_init(&tps->tps_lock); |
| 237 | 237 | ||
| 238 | ret = regmap_add_irq_chip(tps->regmap, tps->irq, | 238 | ret = devm_regmap_add_irq_chip(&client->dev, tps->regmap, tps->irq, |
| 239 | IRQF_ONESHOT, 0, &tps65218_irq_chip, | 239 | IRQF_ONESHOT, 0, &tps65218_irq_chip, |
| 240 | &tps->irq_data); | 240 | &tps->irq_data); |
| 241 | if (ret < 0) | 241 | if (ret < 0) |
| 242 | return ret; | 242 | return ret; |
| 243 | 243 | ||
| @@ -253,26 +253,9 @@ static int tps65218_probe(struct i2c_client *client, | |||
| 253 | ARRAY_SIZE(tps65218_cells), NULL, 0, | 253 | ARRAY_SIZE(tps65218_cells), NULL, 0, |
| 254 | regmap_irq_get_domain(tps->irq_data)); | 254 | regmap_irq_get_domain(tps->irq_data)); |
| 255 | 255 | ||
| 256 | if (ret < 0) | ||
| 257 | goto err_irq; | ||
| 258 | |||
| 259 | return 0; | ||
| 260 | |||
| 261 | err_irq: | ||
| 262 | regmap_del_irq_chip(tps->irq, tps->irq_data); | ||
| 263 | |||
| 264 | return ret; | 256 | return ret; |
| 265 | } | 257 | } |
| 266 | 258 | ||
| 267 | static int tps65218_remove(struct i2c_client *client) | ||
| 268 | { | ||
| 269 | struct tps65218 *tps = i2c_get_clientdata(client); | ||
| 270 | |||
| 271 | regmap_del_irq_chip(tps->irq, tps->irq_data); | ||
| 272 | |||
| 273 | return 0; | ||
| 274 | } | ||
| 275 | |||
| 276 | static const struct i2c_device_id tps65218_id_table[] = { | 259 | static const struct i2c_device_id tps65218_id_table[] = { |
| 277 | { "tps65218", TPS65218 }, | 260 | { "tps65218", TPS65218 }, |
| 278 | { }, | 261 | { }, |
| @@ -285,7 +268,6 @@ static struct i2c_driver tps65218_driver = { | |||
| 285 | .of_match_table = of_tps65218_match_table, | 268 | .of_match_table = of_tps65218_match_table, |
| 286 | }, | 269 | }, |
| 287 | .probe = tps65218_probe, | 270 | .probe = tps65218_probe, |
| 288 | .remove = tps65218_remove, | ||
| 289 | .id_table = tps65218_id_table, | 271 | .id_table = tps65218_id_table, |
| 290 | }; | 272 | }; |
| 291 | 273 | ||
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index b89379782741..9c7925ca13cf 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
| @@ -592,6 +592,29 @@ static int tps6586x_i2c_remove(struct i2c_client *client) | |||
| 592 | return 0; | 592 | return 0; |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | static int __maybe_unused tps6586x_i2c_suspend(struct device *dev) | ||
| 596 | { | ||
| 597 | struct tps6586x *tps6586x = dev_get_drvdata(dev); | ||
| 598 | |||
| 599 | if (tps6586x->client->irq) | ||
| 600 | disable_irq(tps6586x->client->irq); | ||
| 601 | |||
| 602 | return 0; | ||
| 603 | } | ||
| 604 | |||
| 605 | static int __maybe_unused tps6586x_i2c_resume(struct device *dev) | ||
| 606 | { | ||
| 607 | struct tps6586x *tps6586x = dev_get_drvdata(dev); | ||
| 608 | |||
| 609 | if (tps6586x->client->irq) | ||
| 610 | enable_irq(tps6586x->client->irq); | ||
| 611 | |||
| 612 | return 0; | ||
| 613 | } | ||
| 614 | |||
| 615 | static SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend, | ||
| 616 | tps6586x_i2c_resume); | ||
| 617 | |||
| 595 | static const struct i2c_device_id tps6586x_id_table[] = { | 618 | static const struct i2c_device_id tps6586x_id_table[] = { |
| 596 | { "tps6586x", 0 }, | 619 | { "tps6586x", 0 }, |
| 597 | { }, | 620 | { }, |
| @@ -602,6 +625,7 @@ static struct i2c_driver tps6586x_driver = { | |||
| 602 | .driver = { | 625 | .driver = { |
| 603 | .name = "tps6586x", | 626 | .name = "tps6586x", |
| 604 | .of_match_table = of_match_ptr(tps6586x_of_match), | 627 | .of_match_table = of_match_ptr(tps6586x_of_match), |
| 628 | .pm = &tps6586x_pm_ops, | ||
| 605 | }, | 629 | }, |
| 606 | .probe = tps6586x_i2c_probe, | 630 | .probe = tps6586x_i2c_probe, |
| 607 | .remove = tps6586x_i2c_remove, | 631 | .remove = tps6586x_i2c_remove, |
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 4be3d239da9e..299016bc46d9 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
| @@ -979,7 +979,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base, | |||
| 979 | * letting it generate the right frequencies for USB, MADC, and | 979 | * letting it generate the right frequencies for USB, MADC, and |
| 980 | * other purposes. | 980 | * other purposes. |
| 981 | */ | 981 | */ |
| 982 | static inline int __init protect_pm_master(void) | 982 | static inline int protect_pm_master(void) |
| 983 | { | 983 | { |
| 984 | int e = 0; | 984 | int e = 0; |
| 985 | 985 | ||
| @@ -988,7 +988,7 @@ static inline int __init protect_pm_master(void) | |||
| 988 | return e; | 988 | return e; |
| 989 | } | 989 | } |
| 990 | 990 | ||
| 991 | static inline int __init unprotect_pm_master(void) | 991 | static inline int unprotect_pm_master(void) |
| 992 | { | 992 | { |
| 993 | int e = 0; | 993 | int e = 0; |
| 994 | 994 | ||
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index 1ee68bd440fb..16c6e2accfaa 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c | |||
| @@ -1618,6 +1618,7 @@ static const struct reg_default wm5110_reg_default[] = { | |||
| 1618 | { 0x00000ECD, 0x0000 }, /* R3789 - HPLPF4_2 */ | 1618 | { 0x00000ECD, 0x0000 }, /* R3789 - HPLPF4_2 */ |
| 1619 | { 0x00000EE0, 0x0000 }, /* R3808 - ASRC_ENABLE */ | 1619 | { 0x00000EE0, 0x0000 }, /* R3808 - ASRC_ENABLE */ |
| 1620 | { 0x00000EE2, 0x0000 }, /* R3810 - ASRC_RATE1 */ | 1620 | { 0x00000EE2, 0x0000 }, /* R3810 - ASRC_RATE1 */ |
| 1621 | { 0x00000EE3, 0x4000 }, /* R3811 - ASRC_RATE2 */ | ||
| 1621 | { 0x00000EF0, 0x0000 }, /* R3824 - ISRC 1 CTRL 1 */ | 1622 | { 0x00000EF0, 0x0000 }, /* R3824 - ISRC 1 CTRL 1 */ |
| 1622 | { 0x00000EF1, 0x0000 }, /* R3825 - ISRC 1 CTRL 2 */ | 1623 | { 0x00000EF1, 0x0000 }, /* R3825 - ISRC 1 CTRL 2 */ |
| 1623 | { 0x00000EF2, 0x0000 }, /* R3826 - ISRC 1 CTRL 3 */ | 1624 | { 0x00000EF2, 0x0000 }, /* R3826 - ISRC 1 CTRL 3 */ |
| @@ -2869,6 +2870,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg) | |||
| 2869 | case ARIZONA_ASRC_ENABLE: | 2870 | case ARIZONA_ASRC_ENABLE: |
| 2870 | case ARIZONA_ASRC_STATUS: | 2871 | case ARIZONA_ASRC_STATUS: |
| 2871 | case ARIZONA_ASRC_RATE1: | 2872 | case ARIZONA_ASRC_RATE1: |
| 2873 | case ARIZONA_ASRC_RATE2: | ||
| 2872 | case ARIZONA_ISRC_1_CTRL_1: | 2874 | case ARIZONA_ISRC_1_CTRL_1: |
| 2873 | case ARIZONA_ISRC_1_CTRL_2: | 2875 | case ARIZONA_ISRC_1_CTRL_2: |
| 2874 | case ARIZONA_ISRC_1_CTRL_3: | 2876 | case ARIZONA_ISRC_1_CTRL_3: |
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 9a9631f0559e..fc91082d4c35 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h | |||
| @@ -2791,6 +2791,100 @@ struct ec_response_battery_vendor_param { | |||
| 2791 | } __packed; | 2791 | } __packed; |
| 2792 | 2792 | ||
| 2793 | /*****************************************************************************/ | 2793 | /*****************************************************************************/ |
| 2794 | /* Commands for I2S recording on audio codec. */ | ||
| 2795 | |||
| 2796 | #define EC_CMD_CODEC_I2S 0x00BC | ||
| 2797 | |||
| 2798 | enum ec_codec_i2s_subcmd { | ||
| 2799 | EC_CODEC_SET_SAMPLE_DEPTH = 0x0, | ||
| 2800 | EC_CODEC_SET_GAIN = 0x1, | ||
| 2801 | EC_CODEC_GET_GAIN = 0x2, | ||
| 2802 | EC_CODEC_I2S_ENABLE = 0x3, | ||
| 2803 | EC_CODEC_I2S_SET_CONFIG = 0x4, | ||
| 2804 | EC_CODEC_I2S_SET_TDM_CONFIG = 0x5, | ||
| 2805 | EC_CODEC_I2S_SET_BCLK = 0x6, | ||
| 2806 | }; | ||
| 2807 | |||
| 2808 | enum ec_sample_depth_value { | ||
| 2809 | EC_CODEC_SAMPLE_DEPTH_16 = 0, | ||
| 2810 | EC_CODEC_SAMPLE_DEPTH_24 = 1, | ||
| 2811 | }; | ||
| 2812 | |||
| 2813 | enum ec_i2s_config { | ||
| 2814 | EC_DAI_FMT_I2S = 0, | ||
| 2815 | EC_DAI_FMT_RIGHT_J = 1, | ||
| 2816 | EC_DAI_FMT_LEFT_J = 2, | ||
| 2817 | EC_DAI_FMT_PCM_A = 3, | ||
| 2818 | EC_DAI_FMT_PCM_B = 4, | ||
| 2819 | EC_DAI_FMT_PCM_TDM = 5, | ||
| 2820 | }; | ||
| 2821 | |||
| 2822 | struct ec_param_codec_i2s { | ||
| 2823 | /* | ||
| 2824 | * enum ec_codec_i2s_subcmd | ||
| 2825 | */ | ||
| 2826 | uint8_t cmd; | ||
| 2827 | union { | ||
| 2828 | /* | ||
| 2829 | * EC_CODEC_SET_SAMPLE_DEPTH | ||
| 2830 | * Value should be one of ec_sample_depth_value. | ||
| 2831 | */ | ||
| 2832 | uint8_t depth; | ||
| 2833 | |||
| 2834 | /* | ||
| 2835 | * EC_CODEC_SET_GAIN | ||
| 2836 | * Value should be 0~43 for both channels. | ||
| 2837 | */ | ||
| 2838 | struct ec_param_codec_i2s_set_gain { | ||
| 2839 | uint8_t left; | ||
| 2840 | uint8_t right; | ||
| 2841 | } __packed gain; | ||
| 2842 | |||
| 2843 | /* | ||
| 2844 | * EC_CODEC_I2S_ENABLE | ||
| 2845 | * 1 to enable, 0 to disable. | ||
| 2846 | */ | ||
| 2847 | uint8_t i2s_enable; | ||
| 2848 | |||
| 2849 | /* | ||
| 2850 | * EC_CODEC_I2S_SET_COFNIG | ||
| 2851 | * Value should be one of ec_i2s_config. | ||
| 2852 | */ | ||
| 2853 | uint8_t i2s_config; | ||
| 2854 | |||
| 2855 | /* | ||
| 2856 | * EC_CODEC_I2S_SET_TDM_CONFIG | ||
| 2857 | * Value should be one of ec_i2s_config. | ||
| 2858 | */ | ||
| 2859 | struct ec_param_codec_i2s_tdm { | ||
| 2860 | /* | ||
| 2861 | * 0 to 496 | ||
| 2862 | */ | ||
| 2863 | int16_t ch0_delay; | ||
| 2864 | /* | ||
| 2865 | * -1 to 496 | ||
| 2866 | */ | ||
| 2867 | int16_t ch1_delay; | ||
| 2868 | uint8_t adjacent_to_ch0; | ||
| 2869 | uint8_t adjacent_to_ch1; | ||
| 2870 | } __packed tdm_param; | ||
| 2871 | |||
| 2872 | /* | ||
| 2873 | * EC_CODEC_I2S_SET_BCLK | ||
| 2874 | */ | ||
| 2875 | uint32_t bclk; | ||
| 2876 | }; | ||
| 2877 | } __packed; | ||
| 2878 | |||
| 2879 | /* | ||
| 2880 | * For subcommand EC_CODEC_GET_GAIN. | ||
| 2881 | */ | ||
| 2882 | struct ec_response_codec_gain { | ||
| 2883 | uint8_t left; | ||
| 2884 | uint8_t right; | ||
| 2885 | } __packed; | ||
| 2886 | |||
| 2887 | /*****************************************************************************/ | ||
| 2794 | /* System commands */ | 2888 | /* System commands */ |
| 2795 | 2889 | ||
| 2796 | /* | 2890 | /* |
diff --git a/include/linux/mfd/ingenic-tcu.h b/include/linux/mfd/ingenic-tcu.h index ab16ad283def..2083fa20821d 100644 --- a/include/linux/mfd/ingenic-tcu.h +++ b/include/linux/mfd/ingenic-tcu.h | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #define TCU_TCSR_PRESCALE_LSB 3 | 41 | #define TCU_TCSR_PRESCALE_LSB 3 |
| 42 | #define TCU_TCSR_PRESCALE_MASK 0x38 | 42 | #define TCU_TCSR_PRESCALE_MASK 0x38 |
| 43 | 43 | ||
| 44 | #define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown abruptly 1: gracefully */ | 44 | #define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown gracefully 1: abruptly */ |
| 45 | #define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */ | 45 | #define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */ |
| 46 | #define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */ | 46 | #define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */ |
| 47 | 47 | ||
diff --git a/include/linux/mfd/madera/core.h b/include/linux/mfd/madera/core.h index fe69c0f4398f..4d5d51a9c8a6 100644 --- a/include/linux/mfd/madera/core.h +++ b/include/linux/mfd/madera/core.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/gpio/consumer.h> | 15 | #include <linux/gpio/consumer.h> |
| 16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/mfd/madera/pdata.h> | 17 | #include <linux/mfd/madera/pdata.h> |
| 18 | #include <linux/mutex.h> | ||
| 18 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
| 19 | #include <linux/regmap.h> | 20 | #include <linux/regmap.h> |
| 20 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
| @@ -37,6 +38,8 @@ enum madera_type { | |||
| 37 | 38 | ||
| 38 | #define MADERA_MAX_MICBIAS 4 | 39 | #define MADERA_MAX_MICBIAS 4 |
| 39 | 40 | ||
| 41 | #define MADERA_MAX_HP_OUTPUT 3 | ||
| 42 | |||
| 40 | /* Notifier events */ | 43 | /* Notifier events */ |
| 41 | #define MADERA_NOTIFY_VOICE_TRIGGER 0x1 | 44 | #define MADERA_NOTIFY_VOICE_TRIGGER 0x1 |
| 42 | #define MADERA_NOTIFY_HPDET 0x2 | 45 | #define MADERA_NOTIFY_HPDET 0x2 |
| @@ -183,6 +186,10 @@ struct madera { | |||
| 183 | unsigned int num_childbias[MADERA_MAX_MICBIAS]; | 186 | unsigned int num_childbias[MADERA_MAX_MICBIAS]; |
| 184 | 187 | ||
| 185 | struct snd_soc_dapm_context *dapm; | 188 | struct snd_soc_dapm_context *dapm; |
| 189 | struct mutex dapm_ptr_lock; | ||
| 190 | unsigned int hp_ena; | ||
| 191 | bool out_clamp[MADERA_MAX_HP_OUTPUT]; | ||
| 192 | bool out_shorted[MADERA_MAX_HP_OUTPUT]; | ||
| 186 | 193 | ||
| 187 | struct blocking_notifier_head notifier; | 194 | struct blocking_notifier_head notifier; |
| 188 | }; | 195 | }; |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index b9a53e013bff..483168403ae5 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -78,6 +78,8 @@ | |||
| 78 | #define STEPCONFIG_YNN BIT(8) | 78 | #define STEPCONFIG_YNN BIT(8) |
| 79 | #define STEPCONFIG_XNP BIT(9) | 79 | #define STEPCONFIG_XNP BIT(9) |
| 80 | #define STEPCONFIG_YPN BIT(10) | 80 | #define STEPCONFIG_YPN BIT(10) |
| 81 | #define STEPCONFIG_RFP(val) ((val) << 12) | ||
| 82 | #define STEPCONFIG_RFP_VREFP (0x3 << 12) | ||
| 81 | #define STEPCONFIG_INM_MASK (0xF << 15) | 83 | #define STEPCONFIG_INM_MASK (0xF << 15) |
| 82 | #define STEPCONFIG_INM(val) ((val) << 15) | 84 | #define STEPCONFIG_INM(val) ((val) << 15) |
| 83 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) | 85 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) |
| @@ -86,6 +88,8 @@ | |||
| 86 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) | 88 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) |
| 87 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) | 89 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) |
| 88 | #define STEPCONFIG_FIFO1 BIT(26) | 90 | #define STEPCONFIG_FIFO1 BIT(26) |
| 91 | #define STEPCONFIG_RFM(val) ((val) << 23) | ||
| 92 | #define STEPCONFIG_RFM_VREFN (0x3 << 23) | ||
| 89 | 93 | ||
| 90 | /* Delay register */ | 94 | /* Delay register */ |
| 91 | #define STEPDELAY_OPEN_MASK (0x3FFFF << 0) | 95 | #define STEPDELAY_OPEN_MASK (0x3FFFF << 0) |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index e2687a30e5a1..739b7bf37eaa 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | /* Some controllers have a CBSY bit */ | 79 | /* Some controllers have a CBSY bit */ |
| 80 | #define TMIO_MMC_HAVE_CBSY BIT(11) | 80 | #define TMIO_MMC_HAVE_CBSY BIT(11) |
| 81 | 81 | ||
| 82 | /* Some controllers that support HS400 use use 4 taps while others use 8. */ | 82 | /* Some controllers that support HS400 use 4 taps while others use 8. */ |
| 83 | #define TMIO_MMC_HAVE_4TAP_HS400 BIT(13) | 83 | #define TMIO_MMC_HAVE_4TAP_HS400 BIT(13) |
| 84 | 84 | ||
| 85 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 85 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
