summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'mfd-for-linus-4.5' of ↵Linus Torvalds2016-01-1450-805/+2143
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Device Support: - Add support for s2mps15; sec-core - Add support for Lewisburg; lpc_ich - Add support for cs47l24 and wm1831; arizona New Functionality: - Allow user to select syscon register width; syscon Fix-ups: - Lots of Checkpatch fixes - Rename -pmic/-regulator; s2mps11 - Build driver components into a single module; wm8994-* - Better handing of IRQ during suspend/resume; as3722 - Constify things; da903x - Remove unused code; ab8500-core - Improve error handing; qcom_rpm - Simplify code: wm831x-otp, sta2x11-mfd - Improve locking; cros_ec_spi - Fix incorrect DT binding filename reference; arizona, palmas, snps-dwapb-gpio, wm8994 Bug Fixes: - Fix broken SYSFS 'show ID' call; wm831x-otp - Protect reads from non-existent registers; qcom-spmi-pmic - Repair build warnings; as3722 - Fix IRQ request ordering; arizona-irq - Ensure return value is boolean; ucb1x00-core, tps65010, tc6393xb, htc-egpio, dm355evm_msp, asic3" * tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (58 commits) mfd: davinci_voicecodec: Remove pointless 'out of memory' error message mfd: da9052-irq: Fix trivial 'space before comma' error mfd: da9052-i2c: Fix tabbing/whitespace issue mfd: da903x: Fix white space and split string issues mfd: cs5535-mfd: Add missing line spacing and make local array static mfd: cros_ec_spi: Repair comparison ordering issue mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue. mfd: asic3: Fix a plethora of Checkpatch errors and warnings mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings mfd: arizona-i2c: Add blank line formatting after declaration mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead mfd: adp5520: Some trivial 'no space before tab' fixes mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting mfd: ab8500-core: Fix many warnings reported by Checkpatch mfd: ab2100-otp: Remove pointless 'out of memory' error message mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch mfd: aat2870-core: Remove unnecessary 'out of memory' message mfd: 88pm860x-core: Fix commenting and declaration spacing ...
| * mfd: davinci_voicecodec: Remove pointless 'out of memory' error messageLee Jones2016-01-141-4/+1
| | | | | | | | | | | | | | | | | | | | WARNING: Possible unnecessary 'out of memory' message + if (!davinci_vc) { + dev_dbg(&pdev->dev, total: 0 errors, 1 warnings, 154 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: da9052-irq: Fix trivial 'space before comma' errorLee Jones2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | ERROR: space prohibited before that ',' (ctx:WxW) + da9052_free_irq(da9052, DA9052_IRQ_ADC_EOM , da9052); total: 1 errors, 0 warnings, 290 lines checked Cc: Support Opensource <support.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: da9052-i2c: Fix tabbing/whitespace issueLee Jones2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | WARNING: suspect code indent for conditional statements (8, 24) + if (!i2c_safe_reg(reg)) + return regmap_read(da9052->regmap, total: 0 errors, 1 warnings, 226 lines checked Cc: Support Opensource <support.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: da903x: Fix white space and split string issuesLee Jones2016-01-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, let's also match the MODULE_LICENSE with the header. WARNING: please, no space before tabs + * ^IMike Rapoport <mike@compulab.co.il>$ WARNING: please, no space before tabs + * ^IEric Miao <eric.miao@marvell.com>$ WARNING: quoted string split across lines +MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>" + "Mike Rapoport <mike@compulab.co.il>"); total: 0 errors, 3 warnings, 574 lines checked Cc: Support Opensource <support.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: cs5535-mfd: Add missing line spacing and make local array staticLee Jones2016-01-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: Missing a blank line after declarations + struct resource *res; + res = platform_get_resource(pdev, IORESOURCE_IO, 0); WARNING: char * array declaration might be better as static const + const char *acpi_clones[] = { "olpc-xo1-pm-acpi", "olpc-xo1-sci-acpi" }; total: 0 errors, 2 warnings, 192 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: cros_ec_spi: Repair comparison ordering issueLee Jones2016-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | WARNING: Comparisons should place the constant on the right side of the test + BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size); WARNING: Comparisons should place the constant on the right side of the test + BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size); total: 0 errors, 2 warnings, 731 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue.Lee Jones2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ERROR: code indent should use tabs where possible + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$ WARNING: please, no space before tabs + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$ WARNING: please, no spaces at the start of a line + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$ total: 1 errors, 2 warnings, 366 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: asic3: Fix a plethora of Checkpatch errors and warningsLee Jones2016-01-141-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ERROR: Macros with complex values should be enclosed in parentheses +#define INIT_CDEX(_name, _rate) \ + [ASIC3_CLOCK_##_name] = { \ + .cdex = CLOCK_CDEX_##_name, \ + .rate = _rate, \ + } WARNING: line over 80 characters + ASIC3_GPIO_INT_STATUS); WARNING: void function return statements are not generally useful + return; +} WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: line over 80 characters + asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) + WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then p r_err(... to printk(KERN_ERR ... + printk(KERN_ERR "kzalloc failed\n"); WARNING: Possible unnecessary 'out of memory' message + if (asic == NULL) { + printk(KERN_ERR "kzalloc failed\n"); WARNING: Missing a blank line after declarations + int retval = 0; + retval = platform_driver_probe(&asic3_device_driver, asic3_probe); total: 1 errors, 13 warnings, 1081 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: as3711: Repair OOM and 'line over 80 chars' formatting warningsLee Jones2016-01-141-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: Possible unnecessary 'out of memory' message + if (!pdata) { + dev_err(&client->dev, "Failed to allocate pdata\n"); WARNING: Possible unnecessary 'out of memory' message + if (!as3711) { + dev_err(&client->dev, "Memory allocation failed\n"); WARNING: line over 80 characters + dev_err(&client->dev, "regmap initialization failed: %d\n", ret); WARNING: line over 80 characters + /* We can reuse as3711_subdevs[], it will be copied in mfd_add_devices() */ WARNING: line over 80 characters + as3711_subdevs[AS3711_REGULATOR].platform_data = &pdata->regulator; WARNING: line over 80 characters + as3711_subdevs[AS3711_REGULATOR].pdata_size = sizeof(pdata->regulator); WARNING: line over 80 characters + as3711_subdevs[AS3711_BACKLIGHT].platform_data = &pdata->backlight; WARNING: line over 80 characters + as3711_subdevs[AS3711_BACKLIGHT].pdata_size = sizeof(pdata->backlight); total: 0 errors, 8 warnings, 236 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: arizona-i2c: Add blank line formatting after declarationLee Jones2016-01-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | WARNING: Missing a blank line after declarations + struct arizona *arizona = dev_get_drvdata(&i2c->dev); + arizona_dev_exit(arizona); total: 0 errors, 1 warnings, 120 lines checked Cc: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: arizona-core: msleep() is unreliable for anything <20ms use ↵Lee Jones2016-01-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usleep_range() instead WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(5); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); total: 0 errors, 4 warnings, 1407 lines checked Cc: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: adp5520: Some trivial 'no space before tab' fixesLee Jones2016-01-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: please, no space before tabs + * ^IMike Rapoport <mike@compulab.co.il>$ WARNING: please, no space before tabs + * ^IEric Miao <eric.miao@marvell.com>$ WARNING: please, no space before tabs +^I.id_table ^I= adp5520_id,$ total: 0 errors, 3 warnings, 365 lines checked Cc: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issuesLee Jones2016-01-141-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: char * array declaration might be better as static const + static char *pss[] = {"ab8500_ac", "pm2301", "ab8500_usb"}; WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... + printk(KERN_INFO WARNING: quoted string split across lines + "Charger \"%s\" is connected with known battery." + " Rebooting.\n", WARNING: quoted string split across lines + "unable to set sysClkReq%dRfClkBuf: " + "%d\n", j + 1, ret); total: 0 errors, 4 warnings, 199 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one errorLee Jones2016-01-141-72/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: line over 80 characters +#define ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ib t*/ WARNING: line over 80 characters +#define ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat*/ WARNING: suspect code indent for conditional statements (16, 20) + if (!strcmp(name, dev_name(gpadc->dev))) + return gpadc; WARNING: suspect code indent for conditional statements (0, 16) +if (ad_value < 0) { + dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n", WARNING: quoted string split across lines + dev_err(gpadc->dev, "GPADC to voltage conversion failed ch:" + " %d AD: 0x%x\n", channel, ad_value); WARNING: Missing a blank line after declarations + int raw_data; + raw_data = ab8500_gpadc_double_read_raw(gpadc, channel, WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(10); ERROR: else should follow close brace '}' + } + else WARNING: line over 80 characters + delay_max = 10000; /* large range to optimise sleep mode */ WARNING: line over 80 characters + gpadc->cal_data[ADC_INPUT_IBAT].gain = V_gain * V2A_gain; WARNING: line over 80 characters + gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL); WARNING: Possible unnecessary 'out of memory' message + if (!gpadc) { + dev_err(&pdev->dev, "Error: No memory\n"); WARNING: space prohibited before semicolon + return ; WARNING: void function return statements are not generally useful + return ; +} WARNING: quoted string split across lines +MODULE_AUTHOR("Arun R Murthy, Daniel Willerud, Johan Palsson," + "M'boumba Cedric Madianga"); total: 1 errors, 14 warnings, 1089 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formattingLee Jones2016-01-141-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: Block comments use a trailing */ on a separate line + * not be accessed from here */ WARNING: Block comments use a trailing */ on a separate line + * not be accessed from here */ WARNING: Block comments use a trailing */ on a separate line + * the output is wanted in any case */ WARNING: Consecutive strings are generally better as a single string + " addr=0x%08X, mask=0x%X, shift=%d" "value=0x%X\n", total: 0 errors, 4 warnings, 3331 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab8500-core: Fix many warnings reported by CheckpatchLee Jones2016-01-141-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: Block comments use a trailing */ on a separate line + * */ WARNING: Block comments use a trailing */ on a separate line + * bank on higher 8 bits and reg in lower */ WARNING: Block comments use a trailing */ on a separate line + * bank on higher 8 bits and reg in lower */ WARNING: suspect code indent for conditional statements (8, 24) + if (unlikely(*offset == 17)) + *offset = 24; WARNING: suspect code indent for conditional statements (8, 24) + if (unlikely(*offset == 16)) + *offset = 25; WARNING: suspect code indent for conditional statements (8, 24) + if ((i == 3) && (*offset >= 24)) + *offset += 2; WARNING: ENOSYS means 'invalid syscall nr' and nothing else + return -ENOSYS; WARNING: static const char * array should probably be static const char * const + static const char *switch_off_status[] = { WARNING: static const char * array should probably be static const char * const + static const char *turn_on_status[] = { total: 0 errors, 9 warnings, 1867 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab2100-otp: Remove pointless 'out of memory' error messageLee Jones2016-01-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | WARNING: Possible unnecessary 'out of memory' message + if (!otp) { + dev_err(&pdev->dev, "could not allocate AB3100 OTP device\n"); total: 0 errors, 1 warnings, 250 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab3100-core.c: Fix multiple warnings reported by CheckpatchLee Jones2016-01-141-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: Missing a blank line after declarations + struct ab3100 *ab3100 = dev_get_drvdata(dev->parent); + if (!ab3100->startup_events_read) WARNING: Possible unnecessary 'out of memory' message + if (!ab3100) { + dev_err(&client->dev, "could not allocate AB3100 device\n"); WARNING: else is not generally useful after a break or return + break; + } else { total: 0 errors, 3 warnings, 996 lines checked Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: aat2870-core: Remove unnecessary 'out of memory' messageLee Jones2016-01-141-4/+1
| | | | | | | | | | | | | | | | | | | | WARNING: Possible unnecessary 'out of memory' message + if (!aat2870) { + dev_err(&client->dev, total: 0 errors, 1 warnings, 524 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: 88pm860x-core: Fix commenting and declaration spacingLee Jones2016-01-141-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checkpatch output: WARNING: Block comments use a trailing */ on a separate line + * - turn off */ WARNING: Missing a blank line after declarations + int ret; + ret = i2c_add_driver(&pm860x_driver); total: 0 errors, 2 warnings, 1283 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: Use to_i2c_client() instead of open-coding itGeliang Tang2016-01-1410-24/+24
| | | | | | | | | | Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: asic3: Be sure to clamp return valueLinus Walleij2016-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: dm355evm_mps: Be sure to clamp return valueLinus Walleij2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: htc-egpio: Be sure to clamp return valueLinus Walleij2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: tc6393xb: Be sure to clamp return valueLinus Walleij2016-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: tps65010: Be sure to clamp return valueLinus Walleij2016-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. This also start to propagate the negative error code from the smbus call if there is one, as the last commit of this series will make the gpiolib core deal with that properly. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ucb1x00-core: Be sure to clamp return valueLinus Walleij2016-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | As we want gpio_chip .get() calls to be able to return negative error codes and propagate to drivers, we need to go over all drivers and make sure their return values are clamped to [0,1]. We do this by using the ret = !!(val) design pattern. Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: arizona: Add device tree binding to specify mono outputsCharles Keepax2016-01-111-0/+10
| | | | | | | | | | | | | | | | | | | | Add device tree bindings to support specifying outputs from the chip as mono outputs. Whilst we are doing it change the out_mono pdata from a bool to an int, because Sparse gets upset about using ARRAY_SIZE on bools. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: da9063: Allow modular buildGeert Uytterhoeven2016-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | Allow support for the DA9063 PMIC to be modular, cfr. DA9062, which allows to decrease size of multi-platform kernels (e.g. multi_v7_defconfig). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: arizona: Request parent IRQ before we request child IRQsCharles Keepax2016-01-111-30/+27
| | | | | | | | | | | | | | | | | | | | | | Currently the driver requests the boot done and control interface IRQs before it has requested its own IRQ line. This can cause problems on edge triggered IRQ systems as if an edge occurs before the parent IRQ is enabled it will be missed. Whilst we are changing the error handling remove an unused label as well. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: as3722: Mark PM functions as __maybe_unusedArnd Bergmann2016-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly introduced as3722_i2c_suspend/resume functions are built unconditionally, but only used when power management is enabled, so we get a warning otherwise: drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function] drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function] This marks them both as __maybe_unused, which avoids an ugly #ifdef and gives us best compile-time coverage. When they are unused, the compiler will silently drop the functions from its output. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 35deff7eb212 ("mfd: as3722: Handle interrupts on suspend") Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: sta2x11: Use platform_register/unregister_drivers()Thierry Reding2016-01-111-26/+10
| | | | | | | | | | | | | | | | | | These new helpers simplify implementing multi-driver modules and properly handle failure to register one driver by unregistering all previously registered drivers. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: qcom-spmi-pmic: Don't access non-existing registersIvan T. Ivanov2016-01-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | Revision ID registers are available only on devices with Slave IDs that are even, so don't make access to unavailable registers. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> [sboyd@codeaurora.org: Consider all slave ids that are even] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: wm831x: Fix broken wm831x_unique_id_showRasmus Villemoes2016-01-111-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | wm831x_unique_id_show currently displays an interesting pattern of '0' and '3' characters which isn't very useful (figuring out why is left as an exercise for the reader). Presumably "buf[i]" should have been "id[i] & 0xff". But while there, it is much simpler to simply use %phN and do all the formatting at once. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: syscon: Add a DT property to set value widthDamien Riegel2016-01-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently syscon has a fixed configuration of 32 bits for register and values widths. In some cases, it would be desirable to be able to customize the value width. For example, certain boards (like the ones manufactured by Technologic Systems) have a FPGA that is memory-mapped, but its registers are only 16-bit wide. This patch adds an optional "reg-io-width" DT binding for syscon that allows to change the width for the data bus (i.e. val_bits). If this property is provided, it will also set the register stride to reg-io-width's value. If not provided, the default configuration is used. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: wm5110: Correct defaults for micbias control registersCharles Keepax2016-01-111-3/+3
| | | | | | | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: cros ec: Lock the SPI bus while holding chipselectNicolas Boichat2016-01-111-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cros_ec_cmd_xfer_spi and cros_ec_pkt_xfer_spi generally work like this: - Pull CS down (active), wait a bit, then send a command - Wait for response (multiple requests) - Wait a while, pull CS up (inactive) These operations, individually, lock the SPI bus, but there is nothing preventing the SPI framework from interleaving messages intended for other devices as the bus is unlocked in between. This is a problem as the EC expects CS to be held low for the whole duration. Solution: Lock the SPI bus during the whole transaction, to make sure that no other messages can be interleaved. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: arizona: Support Cirrus Logic CS47L24 and WM1831Richard Fitzgerald2015-12-047-25/+1750
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the regmap configuration tables and core MFD handling for the CS47L24 and WM1831 codecs. Note that compared to the other Arizona codecs, these devices do not have an LDO1 or micsupp regulators, extcon driver, or the DCVDD isolation control. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: qcom_rpm: Fix a possible NULL dereferenceLABBE Corentin2015-12-041-0/+2
| | | | | | | | | | | | | | | | of_match_device could return NULL, and so cause a NULL pointer dereference later. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab8500: Delete static IRQ resourcesLinus Walleij2015-12-041-482/+0
| | | | | | | | | | | | | | | | | | | | The platforms that use the AB8500 define all IRQ resources in the device tree and they are automatically populated by matching the .of_compatible string. These static resources are just surplus baggage these days. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: da903x: Constify da903x_chip_ops structureJulia Lawall2015-12-041-2/+2
| | | | | | | | | | | | | | | | | | | | The da903x_chip_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: mc13xxx-core: Use of_property_read_bool()Saurabh Sengar2015-12-041-4/+4
| | | | | | | | | | | | | | | | For checking if a property is present or not, use of_property_read_bool instead of of_get_property() Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: as3722: Handle interrupts on suspendJon Hunter2015-12-041-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The as3722 device is registered as an irqchip and the as3722-rtc interrupt is one of it's interrupt sources. When using the as3722-rtc as a wake-up device from suspend, the following is seen: PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.001 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. Suspending console(s) (use no_console_suspend to debug) PM: suspend of devices complete after 161.119 msecs PM: late suspend of devices complete after 1.048 msecs PM: noirq suspend of devices complete after 0.756 msecs Disabling non-boot CPUs ... CPU1: shutdown CPU2: shutdown CPU3: shutdown Entering suspend state LP1 Enabling non-boot CPUs ... CPU1 is up CPU2 is up CPU3 is up PM: noirq resume of devices complete after 0.487 msecs as3722 4-0040: Failed to read IRQ status: -16 as3722 4-0040: Failed to read IRQ status: -16 as3722 4-0040: Failed to read IRQ status: -16 as3722 4-0040: Failed to read IRQ status: -16 ... The reason why the as3722 interrupt status cannot be read is because the as3722 interrupt is not masked during suspend and when the as3722-rtc interrupt occurs, to wake-up the device, the interrupt is seen before the i2c controller has been resumed in order to read the as3722 interrupt status. The as3722-rtc driver sets it's interrupt as a wake-up source during suspend, which gets propagated to the parent as3722 interrupt. However, the as3722-rtc driver cannot disable it's interrupt during suspend otherwise we would never be woken up and so the as3722 must disable it's interrupt instead. Fix this by disabling the as3722 interrupt during suspend. To ensure that a wake-up event from the as3722 is not missing, enable the as3722 interrupt as a wake-up source before disabling the interrupt on entering suspend. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: wm8994: Ensure that the whole MFD is built into a single moduleCharles Keepax2015-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MFD part of wm8994 consists of three files wm8994-core.c, wm8994-irq.c and wm8994-regmap.c only wm8994-core.c has a MODULE_DESCRIPTION / LICENSE. These were clearly intended to be built as a single module, but currently are not. This will lead to a tainted kernel when loading modules for wm8894-irq.c and wm8994-regmap.c because are missing a license. This patch fixes this issue by grouping the three files together into a single module. Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: sec-core: Rename MFD and regulator names differentlyAlim Akhtar2015-11-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently S2MPSXX multifunction device is named as *-pmic, and these MFDs also supports regulator as a one of its MFD cell which has the same name, because current name is confusing and we want to sort it out. We did discussed different approaches about how the MFD and it cells need to be named here [1]. Based in the discussion this patch rename MFD regulator name as *-regulator instead of current *-pmic. This patch also changes the corresponding entries in the regulator driver to keep git-bisect happy. [1]-> https://lkml.org/lkml/2015/10/28/417 Suggested-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: lpc_ich: Intel device IDs for PCHAlexandra Yates2015-11-241-0/+15
| | | | | | | | | | | | | | | | Adding Intel codename Lewisburg platform device IDs for PCH. Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: sec: Add support for S2MPS15 PMICThomas Abraham2015-11-232-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for S2MPS15 PMIC which is similar to S2MPS11 PMIC. The S2MPS15 PMIC supports 27 LDO regulators, 10 buck regulators, RTC, three 32.768KHz clock outputs and battery charger. This patch adds initial support for LDO and buck regulators of S2MPS15 device. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> [Alim: Added s2mps15_devs like rtc and clk and related changes] Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | Merge tag 'pm+acpi-4.5-rc1-1' of ↵Linus Torvalds2016-01-125-14/+74
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull oower management and ACPI updates from Rafael Wysocki: "As far as the number of commits goes, ACPICA takes the lead this time, followed by cpufreq and the device properties framework changes. The most significant new feature is the debugfs-based interface to the ACPICA's AML debugger added in the previous cycle and a new user space tool for accessing it. On the cpufreq front, the core is updated to handle governors more efficiently, particularly on systems where a single cpufreq policy object is shared between multiple CPUs, and there are quite a few changes in drivers (intel_pstate, cpufreq-dt etc). The device properties framework is updated to handle built-in (ie included in the kernel itself) device properties better, among other things by adding a fallback mechanism that will allow drivers to provide default properties to be used in case the plaform firmware doesn't provide the properties expected by them. The Operating Performance Points (OPP) framework gets new DT bindings and debugfs support. A new cpufreq driver for ST platforms is added and the ACPI driver for AMD SoCs will now support the APM X-Gene ACPI I2C device. The rest is mostly fixes and cleanups all over. Specifics: - Add a debugfs-based interface for interacting with the ACPICA's AML debugger introduced in the previous cycle and a new user space tool for that, fix some bugs related to the AML debugger and clean up the code in question (Lv Zheng, Dan Carpenter, Colin Ian King, Markus Elfring). - Update ACPICA to upstream revision 20151218 including a number of fixes and cleanups in the ACPICA core (Bob Moore, Lv Zheng, Labbe Corentin, Prarit Bhargava, Colin Ian King, David E Box, Rafael Wysocki). In particular, the previously added erroneous support for the _SUB object is dropped, the concatenate operator will support all ACPI objects now, the Debug Object handling is improved, the SuperName handling of parameters being control methods is fixed, the ObjectType operator handling is updated to follow ACPI 5.0A and the handling of CondRefOf and RefOf is updated accordingly, module- level code will be executed after loading each ACPI table now (instead of being run once after all tables containing AML have been loaded), the Operation Region handlers management is updated to fix some reported problems and a the ACPICA code in the kernel is more in line with the upstream now. - Update the ACPI backlight driver to provide information on whether or not it will generate key-presses for brightness change hotkeys and update some platform drivers (dell-wmi, thinkpad_acpi) to use that information to avoid sending double key-events to users pace for these, add new ACPI backlight quirks (Hans de Goede, Aaron Lu, Adrien Schildknecht). - Improve the ACPI handling of interrupt GPIOs (Christophe Ricard). - Fix the handling of the list of device IDs of device objects found in the ACPI namespace and add a helper for checking if there is a device object for a given device ID (Lukas Wunner). - Change the logic in the ACPI namespace scanning code to create struct acpi_device objects for all ACPI device objects found in the namespace even if _STA fails for them which helps to avoid device enumeration problems on Microsoft Surface 3 (Aaron Lu). - Add support for the APM X-Gene ACPI I2C device to the ACPI driver for AMD SoCs (Loc Ho). - Fix the long-standing issue with the DMA controller on Intel SoCs where ACPI tables have no power management support for the DMA controller itself, but it can be powered off automatically when the last (other) device on the SoC is powered off via ACPI and clean up the ACPI driver for Intel SoCs (acpi-lpss) after previous attempts to fix that problem (Andy Shevchenko). - Assorted ACPI fixes and cleanups (Andy Lutomirski, Colin Ian King, Javier Martinez Canillas, Ken Xue, Mathias Krause, Rafael Wysocki, Sinan Kaya). - Update the device properties framework for better handling of built-in properties, add support for built-in properties to the platform bus type, update the MFD subsystem's handling of device properties and add support for passing default configuration data as device properties to the intel-lpss MFD drivers, convert the designware I2C driver to use the unified device properties API and add a fallback mechanism for using default built-in properties if the platform firmware fails to provide the properties as expected by drivers (Andy Shevchenko, Mika Westerberg, Heikki Krogerus, Andrew Morton). - Add new Device Tree bindings to the Operating Performance Points (OPP) framework and update the exynos4412 DT binding accordingly, introduce debugfs support for the OPP framework (Viresh Kumar, Bartlomiej Zolnierkiewicz). - Migrate the mt8173 cpufreq driver to the new OPP bindings (Pi-Cheng Chen). - Update the cpufreq core to make the handling of governors more efficient, especially on systems where policy objects are shared between multiple CPUs (Viresh Kumar, Rafael Wysocki). - Fix cpufreq governor handling on configurations with CONFIG_HZ_PERIODIC set (Chen Yu). - Clean up the cpufreq core code related to the boost sysfs knob support and update the ACPI cpufreq driver accordingly (Rafael Wysocki). - Add a new cpufreq driver for ST platforms and corresponding Device Tree bindings (Lee Jones). - Update the intel_pstate driver to allow the P-state selection algorithm used by it to depend on the CPU ID of the processor it is running on, make it use a special P-state selection algorithm (with an IO wait time compensation tweak) on Atom CPUs based on the Airmont and Silvermont cores so as to reduce their energy consumption and improve intel_pstate documentation (Philippe Longepe, Srinivas Pandruvada). - Update the cpufreq-dt driver to support registering cooling devices that use the (P * V^2 * f) dynamic power draw formula where V is the voltage, f is the frequency and P is a constant coefficient provided by Device Tree and update the arm_big_little cpufreq driver to use that support (Punit Agrawal). - Assorted cpufreq driver (cpufreq-dt, qoriq, pcc-cpufreq, blackfin-cpufreq) updates (Andrzej Hajda, Hongtao Jia, Jacob Tanenbaum, Markus Elfring). - cpuidle core tweaks related to polling and measured_us calculation (Rik van Riel). - Removal of modularity from a few cpuidle drivers (clps711x, ux500, exynos) that cannot be built as modules in practice (Paul Gortmaker). - PM core update to prevent devices from being probed during system suspend/resume which is generally problematic and may lead to inconsistent behavior (Grygorii Strashko). - Assorted updates of the PM core and related code (Julia Lawall, Manuel Pégourié-Gonnard, Maruthi Bayyavarapu, Rafael Wysocki, Ulf Hansson). - PNP bus type updates (Christophe Le Roy, Heiner Kallweit). - PCI PM code cleanups (Jarkko Nikula, Julia Lawall). - cpupower tool updates (Jacob Tanenbaum, Thomas Renninger)" * tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (177 commits) PM / clk: don't leave clocks enabled when driver not bound i2c: dw: Add APM X-Gene ACPI I2C device support ACPI / APD: Add APM X-Gene ACPI I2C device support ACPI / LPSS: change 'does not have' to 'has' in comment Revert "dmaengine: dw: platform: provide platform data for Intel" dmaengine: dw: return immediately from IRQ when DMA isn't in use dmaengine: dw: platform: power on device on shutdown ACPI / LPSS: override power state for LPSS DMA device PM / OPP: Use snprintf() instead of sprintf() Documentation: cpufreq: intel_pstate: enhance documentation ACPI, PCI, irq: remove redundant check for null string pointer ACPI / video: driver must be registered before checking for keypresses cpufreq-dt: fix handling regulator_get_voltage() result cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC PM / sleep: Add support for read-only sysfs attributes ACPI: Fix white space in a structure definition ACPI / SBS: fix inconsistent indenting inside if statement PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching ACPI / PNP: constify device IDs ACPI / PCI: Simplify acpi_penalize_isa_irq() ...
| * | mfd: intel-lpss: Pass HSUART configuration via propertiesAndy Shevchenko2015-12-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HS-UART host controller driver needs to know certain properties like width of the register set if it cannot get that information from ACPI or DT. In order to support non-ACPI systems we pass this information to the driver via device properties. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
OpenPOWER on IntegriCloud