Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mfd-next-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

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/
...

+244 -100
+4 -1
drivers/iio/adc/ti_am335x_adc.c
··· 142 142 stepconfig |= STEPCONFIG_MODE_SWCNT; 143 143 144 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 150 if (adc_dev->open_delay[i] > STEPDELAY_OPEN_MASK) { 148 151 dev_warn(dev, "chan %d open delay truncating to 0x3FFFF\n",
+1
drivers/mfd/Kconfig
··· 102 102 config MFD_AT91_USART 103 103 tristate "AT91 USART Driver" 104 104 select MFD_CORE 105 + depends on ARCH_AT91 || COMPILE_TEST 105 106 help 106 107 Select this to get support for AT91 USART IP. This is a wrapper 107 108 over at91-usart-serial driver and usart-spi-driver. Only one function
+1 -1
drivers/mfd/ab8500-core.c
··· 261 261 mutex_unlock(&ab8500->lock); 262 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 267 static int ab8500_get_register(struct device *dev, u8 bank,
+70 -56
drivers/mfd/axp20x.c
··· 641 641 642 642 static const struct mfd_cell axp223_cells[] = { 643 643 { 644 - .name = "axp221-pek", 645 - .num_resources = ARRAY_SIZE(axp22x_pek_resources), 646 - .resources = axp22x_pek_resources, 644 + .name = "axp221-pek", 645 + .num_resources = ARRAY_SIZE(axp22x_pek_resources), 646 + .resources = axp22x_pek_resources, 647 647 }, { 648 648 .name = "axp22x-adc", 649 649 .of_compatible = "x-powers,axp221-adc", ··· 651 651 .name = "axp20x-battery-power-supply", 652 652 .of_compatible = "x-powers,axp221-battery-power-supply", 653 653 }, { 654 - .name = "axp20x-regulator", 654 + .name = "axp20x-regulator", 655 655 }, { 656 656 .name = "axp20x-ac-power-supply", 657 657 .of_compatible = "x-powers,axp221-ac-power-supply", ··· 667 667 668 668 static const struct mfd_cell axp152_cells[] = { 669 669 { 670 - .name = "axp20x-pek", 671 - .num_resources = ARRAY_SIZE(axp152_pek_resources), 672 - .resources = axp152_pek_resources, 670 + .name = "axp20x-pek", 671 + .num_resources = ARRAY_SIZE(axp152_pek_resources), 672 + .resources = axp152_pek_resources, 673 673 }, 674 674 }; 675 675 ··· 698 698 699 699 static const struct mfd_cell axp288_cells[] = { 700 700 { 701 - .name = "axp288_adc", 702 - .num_resources = ARRAY_SIZE(axp288_adc_resources), 703 - .resources = axp288_adc_resources, 704 - }, 705 - { 706 - .name = "axp288_extcon", 707 - .num_resources = ARRAY_SIZE(axp288_extcon_resources), 708 - .resources = axp288_extcon_resources, 709 - }, 710 - { 711 - .name = "axp288_charger", 712 - .num_resources = ARRAY_SIZE(axp288_charger_resources), 713 - .resources = axp288_charger_resources, 714 - }, 715 - { 716 - .name = "axp288_fuel_gauge", 717 - .num_resources = ARRAY_SIZE(axp288_fuel_gauge_resources), 718 - .resources = axp288_fuel_gauge_resources, 719 - }, 720 - { 721 - .name = "axp221-pek", 722 - .num_resources = ARRAY_SIZE(axp288_power_button_resources), 723 - .resources = axp288_power_button_resources, 724 - }, 725 - { 726 - .name = "axp288_pmic_acpi", 701 + .name = "axp288_adc", 702 + .num_resources = ARRAY_SIZE(axp288_adc_resources), 703 + .resources = axp288_adc_resources, 704 + }, { 705 + .name = "axp288_extcon", 706 + .num_resources = ARRAY_SIZE(axp288_extcon_resources), 707 + .resources = axp288_extcon_resources, 708 + }, { 709 + .name = "axp288_charger", 710 + .num_resources = ARRAY_SIZE(axp288_charger_resources), 711 + .resources = axp288_charger_resources, 712 + }, { 713 + .name = "axp288_fuel_gauge", 714 + .num_resources = ARRAY_SIZE(axp288_fuel_gauge_resources), 715 + .resources = axp288_fuel_gauge_resources, 716 + }, { 717 + .name = "axp221-pek", 718 + .num_resources = ARRAY_SIZE(axp288_power_button_resources), 719 + .resources = axp288_power_button_resources, 720 + }, { 721 + .name = "axp288_pmic_acpi", 727 722 }, 728 723 }; 729 724 730 725 static const struct mfd_cell axp803_cells[] = { 731 726 { 732 - .name = "axp221-pek", 733 - .num_resources = ARRAY_SIZE(axp803_pek_resources), 734 - .resources = axp803_pek_resources, 727 + .name = "axp221-pek", 728 + .num_resources = ARRAY_SIZE(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 748 static const struct mfd_cell axp806_self_working_cells[] = { 740 749 { 741 - .name = "axp221-pek", 742 - .num_resources = ARRAY_SIZE(axp806_pek_resources), 743 - .resources = axp806_pek_resources, 750 + .name = "axp221-pek", 751 + .num_resources = ARRAY_SIZE(axp806_pek_resources), 752 + .resources = axp806_pek_resources, 744 753 }, 745 - { .name = "axp20x-regulator" }, 754 + { .name = "axp20x-regulator" }, 746 755 }; 747 756 748 757 static const struct mfd_cell axp806_cells[] = { 749 758 { 750 - .id = 2, 751 - .name = "axp20x-regulator", 759 + .id = 2, 760 + .name = "axp20x-regulator", 752 761 }, 753 762 }; 754 763 755 764 static const struct mfd_cell axp809_cells[] = { 756 765 { 757 - .name = "axp221-pek", 758 - .num_resources = ARRAY_SIZE(axp809_pek_resources), 759 - .resources = axp809_pek_resources, 766 + .name = "axp221-pek", 767 + .num_resources = ARRAY_SIZE(axp809_pek_resources), 768 + .resources = axp809_pek_resources, 760 769 }, { 761 - .id = 1, 762 - .name = "axp20x-regulator", 770 + .id = 1, 771 + .name = "axp20x-regulator", 763 772 }, 764 773 }; 765 774 766 775 static const struct mfd_cell axp813_cells[] = { 767 776 { 768 - .name = "axp221-pek", 769 - .num_resources = ARRAY_SIZE(axp803_pek_resources), 770 - .resources = axp803_pek_resources, 777 + .name = "axp221-pek", 778 + .num_resources = ARRAY_SIZE(axp803_pek_resources), 779 + .resources = axp803_pek_resources, 771 780 }, { 772 - .name = "axp20x-regulator", 781 + .name = "axp20x-regulator", 773 782 }, { 774 - .name = "axp20x-gpio", 775 - .of_compatible = "x-powers,axp813-gpio", 783 + .name = "axp20x-gpio", 784 + .of_compatible = "x-powers,axp813-gpio", 776 785 }, { 777 - .name = "axp813-adc", 778 - .of_compatible = "x-powers,axp813-adc", 786 + .name = "axp813-adc", 787 + .of_compatible = "x-powers,axp813-adc", 779 788 }, { 780 789 .name = "axp20x-battery-power-supply", 781 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
+1
drivers/mfd/bd9571mwv.c
··· 59 59 }; 60 60 61 61 static const struct regmap_range bd9571mwv_volatile_yes_ranges[] = { 62 + regmap_reg_range(BD9571MWV_DVFS_MONIVDAC, BD9571MWV_DVFS_MONIVDAC), 62 63 regmap_reg_range(BD9571MWV_GPIO_IN, BD9571MWV_GPIO_IN), 63 64 regmap_reg_range(BD9571MWV_GPIO_INT, BD9571MWV_GPIO_INT), 64 65 regmap_reg_range(BD9571MWV_INT_INTREQ, BD9571MWV_INT_INTREQ),
+1
drivers/mfd/cros_ec_dev.c
··· 499 499 500 500 cros_ec_debugfs_remove(ec); 501 501 502 + mfd_remove_devices(ec->dev); 502 503 cdev_del(&ec->cdev); 503 504 device_unregister(&ec->class_dev); 504 505 return 0;
+2 -2
drivers/mfd/db8500-prcmu.c
··· 2584 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 2589 switch (project) { 2590 2590 case PRCMU_FW_PROJECT_U8500: ··· 2732 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 2737 u32 val; 2738 2738
+3 -1
drivers/mfd/exynos-lpass.c
··· 82 82 LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S); 83 83 84 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 88 exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET); 88 89 exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET); 89 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 94 static void exynos_lpass_disable(struct exynos_lpass *lpass)
+4 -1
drivers/mfd/madera-core.c
··· 15 15 #include <linux/gpio.h> 16 16 #include <linux/mfd/core.h> 17 17 #include <linux/module.h> 18 + #include <linux/mutex.h> 18 19 #include <linux/notifier.h> 19 20 #include <linux/of.h> 20 21 #include <linux/of_gpio.h> ··· 156 155 usleep_range(MADERA_BOOT_POLL_INTERVAL_USEC / 2, 157 156 MADERA_BOOT_POLL_INTERVAL_USEC); 158 157 regmap_read(madera->regmap, MADERA_IRQ1_RAW_STATUS_1, &val); 159 - }; 158 + } 160 159 161 160 if (!(val & MADERA_BOOT_DONE_STS1)) { 162 161 dev_err(madera->dev, "Polling BOOT_DONE_STS timed out\n"); ··· 358 357 359 358 dev_set_drvdata(madera->dev, madera); 360 359 BLOCKING_INIT_NOTIFIER_HEAD(&madera->notifier); 360 + mutex_init(&madera->dapm_ptr_lock); 361 + 361 362 madera_set_micbias_info(madera); 362 363 363 364 /*
+1 -1
drivers/mfd/max77620.c
··· 280 280 281 281 for (fps_id = 0; fps_id < MAX77620_FPS_COUNT; fps_id++) { 282 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 284 break; 285 285 } 286 286
+3 -1
drivers/mfd/mc13xxx-core.c
··· 274 274 275 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 281 adc0 = MC13XXX_ADC0_ADINC1 | MC13XXX_ADC0_ADINC2 | 280 282 MC13XXX_ADC0_CHRGRAWDIV;
+1 -2
drivers/mfd/mt6397-core.c
··· 329 329 330 330 default: 331 331 dev_err(&pdev->dev, "unsupported chip: %d\n", id); 332 - ret = -ENODEV; 333 - break; 332 + return -ENODEV; 334 333 } 335 334 336 335 if (ret) {
+4
drivers/mfd/qcom_rpm.c
··· 638 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 645 dev_info(&pdev->dev, "RPM firmware %u.%u.%u\n", fw_version[0], 642 646 fw_version[1], 643 647 fw_version[2]);
+1 -1
drivers/mfd/rave-sp.c
··· 109 109 /** 110 110 * struct rave_sp_checksum - Variant specific checksum implementation details 111 111 * 112 - * @length: Caculated checksum length 112 + * @length: Calculated checksum length 113 113 * @subroutine: Utilized checksum algorithm implementation 114 114 */ 115 115 struct rave_sp_checksum {
+6 -6
drivers/mfd/stmpe.c
··· 1302 1302 pdata->autosleep = (pdata->autosleep_timeout) ? true : false; 1303 1303 1304 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 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 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 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 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 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 1316 pdata->blocks |= STMPE_BLOCK_ROTATOR; 1317 1317 } 1318 1318 }
+3 -2
drivers/mfd/ti_am335x_tscadc.c
··· 264 264 cell->pdata_size = sizeof(tscadc); 265 265 } 266 266 267 - err = mfd_add_devices(&pdev->dev, pdev->id, tscadc->cells, 268 - tscadc->used_cells, NULL, 0, NULL); 267 + err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, 268 + tscadc->cells, tscadc->used_cells, NULL, 269 + 0, NULL); 269 270 if (err < 0) 270 271 goto err_disable_clk; 271 272
+3 -21
drivers/mfd/tps65218.c
··· 235 235 236 236 mutex_init(&tps->tps_lock); 237 237 238 - ret = regmap_add_irq_chip(tps->regmap, tps->irq, 239 - IRQF_ONESHOT, 0, &tps65218_irq_chip, 240 - &tps->irq_data); 238 + ret = devm_regmap_add_irq_chip(&client->dev, tps->regmap, tps->irq, 239 + IRQF_ONESHOT, 0, &tps65218_irq_chip, 240 + &tps->irq_data); 241 241 if (ret < 0) 242 242 return ret; 243 243 ··· 253 253 ARRAY_SIZE(tps65218_cells), NULL, 0, 254 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 256 return ret; 265 - } 266 - 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 257 } 275 258 276 259 static const struct i2c_device_id tps65218_id_table[] = { ··· 268 285 .of_match_table = of_tps65218_match_table, 269 286 }, 270 287 .probe = tps65218_probe, 271 - .remove = tps65218_remove, 272 288 .id_table = tps65218_id_table, 273 289 }; 274 290
+24
drivers/mfd/tps6586x.c
··· 592 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 618 static const struct i2c_device_id tps6586x_id_table[] = { 596 619 { "tps6586x", 0 }, 597 620 { }, ··· 625 602 .driver = { 626 603 .name = "tps6586x", 627 604 .of_match_table = of_match_ptr(tps6586x_of_match), 605 + .pm = &tps6586x_pm_ops, 628 606 }, 629 607 .probe = tps6586x_i2c_probe, 630 608 .remove = tps6586x_i2c_remove,
+2 -2
drivers/mfd/twl-core.c
··· 979 979 * letting it generate the right frequencies for USB, MADC, and 980 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 984 int e = 0; 985 985 ··· 988 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 993 int e = 0; 994 994
+2
drivers/mfd/wm5110-tables.c
··· 1618 1618 { 0x00000ECD, 0x0000 }, /* R3789 - HPLPF4_2 */ 1619 1619 { 0x00000EE0, 0x0000 }, /* R3808 - ASRC_ENABLE */ 1620 1620 { 0x00000EE2, 0x0000 }, /* R3810 - ASRC_RATE1 */ 1621 + { 0x00000EE3, 0x4000 }, /* R3811 - ASRC_RATE2 */ 1621 1622 { 0x00000EF0, 0x0000 }, /* R3824 - ISRC 1 CTRL 1 */ 1622 1623 { 0x00000EF1, 0x0000 }, /* R3825 - ISRC 1 CTRL 2 */ 1623 1624 { 0x00000EF2, 0x0000 }, /* R3826 - ISRC 1 CTRL 3 */ ··· 2870 2869 case ARIZONA_ASRC_ENABLE: 2871 2870 case ARIZONA_ASRC_STATUS: 2872 2871 case ARIZONA_ASRC_RATE1: 2872 + case ARIZONA_ASRC_RATE2: 2873 2873 case ARIZONA_ISRC_1_CTRL_1: 2874 2874 case ARIZONA_ISRC_1_CTRL_2: 2875 2875 case ARIZONA_ISRC_1_CTRL_3:
+94
include/linux/mfd/cros_ec_commands.h
··· 2791 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 2888 /* System commands */ 2795 2889 2796 2890 /*
+1 -1
include/linux/mfd/ingenic-tcu.h
··· 41 41 #define TCU_TCSR_PRESCALE_LSB 3 42 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 45 #define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */ 46 46 #define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */ 47 47
+7
include/linux/mfd/madera/core.h
··· 15 15 #include <linux/gpio/consumer.h> 16 16 #include <linux/interrupt.h> 17 17 #include <linux/mfd/madera/pdata.h> 18 + #include <linux/mutex.h> 18 19 #include <linux/notifier.h> 19 20 #include <linux/regmap.h> 20 21 #include <linux/regulator/consumer.h> ··· 37 36 #define CS47L90_NUM_GPIOS 38 38 37 39 38 #define MADERA_MAX_MICBIAS 4 39 + 40 + #define MADERA_MAX_HP_OUTPUT 3 40 41 41 42 /* Notifier events */ 42 43 #define MADERA_NOTIFY_VOICE_TRIGGER 0x1 ··· 186 183 unsigned int num_childbias[MADERA_MAX_MICBIAS]; 187 184 188 185 struct snd_soc_dapm_context *dapm; 186 + struct mutex dapm_ptr_lock; 187 + unsigned int hp_ena; 188 + bool out_clamp[MADERA_MAX_HP_OUTPUT]; 189 + bool out_shorted[MADERA_MAX_HP_OUTPUT]; 189 190 190 191 struct blocking_notifier_head notifier; 191 192 };
+4
include/linux/mfd/ti_am335x_tscadc.h
··· 78 78 #define STEPCONFIG_YNN BIT(8) 79 79 #define STEPCONFIG_XNP BIT(9) 80 80 #define STEPCONFIG_YPN BIT(10) 81 + #define STEPCONFIG_RFP(val) ((val) << 12) 82 + #define STEPCONFIG_RFP_VREFP (0x3 << 12) 81 83 #define STEPCONFIG_INM_MASK (0xF << 15) 82 84 #define STEPCONFIG_INM(val) ((val) << 15) 83 85 #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) ··· 88 86 #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) 89 87 #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) 90 88 #define STEPCONFIG_FIFO1 BIT(26) 89 + #define STEPCONFIG_RFM(val) ((val) << 23) 90 + #define STEPCONFIG_RFM_VREFN (0x3 << 23) 91 91 92 92 /* Delay register */ 93 93 #define STEPDELAY_OPEN_MASK (0x3FFFF << 0)
+1 -1
include/linux/mfd/tmio.h
··· 79 79 /* Some controllers have a CBSY bit */ 80 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 83 #define TMIO_MMC_HAVE_4TAP_HS400 BIT(13) 84 84 85 85 int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);