[alsa-devel] [PATCH 1/6] regulator: helpers: Add regmap set_soft_start helper
Add a helper function regulator_set_soft_start_regmap to allow regmap based regulators to easily enable soft start.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com --- drivers/regulator/helpers.c | 18 ++++++++++++++++++ include/linux/regulator/driver.h | 4 ++++ 2 files changed, 22 insertions(+)
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c index 379cdac..a75e7da 100644 --- a/drivers/regulator/helpers.c +++ b/drivers/regulator/helpers.c @@ -446,6 +446,24 @@ int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable) EXPORT_SYMBOL_GPL(regulator_set_bypass_regmap);
/** + * regulator_set_soft_start_regmap - Default set_soft_start() using regmap + * + * @rdev: device to operate on. + */ +int regulator_set_soft_start_regmap(struct regulator_dev *rdev) +{ + unsigned int val; + + val = rdev->desc->soft_start_val_on; + if (!val) + val = rdev->desc->soft_start_mask; + + return regmap_update_bits(rdev->regmap, rdev->desc->soft_start_reg, + rdev->desc->soft_start_mask, val); +} +EXPORT_SYMBOL_GPL(regulator_set_soft_start_regmap); + +/** * regulator_get_bypass_regmap - Default get_bypass() using regmap * * @rdev: device to operate on. diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index dac8e7b1..7e2e70d 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -345,6 +345,9 @@ struct regulator_desc { unsigned int active_discharge_off; unsigned int active_discharge_mask; unsigned int active_discharge_reg; + unsigned int soft_start_reg; + unsigned int soft_start_mask; + unsigned int soft_start_val_on;
unsigned int enable_time;
@@ -476,6 +479,7 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev, unsigned int new_selector); int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); +int regulator_set_soft_start_regmap(struct regulator_dev *rdev);
int regulator_set_active_discharge_regmap(struct regulator_dev *rdev, bool enable);
Add a helper function regulator_set_pull_down_regmap to allow regmap based regulators to easily enable pull down.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com --- drivers/regulator/helpers.c | 18 ++++++++++++++++++ include/linux/regulator/driver.h | 4 ++++ 2 files changed, 22 insertions(+)
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c index a75e7da..2ae7c3a 100644 --- a/drivers/regulator/helpers.c +++ b/drivers/regulator/helpers.c @@ -464,6 +464,24 @@ int regulator_set_soft_start_regmap(struct regulator_dev *rdev) EXPORT_SYMBOL_GPL(regulator_set_soft_start_regmap);
/** + * regulator_set_pull_down_regmap - Default set_pull_down() using regmap + * + * @rdev: device to operate on. + */ +int regulator_set_pull_down_regmap(struct regulator_dev *rdev) +{ + unsigned int val; + + val = rdev->desc->pull_down_val_on; + if (!val) + val = rdev->desc->pull_down_mask; + + return regmap_update_bits(rdev->regmap, rdev->desc->pull_down_reg, + rdev->desc->pull_down_mask, val); +} +EXPORT_SYMBOL_GPL(regulator_set_pull_down_regmap); + +/** * regulator_get_bypass_regmap - Default get_bypass() using regmap * * @rdev: device to operate on. diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 7e2e70d..97b55b5 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -348,6 +348,9 @@ struct regulator_desc { unsigned int soft_start_reg; unsigned int soft_start_mask; unsigned int soft_start_val_on; + unsigned int pull_down_reg; + unsigned int pull_down_mask; + unsigned int pull_down_val_on;
unsigned int enable_time;
@@ -480,6 +483,7 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev, int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable); int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable); int regulator_set_soft_start_regmap(struct regulator_dev *rdev); +int regulator_set_pull_down_regmap(struct regulator_dev *rdev);
int regulator_set_active_discharge_regmap(struct regulator_dev *rdev, bool enable);
Hi Charles,
[auto build test WARNING on asoc/for-next] [also build test WARNING on v4.11-rc3 next-20170324] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Charles-Keepax/regulator-helpers-Ad... base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next reproduce: make htmldocs
All warnings (new ones prefixed by >>):
include/linux/init.h:1: warning: no structured comments found kernel/sched/core.c:2085: warning: No description found for parameter 'rf' kernel/sched/core.c:2085: warning: Excess function parameter 'cookie' description in 'try_to_wake_up_local' include/linux/kthread.h:26: warning: Excess function parameter '...' description in 'kthread_create' kernel/sys.c:1: warning: no structured comments found include/linux/device.h:969: warning: No description found for parameter 'dma_ops' drivers/dma-buf/seqno-fence.c:1: warning: no structured comments found include/linux/iio/iio.h:597: warning: No description found for parameter 'trig_readonly' include/linux/iio/trigger.h:151: warning: No description found for parameter 'indio_dev' include/linux/iio/trigger.h:151: warning: No description found for parameter 'trig' include/linux/device.h:970: warning: No description found for parameter 'dma_ops' include/linux/regulator/driver.h:361: warning: No description found for parameter 'soft_start_reg' include/linux/regulator/driver.h:361: warning: No description found for parameter 'soft_start_mask' include/linux/regulator/driver.h:361: warning: No description found for parameter 'soft_start_val_on'
include/linux/regulator/driver.h:361: warning: No description found for parameter 'pull_down_reg' include/linux/regulator/driver.h:361: warning: No description found for parameter 'pull_down_mask' include/linux/regulator/driver.h:361: warning: No description found for parameter 'pull_down_val_on'
drivers/regulator/core.c:1467: warning: Excess function parameter 'ret' description in 'regulator_dev_lookup' include/drm/drm_drv.h:438: warning: No description found for parameter 'open' include/drm/drm_drv.h:438: warning: No description found for parameter 'preclose' include/drm/drm_drv.h:438: warning: No description found for parameter 'postclose' include/drm/drm_drv.h:438: warning: No description found for parameter 'lastclose' include/drm/drm_drv.h:438: warning: No description found for parameter 'set_busid' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_handler' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_preinstall' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_postinstall' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_uninstall' include/drm/drm_drv.h:438: warning: No description found for parameter 'debugfs_init' include/drm/drm_drv.h:438: warning: No description found for parameter 'debugfs_cleanup' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_open_object' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_close_object' include/drm/drm_drv.h:438: warning: No description found for parameter 'prime_handle_to_fd' include/drm/drm_drv.h:438: warning: No description found for parameter 'prime_fd_to_handle' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_export' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_import' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_pin' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_unpin' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_res_obj' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_get_sg_table' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_import_sg_table' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_vmap' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_vunmap' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_mmap' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_vm_ops' include/drm/drm_drv.h:438: warning: No description found for parameter 'major' include/drm/drm_drv.h:438: warning: No description found for parameter 'minor' include/drm/drm_drv.h:438: warning: No description found for parameter 'patchlevel' include/drm/drm_drv.h:438: warning: No description found for parameter 'name' include/drm/drm_drv.h:438: warning: No description found for parameter 'desc' include/drm/drm_drv.h:438: warning: No description found for parameter 'date' include/drm/drm_drv.h:438: warning: No description found for parameter 'driver_features' include/drm/drm_drv.h:438: warning: No description found for parameter 'ioctls' include/drm/drm_drv.h:438: warning: No description found for parameter 'num_ioctls' include/drm/drm_drv.h:438: warning: No description found for parameter 'fops' include/drm/drm_color_mgmt.h:1: warning: no structured comments found drivers/gpu/drm/drm_fb_cma_helper.c:557: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init' drivers/gpu/drm/drm_fb_cma_helper.c:558: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init' drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'pipe' drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'dp_output' drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'link_rate' drivers/gpu/drm/i915/intel_lpe_audio.c:343: warning: No description found for parameter 'pipe' drivers/gpu/drm/i915/intel_lpe_audio.c:343: warning: No description found for parameter 'dp_output' drivers/gpu/drm/i915/intel_lpe_audio.c:343: warning: No description found for parameter 'link_rate' drivers/media/dvb-core/dvb_frontend.h:677: warning: No description found for parameter 'refcount' Documentation/core-api/assoc_array.rst:13: WARNING: Enumerated list ends without a blank line; unexpected unindent. Documentation/doc-guide/sphinx.rst:110: ERROR: Unknown target name: "sphinx c domain". kernel/sched/fair.c:7616: WARNING: Inline emphasis start-string without end-string. kernel/time/timer.c:1200: ERROR: Unexpected indentation. kernel/time/timer.c:1202: ERROR: Unexpected indentation. kernel/time/timer.c:1203: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/wait.h:122: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/wait.h:125: ERROR: Unexpected indentation. include/linux/wait.h:127: WARNING: Block quote ends without a blank line; unexpected unindent. kernel/time/hrtimer.c:990: WARNING: Block quote ends without a blank line; unexpected unindent. kernel/signal.c:322: WARNING: Inline literal start-string without end-string. include/linux/iio/iio.h:219: ERROR: Unexpected indentation. include/linux/iio/iio.h:220: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/iio/iio.h:226: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/iio/industrialio-core.c:639: ERROR: Unknown target name: "iio_val". drivers/iio/industrialio-core.c:646: ERROR: Unknown target name: "iio_val". drivers/message/fusion/mptbase.c:5051: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/tty/serial/serial_core.c:1898: WARNING: Definition list ends without a blank line; unexpected unindent. include/linux/regulator/driver.h:271: ERROR: Unknown target name: "regulator_regmap_x_voltage". include/linux/spi/spi.h:369: ERROR: Unexpected indentation. drivers/usb/core/message.c:478: ERROR: Unexpected indentation. drivers/usb/core/message.c:479: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_type". Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_dir". Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_recip". Documentation/driver-api/usb.rst:689: ERROR: Unknown target name: "usbdevfs_urb_type". sound/soc/soc-core.c:2670: ERROR: Unknown target name: "snd_soc_daifmt". sound/core/jack.c:312: ERROR: Unknown target name: "snd_jack_btn". WARNING: dvipng command 'dvipng' cannot be run (needed for math display), check the imgmath_dvipng setting
vim +/pull_down_reg +361 include/linux/regulator/driver.h
354794da Laxman Dewangan 2016-03-02 345 unsigned int active_discharge_off; 354794da Laxman Dewangan 2016-03-02 346 unsigned int active_discharge_mask; 354794da Laxman Dewangan 2016-03-02 347 unsigned int active_discharge_reg; 8b45dea6 Charles Keepax 2017-03-21 348 unsigned int soft_start_reg; 8b45dea6 Charles Keepax 2017-03-21 349 unsigned int soft_start_mask; 8b45dea6 Charles Keepax 2017-03-21 350 unsigned int soft_start_val_on; ce32c8a0 Charles Keepax 2017-03-21 351 unsigned int pull_down_reg; ce32c8a0 Charles Keepax 2017-03-21 352 unsigned int pull_down_mask; ce32c8a0 Charles Keepax 2017-03-21 353 unsigned int pull_down_val_on; 79511ed3 Mark Brown 2012-06-27 354 79511ed3 Mark Brown 2012-06-27 355 unsigned int enable_time; 871f5650 Guodong Xu 2014-08-13 356 871f5650 Guodong Xu 2014-08-13 357 unsigned int off_on_delay; 87e1e0f2 Javier Martinez Canillas 2014-11-10 358 87e1e0f2 Javier Martinez Canillas 2014-11-10 359 unsigned int (*of_map_mode)(unsigned int mode); 571a354b Liam Girdwood 2008-04-30 360 }; 571a354b Liam Girdwood 2008-04-30 @361 c172708d Mark Brown 2012-04-04 362 /** c172708d Mark Brown 2012-04-04 363 * struct regulator_config - Dynamic regulator descriptor c172708d Mark Brown 2012-04-04 364 * c172708d Mark Brown 2012-04-04 365 * Each regulator registered with the core is described with a c172708d Mark Brown 2012-04-04 366 * structure of this type and a struct regulator_desc. This structure c172708d Mark Brown 2012-04-04 367 * contains the runtime variable parts of the regulator description. c172708d Mark Brown 2012-04-04 368 * c172708d Mark Brown 2012-04-04 369 * @dev: struct device for the regulator
:::::: The code at line 361 was first introduced by commit :::::: 571a354b1542a274d88617e1f6703f3fe7a517f1 regulator: regulator driver interface
:::::: TO: Liam Girdwood lg@opensource.wolfsonmicro.com :::::: CC: Liam Girdwood lg@opensource.wolfsonmicro.com
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Add a driver for controlling the micbias regulators on the Arizona class audio CODECs. This will replace earlier fixed support that initialised the micbias's with fixed settings from platform data, although that platform data can still be used to configure the constraints on this new regulator.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com --- drivers/regulator/Makefile | 2 +- drivers/regulator/arizona-micbias.c | 227 ++++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 drivers/regulator/arizona-micbias.c
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index ef7725e..b670e87 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -19,7 +19,7 @@ obj-$(CONFIG_REGULATOR_ACT8865) += act8865-regulator.o obj-$(CONFIG_REGULATOR_ACT8945A) += act8945a-regulator.o obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o -obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o +obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o arizona-micbias.o obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o diff --git a/drivers/regulator/arizona-micbias.c b/drivers/regulator/arizona-micbias.c new file mode 100644 index 0000000..4a361186 --- /dev/null +++ b/drivers/regulator/arizona-micbias.c @@ -0,0 +1,227 @@ +/* + * arizona-micbias.c -- Microphone bias supplies for Arizona devices + * + * Copyright 2017 Cirrus Logic Inc. + * + * Author: Charles Keepax ckeepax@opensource.wolfsonmicro.com + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/init.h> +#include <linux/bitops.h> +#include <linux/err.h> +#include <linux/platform_device.h> +#include <linux/regulator/driver.h> +#include <linux/regulator/machine.h> +#include <linux/regulator/of_regulator.h> +#include <linux/slab.h> +#include <sound/soc.h> + +#include <linux/mfd/arizona/core.h> +#include <linux/mfd/arizona/pdata.h> +#include <linux/mfd/arizona/registers.h> + +#define ARIZONA_MICBIAS_MAX_NAME 10 +#define ARIZONA_MICBIAS_MAX_SELECTOR 0xD + +struct arizona_micbias_priv { + int id; + char name[ARIZONA_MICBIAS_MAX_NAME]; + + struct regulator_dev *regulator; + struct arizona *arizona; + + struct regulator_consumer_supply supply; + struct regulator_init_data *init_data; + struct regulator_desc desc; +}; + +static const struct regulator_ops arizona_micbias_ops = { + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, + .is_enabled = regulator_is_enabled_regmap, + .list_voltage = regulator_list_voltage_linear, + .map_voltage = regulator_map_voltage_linear, + .get_voltage_sel = regulator_get_voltage_sel_regmap, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .get_bypass = regulator_get_bypass_regmap, + .set_bypass = regulator_set_bypass_regmap, + .set_soft_start = regulator_set_soft_start_regmap, + .set_pull_down = regulator_set_pull_down_regmap, +}; + +static const struct regulator_desc arizona_micbias_desc_tmpl = { + .supply_name = "MICVDD", + .type = REGULATOR_VOLTAGE, + .ops = &arizona_micbias_ops, + + .min_uV = 1500000, + .uV_step = 100000, + .n_voltages = ARIZONA_MICBIAS_MAX_SELECTOR + 1, + + .vsel_reg = ARIZONA_MIC_BIAS_CTRL_1, + .vsel_mask = ARIZONA_MICB1_LVL_MASK, + .enable_reg = ARIZONA_MIC_BIAS_CTRL_1, + .enable_mask = ARIZONA_MICB1_ENA, + .bypass_reg = ARIZONA_MIC_BIAS_CTRL_1, + .bypass_mask = ARIZONA_MICB1_BYPASS, + .soft_start_reg = ARIZONA_MIC_BIAS_CTRL_1, + .soft_start_mask = ARIZONA_MICB1_RATE, + .pull_down_reg = ARIZONA_MIC_BIAS_CTRL_1, + .pull_down_mask = ARIZONA_MICB1_DISCH, + + .owner = THIS_MODULE, +}; + +static const struct regulator_init_data arizona_micbias_tmpl = { + .constraints = { + .valid_ops_mask = REGULATOR_CHANGE_STATUS | + REGULATOR_CHANGE_VOLTAGE | + REGULATOR_CHANGE_BYPASS, + .min_uV = 1500000, + .max_uV = 2800000, + }, +}; + +static int arizona_micbias_of_get_pdata(struct regulator_config *config) +{ + struct arizona_micbias_priv *micbias = config->driver_data; + struct arizona *arizona = micbias->arizona; + struct arizona_micbias *pdata = &arizona->pdata.micbias[micbias->id]; + struct device_node *np; + + np = of_get_child_by_name(arizona->dev->of_node, micbias->name); + if (np) { + config->of_node = np; + + micbias->init_data = of_get_regulator_init_data(arizona->dev, + np, + &micbias->desc); + + pdata->ext_cap = of_property_read_bool(np, "wlf,ext-cap"); + } + + return 0; +} + +static int arizona_micbias_probe(struct platform_device *pdev) +{ + struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); + int id = pdev->id; + struct arizona_micbias *pdata = &arizona->pdata.micbias[id]; + struct arizona_micbias_priv *micbias; + struct regulator_config config = { }; + struct regulation_constraints *constraints; + unsigned int val; + int ret; + + micbias = devm_kzalloc(&pdev->dev, sizeof(*micbias), GFP_KERNEL); + if (micbias == NULL) + return -ENOMEM; + + micbias->arizona = arizona; + micbias->id = id; + snprintf(micbias->name, sizeof(micbias->name), "MICBIAS%d", id + 1); + + micbias->desc = arizona_micbias_desc_tmpl; + micbias->desc.name = micbias->name; + micbias->desc.vsel_reg += id; + micbias->desc.enable_reg += id; + micbias->desc.bypass_reg += id; + micbias->desc.soft_start_reg += id; + micbias->desc.pull_down_reg += id; + + micbias->supply.supply = micbias->name; + micbias->supply.dev_name = dev_name(arizona->dev); + + config.dev = arizona->dev; + config.regmap = arizona->regmap; + config.driver_data = micbias; + + if (IS_ENABLED(CONFIG_OF)) { + if (!dev_get_platdata(arizona->dev)) { + ret = arizona_micbias_of_get_pdata(&config); + if (ret < 0) + return ret; + } + } + + if (!micbias->init_data) { + micbias->init_data = devm_kmemdup(&pdev->dev, + &arizona_micbias_tmpl, + sizeof(arizona_micbias_tmpl), + GFP_KERNEL); + if (!micbias->init_data) + return -ENOMEM; + } + + micbias->init_data->consumer_supplies = &micbias->supply; + micbias->init_data->num_consumer_supplies = 1; + + config.init_data = micbias->init_data; + constraints = &micbias->init_data->constraints; + + if (pdata->mV) { + constraints->min_uV = pdata->mV * 1000; + constraints->max_uV = pdata->mV * 1000; + } + + if (pdata->soft_start) + constraints->soft_start = true; + + if (pdata->bypass) + constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS; + + if (pdata->discharge) + constraints->pull_down = true; + + if (pdata->ext_cap) + val = ARIZONA_MICB1_EXT_CAP; + else + val = 0; + + /* + * The core expects the regulator to have pull_down (discharge) and + * bypass disabled by default so clear those here, whilst we set the + * external cap. + */ + regmap_update_bits(arizona->regmap, ARIZONA_MIC_BIAS_CTRL_1 + id, + ARIZONA_MICB1_EXT_CAP | ARIZONA_MICB1_DISCH | + ARIZONA_MICB1_BYPASS, val); + + micbias->regulator = devm_regulator_register(&pdev->dev, + &micbias->desc, + &config); + + of_node_put(config.of_node); + + if (IS_ERR(micbias->regulator)) { + ret = PTR_ERR(micbias->regulator); + dev_err(arizona->dev, "Failed to register %s supply: %d\n", + micbias->name, ret); + return ret; + } + + return 0; +} + +static struct platform_driver arizona_micbias_driver = { + .probe = arizona_micbias_probe, + .driver = { + .name = "arizona-micbias", + }, +}; + +module_platform_driver(arizona_micbias_driver); + +/* Module information */ +MODULE_AUTHOR("Charles Keepax ckeepax@opensource.wolfsonmicro.com"); +MODULE_DESCRIPTION("Arizona microphone bias supply driver"); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:arizona-micbias");
Add the new micbias regulators into the Arizona regulator binding document.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com --- Documentation/devicetree/bindings/regulator/arizona-regulator.txt | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/arizona-regulator.txt b/Documentation/devicetree/bindings/regulator/arizona-regulator.txt index 443564d..68a13d5 100644 --- a/Documentation/devicetree/bindings/regulator/arizona-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/arizona-regulator.txt @@ -15,3 +15,9 @@ Optional subnodes: Documentation/devicetree/bindings/regulator/regulator.txt - micvdd : Initial data for the MICVDD regulator, as covered in Documentation/devicetree/bindings/regulator/regulator.txt + + - MICBIASx : Initial data for the MICBIAS regulators, as covered in + Documentation/devicetree/bindings/regulator/regulator.txt but the + following additional properties are also supported: + - wlf,ext-cap : Specifies if the MICBIAS has external decoupling + capacitors attached.
On Tue, Mar 21, 2017 at 02:45:37PM +0000, Charles Keepax wrote:
Add the new micbias regulators into the Arizona regulator binding document.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Documentation/devicetree/bindings/regulator/arizona-regulator.txt | 6 ++++++ 1 file changed, 6 insertions(+)
Acked-by: Rob Herring robh@kernel.org
Add mfd_cell's for each of the new micbias regulators, provide the appropriate supply mapping for these, and remove the old code that configured the micbiases now that the regulator driver does so.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com --- drivers/mfd/arizona-core.c | 56 ++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 34 deletions(-)
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index b6d4bc6..e7eba5d 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -936,10 +936,16 @@ static const char * const wm5102_supplies[] = { "CPVDD", "SPKVDDL", "SPKVDDR", + "MICBIAS1", + "MICBIAS2", + "MICBIAS3", };
static const struct mfd_cell wm5102_devs[] = { { .name = "arizona-micsupp" }, + { .name = "arizona-micbias", .id = 1 }, + { .name = "arizona-micbias", .id = 2 }, + { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon", @@ -957,6 +963,9 @@ static const struct mfd_cell wm5102_devs[] = {
static const struct mfd_cell wm5110_devs[] = { { .name = "arizona-micsupp" }, + { .name = "arizona-micbias", .id = 1 }, + { .name = "arizona-micbias", .id = 2 }, + { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon", @@ -976,9 +985,13 @@ static const char * const cs47l24_supplies[] = { "MICVDD", "CPVDD", "SPKVDD", + "MICBIAS1", + "MICBIAS2", };
static const struct mfd_cell cs47l24_devs[] = { + { .name = "arizona-micbias", .id = 1 }, + { .name = "arizona-micbias", .id = 2 }, { .name = "arizona-gpio" }, { .name = "arizona-haptics" }, { .name = "arizona-pwm" }, @@ -994,10 +1007,16 @@ static const char * const wm8997_supplies[] = { "DBVDD2", "CPVDD", "SPKVDD", + "MICBIAS1", + "MICBIAS2", + "MICBIAS3", };
static const struct mfd_cell wm8997_devs[] = { { .name = "arizona-micsupp" }, + { .name = "arizona-micbias", .id = 1 }, + { .name = "arizona-micbias", .id = 2 }, + { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon", @@ -1015,6 +1034,9 @@ static const struct mfd_cell wm8997_devs[] = {
static const struct mfd_cell wm8998_devs[] = { { .name = "arizona-micsupp" }, + { .name = "arizona-micbias", .id = 1 }, + { .name = "arizona-micbias", .id = 2 }, + { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon", @@ -1404,40 +1426,6 @@ int arizona_dev_init(struct arizona *arizona) goto err_reset; }
- for (i = 0; i < ARIZONA_MAX_MICBIAS; i++) { - if (!arizona->pdata.micbias[i].mV && - !arizona->pdata.micbias[i].bypass) - continue; - - /* Apply default for bypass mode */ - if (!arizona->pdata.micbias[i].mV) - arizona->pdata.micbias[i].mV = 2800; - - val = (arizona->pdata.micbias[i].mV - 1500) / 100; - - val <<= ARIZONA_MICB1_LVL_SHIFT; - - if (arizona->pdata.micbias[i].ext_cap) - val |= ARIZONA_MICB1_EXT_CAP; - - if (arizona->pdata.micbias[i].discharge) - val |= ARIZONA_MICB1_DISCH; - - if (arizona->pdata.micbias[i].soft_start) - val |= ARIZONA_MICB1_RATE; - - if (arizona->pdata.micbias[i].bypass) - val |= ARIZONA_MICB1_BYPASS; - - regmap_update_bits(arizona->regmap, - ARIZONA_MIC_BIAS_CTRL_1 + i, - ARIZONA_MICB1_LVL_MASK | - ARIZONA_MICB1_EXT_CAP | - ARIZONA_MICB1_DISCH | - ARIZONA_MICB1_BYPASS | - ARIZONA_MICB1_RATE, val); - } - for (i = 0; i < ARIZONA_MAX_INPUT; i++) { /* Default for both is 0 so noop with defaults */ val = arizona->pdata.dmic_ref[i]
On Tue, 21 Mar 2017, Charles Keepax wrote:
Add mfd_cell's for each of the new micbias regulators, provide the appropriate supply mapping for these, and remove the old code that configured the micbiases now that the regulator driver does so.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
drivers/mfd/arizona-core.c | 56 ++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 34 deletions(-)
Applied, thanks.
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index b6d4bc6..e7eba5d 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -936,10 +936,16 @@ static const char * const wm5102_supplies[] = { "CPVDD", "SPKVDDL", "SPKVDDR",
- "MICBIAS1",
- "MICBIAS2",
- "MICBIAS3",
};
static const struct mfd_cell wm5102_devs[] = { { .name = "arizona-micsupp" },
- { .name = "arizona-micbias", .id = 1 },
- { .name = "arizona-micbias", .id = 2 },
- { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon",
@@ -957,6 +963,9 @@ static const struct mfd_cell wm5102_devs[] = {
static const struct mfd_cell wm5110_devs[] = { { .name = "arizona-micsupp" },
- { .name = "arizona-micbias", .id = 1 },
- { .name = "arizona-micbias", .id = 2 },
- { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon",
@@ -976,9 +985,13 @@ static const char * const cs47l24_supplies[] = { "MICVDD", "CPVDD", "SPKVDD",
- "MICBIAS1",
- "MICBIAS2",
};
static const struct mfd_cell cs47l24_devs[] = {
- { .name = "arizona-micbias", .id = 1 },
- { .name = "arizona-micbias", .id = 2 }, { .name = "arizona-gpio" }, { .name = "arizona-haptics" }, { .name = "arizona-pwm" },
@@ -994,10 +1007,16 @@ static const char * const wm8997_supplies[] = { "DBVDD2", "CPVDD", "SPKVDD",
- "MICBIAS1",
- "MICBIAS2",
- "MICBIAS3",
};
static const struct mfd_cell wm8997_devs[] = { { .name = "arizona-micsupp" },
- { .name = "arizona-micbias", .id = 1 },
- { .name = "arizona-micbias", .id = 2 },
- { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon",
@@ -1015,6 +1034,9 @@ static const struct mfd_cell wm8997_devs[] = {
static const struct mfd_cell wm8998_devs[] = { { .name = "arizona-micsupp" },
- { .name = "arizona-micbias", .id = 1 },
- { .name = "arizona-micbias", .id = 2 },
- { .name = "arizona-micbias", .id = 3 }, { .name = "arizona-gpio" }, { .name = "arizona-extcon",
@@ -1404,40 +1426,6 @@ int arizona_dev_init(struct arizona *arizona) goto err_reset; }
- for (i = 0; i < ARIZONA_MAX_MICBIAS; i++) {
if (!arizona->pdata.micbias[i].mV &&
!arizona->pdata.micbias[i].bypass)
continue;
/* Apply default for bypass mode */
if (!arizona->pdata.micbias[i].mV)
arizona->pdata.micbias[i].mV = 2800;
val = (arizona->pdata.micbias[i].mV - 1500) / 100;
val <<= ARIZONA_MICB1_LVL_SHIFT;
if (arizona->pdata.micbias[i].ext_cap)
val |= ARIZONA_MICB1_EXT_CAP;
if (arizona->pdata.micbias[i].discharge)
val |= ARIZONA_MICB1_DISCH;
if (arizona->pdata.micbias[i].soft_start)
val |= ARIZONA_MICB1_RATE;
if (arizona->pdata.micbias[i].bypass)
val |= ARIZONA_MICB1_BYPASS;
regmap_update_bits(arizona->regmap,
ARIZONA_MIC_BIAS_CTRL_1 + i,
ARIZONA_MICB1_LVL_MASK |
ARIZONA_MICB1_EXT_CAP |
ARIZONA_MICB1_DISCH |
ARIZONA_MICB1_BYPASS |
ARIZONA_MICB1_RATE, val);
- }
- for (i = 0; i < ARIZONA_MAX_INPUT; i++) { /* Default for both is 0 so noop with defaults */ val = arizona->pdata.dmic_ref[i]
Change the widgets from the old SND_SOC_DAPM_SUPPLY widgets into SND_SOC_DAPM_REGULATOR_SUPPLY widgets now that we have proper regulator support for the micbiases.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com --- sound/soc/codecs/cs47l24.c | 6 ++---- sound/soc/codecs/wm5102.c | 9 +++------ sound/soc/codecs/wm5110.c | 9 +++------ sound/soc/codecs/wm8997.c | 9 +++------ sound/soc/codecs/wm8998.c | 9 +++------ 5 files changed, 14 insertions(+), 28 deletions(-)
diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index 47e6fdd..c5dc322 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -386,10 +386,8 @@ SND_SOC_DAPM_PGA_E("IN2R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2R_ENA_SHIFT, SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
-SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS1", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS2", 0, SND_SOC_DAPM_REGULATOR_BYPASS),
SND_SOC_DAPM_PGA("Noise Generator", ARIZONA_COMFORT_NOISE_GENERATOR, ARIZONA_NOISE_GEN_ENA_SHIFT, 0, NULL, 0), diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 1fe358e..2a817f8 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -1137,12 +1137,9 @@ SND_SOC_DAPM_PGA_E("IN3R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN3R_ENA_SHIFT, SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
-SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2, - ARIZONA_MICB2_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS3", ARIZONA_MIC_BIAS_CTRL_3, - ARIZONA_MICB3_ENA_SHIFT, 0, NULL, 0), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS1", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS2", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS3", 0, SND_SOC_DAPM_REGULATOR_BYPASS),
SND_SOC_DAPM_PGA("Noise Generator", ARIZONA_COMFORT_NOISE_GENERATOR, ARIZONA_NOISE_GEN_ENA_SHIFT, 0, NULL, 0), diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 1bc9421..57f3b41 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -1157,12 +1157,9 @@ SND_SOC_DAPM_PGA_E("IN4R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN4R_ENA_SHIFT, SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
-SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS3", ARIZONA_MIC_BIAS_CTRL_3, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS1", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS2", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS3", 0, SND_SOC_DAPM_REGULATOR_BYPASS),
SND_SOC_DAPM_PGA("Noise Generator", ARIZONA_COMFORT_NOISE_GENERATOR, ARIZONA_NOISE_GEN_ENA_SHIFT, 0, NULL, 0), diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index 49401a8..455d88a 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -452,12 +452,9 @@ SND_SOC_DAPM_PGA_E("IN2R PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2R_ENA_SHIFT, SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
-SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2, - ARIZONA_MICB2_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS3", ARIZONA_MIC_BIAS_CTRL_3, - ARIZONA_MICB3_ENA_SHIFT, 0, NULL, 0), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS1", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS2", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS3", 0, SND_SOC_DAPM_REGULATOR_BYPASS),
SND_SOC_DAPM_PGA("Noise Generator", ARIZONA_COMFORT_NOISE_GENERATOR, ARIZONA_NOISE_GEN_ENA_SHIFT, 0, NULL, 0), diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 44f4471..a5e87ba 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -587,12 +587,9 @@ SND_SOC_DAPM_PGA_E("IN2 PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN2L_ENA_SHIFT, SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
-SND_SOC_DAPM_SUPPLY("MICBIAS1", ARIZONA_MIC_BIAS_CTRL_1, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS2", ARIZONA_MIC_BIAS_CTRL_2, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), -SND_SOC_DAPM_SUPPLY("MICBIAS3", ARIZONA_MIC_BIAS_CTRL_3, - ARIZONA_MICB1_ENA_SHIFT, 0, NULL, 0), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS1", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS2", 0, SND_SOC_DAPM_REGULATOR_BYPASS), +SND_SOC_DAPM_REGULATOR_SUPPLY("MICBIAS3", 0, SND_SOC_DAPM_REGULATOR_BYPASS),
SND_SOC_DAPM_PGA("Tone Generator 1", ARIZONA_TONE_GENERATOR_1, ARIZONA_TONE1_ENA_SHIFT, 0, NULL, 0),
On Tue, Mar 21, 2017 at 02:45:34PM +0000, Charles Keepax wrote:
Add a helper function regulator_set_soft_start_regmap to allow regmap based regulators to easily enable soft start.
Signed-off-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
drivers/regulator/helpers.c | 18 ++++++++++++++++++ include/linux/regulator/driver.h | 4 ++++ 2 files changed, 22 insertions(+)
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c index 379cdac..a75e7da 100644 --- a/drivers/regulator/helpers.c +++ b/drivers/regulator/helpers.c @@ -446,6 +446,24 @@ int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable) EXPORT_SYMBOL_GPL(regulator_set_bypass_regmap);
/**
- regulator_set_soft_start_regmap - Default set_soft_start() using regmap
- @rdev: device to operate on.
- */
+int regulator_set_soft_start_regmap(struct regulator_dev *rdev) +{
- unsigned int val;
- val = rdev->desc->soft_start_val_on;
- if (!val)
val = rdev->desc->soft_start_mask;
- return regmap_update_bits(rdev->regmap, rdev->desc->soft_start_reg,
rdev->desc->soft_start_mask, val);
+} +EXPORT_SYMBOL_GPL(regulator_set_soft_start_regmap);
Apologies there are some small bugs here let me respin the series.
Thanks, Charles
Hi Charles,
[auto build test WARNING on asoc/for-next] [also build test WARNING on v4.11-rc3 next-20170324] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Charles-Keepax/regulator-helpers-Ad... base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next reproduce: make htmldocs
All warnings (new ones prefixed by >>):
include/linux/init.h:1: warning: no structured comments found kernel/sched/core.c:2085: warning: No description found for parameter 'rf' kernel/sched/core.c:2085: warning: Excess function parameter 'cookie' description in 'try_to_wake_up_local' include/linux/kthread.h:26: warning: Excess function parameter '...' description in 'kthread_create' kernel/sys.c:1: warning: no structured comments found include/linux/device.h:969: warning: No description found for parameter 'dma_ops' drivers/dma-buf/seqno-fence.c:1: warning: no structured comments found include/linux/iio/iio.h:597: warning: No description found for parameter 'trig_readonly' include/linux/iio/trigger.h:151: warning: No description found for parameter 'indio_dev' include/linux/iio/trigger.h:151: warning: No description found for parameter 'trig' include/linux/device.h:970: warning: No description found for parameter 'dma_ops'
include/linux/regulator/driver.h:358: warning: No description found for parameter 'soft_start_reg' include/linux/regulator/driver.h:358: warning: No description found for parameter 'soft_start_mask' include/linux/regulator/driver.h:358: warning: No description found for parameter 'soft_start_val_on'
drivers/regulator/core.c:1467: warning: Excess function parameter 'ret' description in 'regulator_dev_lookup' include/drm/drm_drv.h:438: warning: No description found for parameter 'open' include/drm/drm_drv.h:438: warning: No description found for parameter 'preclose' include/drm/drm_drv.h:438: warning: No description found for parameter 'postclose' include/drm/drm_drv.h:438: warning: No description found for parameter 'lastclose' include/drm/drm_drv.h:438: warning: No description found for parameter 'set_busid' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_handler' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_preinstall' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_postinstall' include/drm/drm_drv.h:438: warning: No description found for parameter 'irq_uninstall' include/drm/drm_drv.h:438: warning: No description found for parameter 'debugfs_init' include/drm/drm_drv.h:438: warning: No description found for parameter 'debugfs_cleanup' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_open_object' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_close_object' include/drm/drm_drv.h:438: warning: No description found for parameter 'prime_handle_to_fd' include/drm/drm_drv.h:438: warning: No description found for parameter 'prime_fd_to_handle' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_export' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_import' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_pin' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_unpin' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_res_obj' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_get_sg_table' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_import_sg_table' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_vmap' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_vunmap' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_prime_mmap' include/drm/drm_drv.h:438: warning: No description found for parameter 'gem_vm_ops' include/drm/drm_drv.h:438: warning: No description found for parameter 'major' include/drm/drm_drv.h:438: warning: No description found for parameter 'minor' include/drm/drm_drv.h:438: warning: No description found for parameter 'patchlevel' include/drm/drm_drv.h:438: warning: No description found for parameter 'name' include/drm/drm_drv.h:438: warning: No description found for parameter 'desc' include/drm/drm_drv.h:438: warning: No description found for parameter 'date' include/drm/drm_drv.h:438: warning: No description found for parameter 'driver_features' include/drm/drm_drv.h:438: warning: No description found for parameter 'ioctls' include/drm/drm_drv.h:438: warning: No description found for parameter 'num_ioctls' include/drm/drm_drv.h:438: warning: No description found for parameter 'fops' include/drm/drm_color_mgmt.h:1: warning: no structured comments found drivers/gpu/drm/drm_fb_cma_helper.c:557: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init' drivers/gpu/drm/drm_fb_cma_helper.c:558: warning: Excess function parameter 'num_crtc' description in 'drm_fbdev_cma_init' drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'pipe' drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'dp_output' drivers/gpu/drm/i915/intel_lpe_audio.c:342: warning: No description found for parameter 'link_rate' drivers/gpu/drm/i915/intel_lpe_audio.c:343: warning: No description found for parameter 'pipe' drivers/gpu/drm/i915/intel_lpe_audio.c:343: warning: No description found for parameter 'dp_output' drivers/gpu/drm/i915/intel_lpe_audio.c:343: warning: No description found for parameter 'link_rate' drivers/media/dvb-core/dvb_frontend.h:677: warning: No description found for parameter 'refcount' Documentation/core-api/assoc_array.rst:13: WARNING: Enumerated list ends without a blank line; unexpected unindent. Documentation/doc-guide/sphinx.rst:110: ERROR: Unknown target name: "sphinx c domain". kernel/sched/fair.c:7616: WARNING: Inline emphasis start-string without end-string. kernel/time/timer.c:1200: ERROR: Unexpected indentation. kernel/time/timer.c:1202: ERROR: Unexpected indentation. kernel/time/timer.c:1203: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/wait.h:122: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/wait.h:125: ERROR: Unexpected indentation. include/linux/wait.h:127: WARNING: Block quote ends without a blank line; unexpected unindent. kernel/time/hrtimer.c:990: WARNING: Block quote ends without a blank line; unexpected unindent. kernel/signal.c:322: WARNING: Inline literal start-string without end-string. include/linux/iio/iio.h:219: ERROR: Unexpected indentation. include/linux/iio/iio.h:220: WARNING: Block quote ends without a blank line; unexpected unindent. include/linux/iio/iio.h:226: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/iio/industrialio-core.c:639: ERROR: Unknown target name: "iio_val". drivers/iio/industrialio-core.c:646: ERROR: Unknown target name: "iio_val". drivers/message/fusion/mptbase.c:5051: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/tty/serial/serial_core.c:1898: WARNING: Definition list ends without a blank line; unexpected unindent. include/linux/regulator/driver.h:271: ERROR: Unknown target name: "regulator_regmap_x_voltage". include/linux/spi/spi.h:369: ERROR: Unexpected indentation. drivers/usb/core/message.c:478: ERROR: Unexpected indentation. drivers/usb/core/message.c:479: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_type". Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_dir". Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_recip". Documentation/driver-api/usb.rst:689: ERROR: Unknown target name: "usbdevfs_urb_type". sound/soc/soc-core.c:2670: ERROR: Unknown target name: "snd_soc_daifmt". sound/core/jack.c:312: ERROR: Unknown target name: "snd_jack_btn". WARNING: dvipng command 'dvipng' cannot be run (needed for math display), check the imgmath_dvipng setting
vim +/soft_start_reg +358 include/linux/regulator/driver.h
ca5d1b35 Carlo Caione 2014-03-05 342 unsigned int bypass_val_on; ca5d1b35 Carlo Caione 2014-03-05 343 unsigned int bypass_val_off; 354794da Laxman Dewangan 2016-03-02 344 unsigned int active_discharge_on; 354794da Laxman Dewangan 2016-03-02 345 unsigned int active_discharge_off; 354794da Laxman Dewangan 2016-03-02 346 unsigned int active_discharge_mask; 354794da Laxman Dewangan 2016-03-02 347 unsigned int active_discharge_reg; 8b45dea6 Charles Keepax 2017-03-21 348 unsigned int soft_start_reg; 8b45dea6 Charles Keepax 2017-03-21 349 unsigned int soft_start_mask; 8b45dea6 Charles Keepax 2017-03-21 350 unsigned int soft_start_val_on; 79511ed3 Mark Brown 2012-06-27 351 79511ed3 Mark Brown 2012-06-27 352 unsigned int enable_time; 871f5650 Guodong Xu 2014-08-13 353 871f5650 Guodong Xu 2014-08-13 354 unsigned int off_on_delay; 87e1e0f2 Javier Martinez Canillas 2014-11-10 355 87e1e0f2 Javier Martinez Canillas 2014-11-10 356 unsigned int (*of_map_mode)(unsigned int mode); 571a354b Liam Girdwood 2008-04-30 357 }; 571a354b Liam Girdwood 2008-04-30 @358 c172708d Mark Brown 2012-04-04 359 /** c172708d Mark Brown 2012-04-04 360 * struct regulator_config - Dynamic regulator descriptor c172708d Mark Brown 2012-04-04 361 * c172708d Mark Brown 2012-04-04 362 * Each regulator registered with the core is described with a c172708d Mark Brown 2012-04-04 363 * structure of this type and a struct regulator_desc. This structure c172708d Mark Brown 2012-04-04 364 * contains the runtime variable parts of the regulator description. c172708d Mark Brown 2012-04-04 365 * c172708d Mark Brown 2012-04-04 366 * @dev: struct device for the regulator
:::::: The code at line 358 was first introduced by commit :::::: 571a354b1542a274d88617e1f6703f3fe7a517f1 regulator: regulator driver interface
:::::: TO: Liam Girdwood lg@opensource.wolfsonmicro.com :::::: CC: Liam Girdwood lg@opensource.wolfsonmicro.com
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
participants (4)
-
Charles Keepax
-
kbuild test robot
-
Lee Jones
-
Rob Herring