]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agomfd: max8925-core: Fix 'missing blank line after declarations' warning
Lee Jones [Mon, 21 Jul 2014 13:16:23 +0000 (14:16 +0100)]
mfd: max8925-core: Fix 'missing blank line after declarations' warning

This is part of an effort to clean-up the MFD subsystem.

WARNING: Missing a blank line after declarations
+       struct max8925_chip *chip = irq_data_get_irq_chip_data(data);
+       max8925_irqs[data->irq - chip->irq_base].enable

WARNING: Missing a blank line after declarations
+       struct max8925_chip *chip = irq_data_get_irq_chip_data(data);
+       max8925_irqs[data->irq - chip->irq_base].enable = 0;

total: 0 errors, 2 warnings, 927 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: twl4030-irq: Fix style warnings relating to pr_warn() and sizeof()
Lee Jones [Mon, 21 Jul 2014 13:05:24 +0000 (14:05 +0100)]
mfd: twl4030-irq: Fix style warnings relating to pr_warn() and sizeof()

This is part of an effort to clean-up the MFD subsystem.

WARNING: Prefer pr_warn(... to pr_warning(...
+               pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret);

WARNING: sizeof buf should be sizeof(buf)
+       memset(buf, 0xff, sizeof buf);

WARNING: sizeof *agent should be sizeof(*agent)
+       agent = kzalloc(sizeof *agent, GFP_KERNEL);

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: lp8788-irq: Fix 'missing blank line after declarations' warning
Lee Jones [Mon, 21 Jul 2014 12:44:01 +0000 (13:44 +0100)]
mfd: lp8788-irq: Fix 'missing blank line after declarations' warning

This is part of an effort to clean-up the MFD subsystem.

WARNING: Missing a blank line after declarations
+       struct lp8788_irq_data *irqd = irq_data_get_irq_chip_data(data);
+       irqd->enabled[data->hwirq] = 1;

WARNING: Missing a blank line after declarations
+       struct lp8788_irq_data *irqd = irq_data_get_irq_chip_data(data);
+       irqd->enabled[data->hwirq] = 0;

total: 0 errors, 2 warnings, 198 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: ezx-pcap: Repair coding style errors picked up with checkpatch
Lee Jones [Fri, 25 Jul 2014 14:31:02 +0000 (15:31 +0100)]
mfd: ezx-pcap: Repair coding style errors picked up with checkpatch

This is part of an effort to clean-up the MFD subsystem.

WARNING: sizeof t should be sizeof(t)
+       memset(&t, 0, sizeof t);

WARNING: void function return statements are not generally useful
+       return;
+}

total: 0 errors, 2 warnings, 542 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: twl6040: Fix 'insert space after ','', error
Lee Jones [Mon, 21 Jul 2014 12:13:48 +0000 (13:13 +0100)]
mfd: twl6040: Fix 'insert space after ','', error

This is part of an effort to clean-up the MFD subsystem.

ERROR: space required after that ',' (ctx:VxO)
+                                 0, &twl6040_irq_chip,&twl6040->irq_data);
                                                      ^

ERROR: space required before that '&' (ctx:OxV)
+                                 0, &twl6040_irq_chip,&twl6040->irq_data);
                                                       ^

total: 2 errors, 0 warnings, 816 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: sec-core: Fix 'missing blank line after declarations' warning
Lee Jones [Mon, 21 Jul 2014 12:09:25 +0000 (13:09 +0100)]
mfd: sec-core: Fix 'missing blank line after declarations' warning

This is part of an effort to clean-up the MFD subsystem.

WARNING: Missing a blank line after declarations
+               const struct of_device_id *match;
+               match = of_match_node(sec_dt_match, i2c->dev.of_node);

total: 0 errors, 1 warnings, 494 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: dm355evm_msp: Fix checkpatch error: insert space after ','
Lee Jones [Mon, 21 Jul 2014 12:06:42 +0000 (13:06 +0100)]
mfd: dm355evm_msp: Fix checkpatch error: insert space after ','

This is part of an effort to clean-up the MFD subsystem.

ERROR: space required after that ',' (ctx:VxV)
+#define MSP_GPIO(bit,reg)      ((DM355EVM_MSP_ ## reg) << 3 | (bit))
                     ^

total: 1 errors, 0 warnings, 437 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: wm8350-irq: Fix 'line over 80 chars' warning
Lee Jones [Mon, 21 Jul 2014 11:57:25 +0000 (12:57 +0100)]
mfd: wm8350-irq: Fix 'line over 80 chars' warning

This is part of an effort to clean-up the MFD subsystem.

WARNING: line over 80 characters
+       wm8350->irq_base = irq_alloc_descs(irq_base, 0, ARRAY_SIZE(wm8350_irqs), 0);

total: 0 errors, 1 warnings, 552 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: mcp-core: Fix 'blank line after declarations' warning
Lee Jones [Mon, 21 Jul 2014 11:53:56 +0000 (12:53 +0100)]
mfd: mcp-core: Fix 'blank line after declarations' warning

This is part of an effort to clean-up the MFD subsystem.

WARNING: Missing a blank line after declarations
+       unsigned long flags;
+       spin_lock_irqsave(&mcp->lock, flags);

total: 0 errors, 1 warnings, 238 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max8925-i2c: Fix 'blank line after declarations' warning
Lee Jones [Mon, 21 Jul 2014 11:18:21 +0000 (12:18 +0100)]
mfd: max8925-i2c: Fix 'blank line after declarations' warning

This is part of an effort to clean-up the MFD subsystem.

WARNING: Missing a blank line after declarations
+       int ret;
+       ret = i2c_add_driver(&max8925_driver);

total: 0 errors, 1 warnings, 275 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Fix 'line over 80 chars' warning
Lee Jones [Mon, 21 Jul 2014 11:15:55 +0000 (12:15 +0100)]
mfd: max77686: Fix 'line over 80 chars' warning

This is part of an effort to clean-up the MFD subsystem.

+WARNING: line over 80 characters
+                                      &max77686_rtc_regmap_config);

total: 0 errors, 1 warnings, 299 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Remove unneeded OOM error message
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:10 +0000 (22:24 +0200)]
mfd: max77686: Remove unneeded OOM error message

There is no need to print out-of-memory errors since this is already
done by the memory management subsystem which even calls dump_stack().

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Make error checking consistent
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:09 +0000 (22:24 +0200)]
mfd: max77686: Make error checking consistent

Error checking across the driver is mostly consistent besides
a few exceptions, so change these exceptions for consistency.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Return correct error when pdata isn't found
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:08 +0000 (22:24 +0200)]
mfd: max77686: Return correct error when pdata isn't found

When platform data is not found an -EIO (I/O error) code is returned.
This doesn't seem to be the correct error so better return -EINVAL
(Invalid argument) which is what most drivers do in this case.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Make platform data over-rule DT
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:07 +0000 (22:24 +0200)]
mfd: max77686: Make platform data over-rule DT

The function max77802_i2c_parse_dt_pdata() should only be called
if there isn't already platform data for the device.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Don't define dummy function if OF isn't enabled
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:06 +0000 (22:24 +0200)]
mfd: max77686: Don't define dummy function if OF isn't enabled

When the CONFIG_OF option was not enabled, a dummy function
max77686_i2c_parse_dt_pdata() was defined since this is called
unconditionally on probe(). Just always define the real function
and conditionally call it if CONFIG_OF is enabled instead.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Add power management support
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:05 +0000 (22:24 +0200)]
mfd: max77686: Add power management support

The driver doesn't have PM operations defined so add a suspend
and resume function handlers to allow the PMIC IRQ to wakeup
the system when it is put into a sleep state.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: max77686: Convert to use regmap_irq
Javier Martinez Canillas [Fri, 4 Jul 2014 20:24:04 +0000 (22:24 +0200)]
mfd: max77686: Convert to use regmap_irq

By using the generic IRQ support in the Register map API, it
is possible to get rid max77686-irq.c and simplify the code.

Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: sun6i-prcm: Add support for Allwinner A23 PRCM
Chen-Yu Tsai [Wed, 9 Jul 2014 07:54:36 +0000 (15:54 +0800)]
mfd: sun6i-prcm: Add support for Allwinner A23 PRCM

The Allwinner A23 SoC has a PRCM unit like the previous A31 SoC.
The differences are the AR100 clock can no longer be modified,
the APB0 clock has different divisors, and some clock gates are
gone.

This patch adds a compatible with a modified subdevice list for
the A23.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: ab8500-debugfs: BIG clean-up
Lee Jones [Mon, 14 Jul 2014 17:29:16 +0000 (18:29 +0100)]
mfd: ab8500-debugfs: BIG clean-up

When checkpatch is run on ab8500-debugfs.c it screamed blue murder!

This patch fixes up all of the errors/warnings reported:

WARNING: line over 80 characters
+ err = seq_printf(s, "  [0x%02X/0x%02X]: 0x%02X\n",

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
+ printk(KERN_INFO" [0x%02X/0x%02X]: 0x%02X\n",

WARNING: Prefer seq_puts to seq_printf
+ seq_printf(s, AB8500_NAME_STRING " register values:\n");

WARNING: Prefer seq_puts to seq_printf
+ seq_printf(s, AB8500_NAME_STRING " register values:\n");

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
+ printk(KERN_INFO"ab8500 register values:\n");

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
+ printk(KERN_INFO" bank 0x%02X:\n", i);

WARNING: externs should be avoided in .c files
+extern int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);

WARNING: quoted string split across lines
+ pr_info("Saving all ABB registers at \"ab8500_complete_register_dump\" "
+ "for crash analyze.\n");

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
+ printk(KERN_ERR "abx500_set_reg failed %d, %d", err, __LINE__);

WARNING: Prefer seq_puts to seq_printf
+ seq_printf(s, "name: number:  number of: wake:\n");

WARNING: line over 80 characters
+ return single_open(file, ab8500_print_modem_registers, inode->i_private);

WARNING: line over 80 characters
+ return single_open(file, ab8500_gpadc_btemp_ball_print, inode->i_private);

WARNING: line over 80 characters
+ return single_open(file, ab8500_gpadc_main_bat_v_print, inode->i_private);

WARNING: line over 80 characters
+ vbat_true_meas_convert = ab8500_gpadc_ad_to_voltage(gpadc, VBAT_TRUE_MEAS,

WARNING: line over 80 characters
+static int ab8540_gpadc_vbat_true_meas_and_ibat_print(struct seq_file *s, void *p)

WARNING: line over 80 characters
+static const struct file_operations ab8540_gpadc_vbat_true_meas_and_ibat_fops = {

WARNING: line over 80 characters
+ vmain_l, vmain_h, btemp_l, btemp_h, vbat_l, vbat_h, ibat_l, ibat_h);

WARNING: quoted string split across lines
+ dev_err(dev, "debugfs error input: "
+ "should be egal to 1, 4, 8 or 16\n");

WARNING: Missing a blank line after declarations
+ char *s = b;
+ if ((*s == '0') && ((*(s+1) == 'x') || (*(s+1) == 'X'))) {

WARNING: simple_strtoul is obsolete, use kstrtoul instead
+ loc.mask = simple_strtoul(b, &b, 0);

WARNING: simple_strtol is obsolete, use kstrtol instead
+ loc.shift = simple_strtol(b, &b, 0);

WARNING: simple_strtoul is obsolete, use kstrtoul instead
+ loc.bank = simple_strtoul(b, &b, 0);

WARNING: simple_strtoul is obsolete, use kstrtoul instead
+ loc.addr = simple_strtoul(b, &b, 0);

WARNING: simple_strtoul is obsolete, use kstrtoul instead
+ val = simple_strtoul(b, &b, 0);

WARNING: quoted string split across lines
+ pr_warn("HWREG request: %s, %s, addr=0x%08X, mask=0x%X, shift=%d"
+ "value=0x%X\n", (write) ? "write" : "read",

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
+ printk(KERN_ERR "sysfs_create_file failed %d\n", err);

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
+ printk(KERN_ERR "request_threaded_irq failed %d, %lu\n",

ERROR: code indent should use tabs where possible
+                       err, user_val);$

WARNING: please, no spaces at the start of a line
+                       err, user_val);$

WARNING: Missing a blank line after declarations
+ struct resource *res;
+ debug_bank = AB8500_MISC;

ERROR: space required after that ',' (ctx:VxV)
+ sizeof(*dev_attr)*num_irqs,GFP_KERNEL);
                            ^

WARNING: return of an errno should typically be -ve (return -ENXIO)
+ return ENXIO;

WARNING: line over 80 characters
+ file = debugfs_create_file("register-bank", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("register-address", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("register-value", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("irq-subscribe", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("irq-unsubscribe", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("all-modem-registers", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("main_charger_v", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("main_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("usb_charger_c", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("xtal_temp", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ ab8500_gpadc_dir, &plf->dev, &ab8540_gpadc_xtal_temp_fops);

WARNING: line over 80 characters
+ file = debugfs_create_file("vbattruemeas", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ file = debugfs_create_file("otp_calib", (S_IRUGO | S_IWUSR | S_IWGRP),

WARNING: line over 80 characters
+ ab8500_gpadc_dir, &plf->dev, &ab8540_gpadc_otp_calib_fops);

total: 2 errors, 44 warnings, 3230 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Update DT binding to support MICVDD init_data
Charles Keepax [Thu, 10 Jul 2014 16:04:09 +0000 (17:04 +0100)]
mfd: arizona: Update DT binding to support MICVDD init_data

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Update DT binding to support LDO1 init_data
Charles Keepax [Thu, 10 Jul 2014 16:04:08 +0000 (17:04 +0100)]
mfd: arizona: Update DT binding to support LDO1 init_data

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoDoc: mfd: as3722: Add details of optional missing property
Laxman Dewangan [Mon, 9 Jun 2014 07:03:37 +0000 (12:33 +0530)]
Doc: mfd: as3722: Add details of optional missing property

Add details of following properties which are used on driver but
not documented on DT binding document.
- ams,enable-internal-int-pullup
- ams,enable-internal-i2c-pullup

Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Use the proper size when looking at the cros_ec_i2c result
Doug Anderson [Fri, 27 Jun 2014 19:56:12 +0000 (12:56 -0700)]
mfd: cros_ec: Use the proper size when looking at the cros_ec_i2c result

We know how many bytes the EC should be sending us (which is also the
number of bytes transferred) and also how many bytes the EC actually
wanted to send to us.  When computing the checksum and copying back
data let's make sure we take the lesser of the two of those.  We'll
also complain if the EC tried to send us too many bytes.  The EC
sending us too few bytes is legit for when we send the EC an invalid
command.

This is based on similar code in cros_ec_spi.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab8500-core: Resolve code style issues
Lee Jones [Thu, 8 May 2014 13:11:37 +0000 (14:11 +0100)]
mfd: ab8500-core: Resolve code style issues

Soothes the following checkpatch warnings:

    WARNING: line over 80 characters
    #151: FILE: drivers/mfd/ab8500-core.c:151:
    + 0, 1, 2, 3, 4, -1, -1, -1, -1, 11, 18, 19, 20, 21, 12, 13, 24, 5, 22, 23,

    ERROR: spaces required around that '=' (ctx:VxW)
    #325: FILE: drivers/mfd/ab8500-core.c:325:
    + ret= mask_and_set_register_interruptible(ab8500, bank, reg,
         ^

    WARNING: line over 80 characters
    #418: FILE: drivers/mfd/ab8500-core.c:418:
    + else if (offset >= AB9540_INT_GPIO50R && offset <= AB9540_INT_GPIO54R)

    WARNING: line over 80 characters
    #420: FILE: drivers/mfd/ab8500-core.c:420:
    + else if (offset == AB8540_INT_GPIO43R || offset == AB8540_INT_GPIO44R)

    ERROR: spaces required around that '==' (ctx:VxV)
    #454: FILE: drivers/mfd/ab8500-core.c:454:
    + if ((i==3) && (*offset >= 24))
            ^

    ERROR: code indent should use tabs where possible
    #576: FILE: drivers/mfd/ab8500-core.c:576:
    +        .map    = ab8500_irq_map,$

    WARNING: please, no spaces at the start of a line
    #576: FILE: drivers/mfd/ab8500-core.c:576:
    +        .map    = ab8500_irq_map,$

    ERROR: code indent should use tabs where possible
    #577: FILE: drivers/mfd/ab8500-core.c:577:
    +        .xlate  = irq_domain_xlate_twocell,$

    WARNING: please, no spaces at the start of a line
    #577: FILE: drivers/mfd/ab8500-core.c:577:
    +        .xlate  = irq_domain_xlate_twocell,$

    WARNING: char * array declaration might be better as static const
    #1554: FILE: drivers/mfd/ab8500-core.c:1554:
    + static char *switch_off_status[] = {

    WARNING: char * array declaration might be better as static const
    #1563: FILE: drivers/mfd/ab8500-core.c:1563:
    + static char *turn_on_status[] = {

    WARNING: sizeof *ab8500 should be sizeof(*ab8500)
    #1582: FILE: drivers/mfd/ab8500-core.c:1582:
    + ab8500 = devm_kzalloc(&pdev->dev, sizeof *ab8500, GFP_KERNEL);

    ERROR: space required after that close brace '}'
    #1639: FILE: drivers/mfd/ab8500-core.c:1639:
    + }/* Configure AB8500 or AB9540 IRQ */

    WARNING: line over 80 characters
    #1652: FILE: drivers/mfd/ab8500-core.c:1652:
    + ab8500->oldmask = devm_kzalloc(&pdev->dev, ab8500->mask_size, GFP_KERNEL);

    WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
    #1677: FILE: drivers/mfd/ab8500-core.c:1677:
    + printk(KERN_CONT " \"%s\"",

    WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
    #1682: FILE: drivers/mfd/ab8500-core.c:1682:
    + printk(KERN_CONT "\n");

    WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
    #1684: FILE: drivers/mfd/ab8500-core.c:1684:
    + printk(KERN_CONT " None\n");

    WARNING: printk() should include KERN_ facility level
    #1695: FILE: drivers/mfd/ab8500-core.c:1695:
    + printk("\"%s\" ", turn_on_status[i]);

    WARNING: printk() should include KERN_ facility level
    #1700: FILE: drivers/mfd/ab8500-core.c:1700:
    + printk("None\n");

    total: 5 errors, 14 warnings, 1869 lines checked

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab3100-core: Correct code sytle problems
Lee Jones [Thu, 8 May 2014 12:47:15 +0000 (13:47 +0100)]
mfd: ab3100-core: Correct code sytle problems

Corrects the following checkpatch gripes:

    WARNING: quoted string split across lines
    #95: FILE: drivers/mfd/ab3100-core.c:95:
    + "write error (write register) "
    + "%d bytes transferred (expected 2)\n",

    WARNING: quoted string split across lines
    #139: FILE: drivers/mfd/ab3100-core.c:139:
    + "write error (write test register) "
    + "%d bytes transferred (expected 2)\n",

    WARNING: quoted string split across lines
    #175: FILE: drivers/mfd/ab3100-core.c:175:
    + "write error (send register address) "
    + "%d bytes transferred (expected 1)\n",

    WARNING: quoted string split across lines
    #193: FILE: drivers/mfd/ab3100-core.c:193:
    + "write error (read register) "
    + "%d bytes transferred (expected 1)\n",

    WARNING: quoted string split across lines
    #241: FILE: drivers/mfd/ab3100-core.c:241:
    + "write error (send first register address) "
    + "%d bytes transferred (expected 1)\n",

    WARNING: quoted string split across lines
    #256: FILE: drivers/mfd/ab3100-core.c:256:
    + "write error (read register page) "
    + "%d bytes transferred (expected %d)\n",

    WARNING: quoted string split across lines
    #299: FILE: drivers/mfd/ab3100-core.c:299:
    + "write error (maskset send address) "
    + "%d bytes transferred (expected 1)\n",

    WARNING: quoted string split across lines
    #314: FILE: drivers/mfd/ab3100-core.c:314:
    + "write error (maskset read register) "
    + "%d bytes transferred (expected 1)\n",

    WARNING: quoted string split across lines
    #334: FILE: drivers/mfd/ab3100-core.c:334:
    + "write error (write register) "
    + "%d bytes transferred (expected 2)\n",

    WARNING: please, no spaces at the start of a line
    #374: FILE: drivers/mfd/ab3100-core.c:374:
    +  return blocking_notifier_chain_unregister(&ab3100->event_subscribers,$

    WARNING: Prefer seq_puts to seq_printf
    #458: FILE: drivers/mfd/ab3100-core.c:458:
    + seq_printf(s, "AB3100 registers:\n");

    WARNING: quoted string split across lines
    #564: FILE: drivers/mfd/ab3100-core.c:564:
    +  "debug write reg[0x%02x] with 0x%02x, "
    +  "after readback: 0x%02x\n",

    WARNING: quoted string split across lines
    #723: FILE: drivers/mfd/ab3100-core.c:723:
    +  "AB3100 P1E variant detected, "
    +  "forcing chip to 32KHz\n");

    WARNING: quoted string split across lines
    #882: FILE: drivers/mfd/ab3100-core.c:882:
    + "could not communicate with the AB3100 analog "
    + "baseband chip\n");

    WARNING: quoted string split across lines
    #906: FILE: drivers/mfd/ab3100-core.c:906:
    + dev_err(&client->dev, "accepting it anyway. Please update "
    + "the driver.\n");

    total: 0 errors, 15 warnings, 999 lines checked

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: aat2870-core: Stop using obsolte simple_strtoul()
Lee Jones [Thu, 8 May 2014 11:58:24 +0000 (12:58 +0100)]
mfd: aat2870-core: Stop using obsolte simple_strtoul()

Soothes checkpatch warning:

    WARNING: simple_strtoul is obsolete, use kstrtoul instead
    #306: FILE: drivers/mfd/aat2870-core.c:306:
    + addr = simple_strtoul(start, &start, 16);

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: 88pm860x-i2c: Repair 'space before tab' warning
Lee Jones [Thu, 8 May 2014 11:55:35 +0000 (12:55 +0100)]
mfd: 88pm860x-i2c: Repair 'space before tab' warning

Fixes checkpatch warning:

    WARNING: please, no space before tabs
    #5: FILE: drivers/mfd/88pm860x-i2c.c:5:
    + * ^IHaojian Zhuang <haojian.zhuang@marvell.com>$

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: 88pm860x-core: Repair formatting issues
Lee Jones [Thu, 8 May 2014 11:28:37 +0000 (12:28 +0100)]
mfd: 88pm860x-core: Repair formatting issues

Fixes the following checkpatch warnings:

    WARNING: please, no space before tabs
    #5: FILE: drivers/mfd/88pm860x-core.c:5:
    + * ^IHaojian Zhuang <haojian.zhuang@marvell.com>$

    WARNING: line over 80 characters
    #143: FILE: drivers/mfd/88pm860x-core.c:143:
    + {PM8607_IRQ_AUDIO_SHORT, PM8607_IRQ_AUDIO_SHORT, "audio-short", IORESOURCE_IRQ,},

    WARNING: line over 80 characters
    #153: FILE: drivers/mfd/88pm860x-core.c:153:
    + {PM8607_IRQ_CHG_DONE,  PM8607_IRQ_CHG_DONE,  "charging done",       IORESOURCE_IRQ,},

    WARNING: line over 80 characters
    #154: FILE: drivers/mfd/88pm860x-core.c:154:
    + {PM8607_IRQ_CHG_FAIL,  PM8607_IRQ_CHG_FAIL,  "charging timeout",    IORESOURCE_IRQ,},

    WARNING: line over 80 characters
    #155: FILE: drivers/mfd/88pm860x-core.c:155:
    + {PM8607_IRQ_CHG_FAULT, PM8607_IRQ_CHG_FAULT, "charging fault",     IORESOURCE_IRQ,},

    WARNING: line over 80 characters
    #156: FILE: drivers/mfd/88pm860x-core.c:156:
    + {PM8607_IRQ_GPADC1,    PM8607_IRQ_GPADC1,    "battery temperature", IORESOURCE_IRQ,},

    WARNING: Avoid unnecessary line continuations
    #571: FILE: drivers/mfd/88pm860x-core.c:571:
    + struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \

    WARNING: line over 80 characters
    #634: FILE: drivers/mfd/88pm860x-core.c:634:
    + ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq, flags | IRQF_ONESHOT,

    WARNING: Unnecessary parentheses - maybe == should be = ?
    #874: FILE: drivers/mfd/88pm860x-core.c:874:
    + if ((pdata == NULL))

    WARNING: quoted string split across lines
    #1001: FILE: drivers/mfd/88pm860x-core.c:1001:
    + dev_err(chip->dev, "Failed to detect Marvell 88PM8607. "
    + "Chip ID: %02x\n", ret);

    WARNING: quoted string split across lines
    #1124: FILE: drivers/mfd/88pm860x-core.c:1124:
    + dev_err(dev, "Not found \"marvell,88pm860x-slave-addr\" "
    + "property\n");

total: 0 errors, 11 warnings, 1281 lines checked

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: 88pm805: msleep(1ms ~ 20ms) may not do what the caller intends
Lee Jones [Thu, 8 May 2014 11:06:19 +0000 (12:06 +0100)]
mfd: 88pm805: msleep(1ms ~ 20ms) may not do what the caller intends

This code has been working since 2012, as limiting the time between
1ms and 3ms is unlikely to do any harm.

Soothes checkpatch warning:

  WARNING: msleep < 20ms can sleep for up to 20ms;
      see Documentation/timers/timers-howto.txt
  #161: FILE: drivers/mfd/88pm805.c:161:
  + msleep(1);

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tps65910: Rid data size incompatibility warn when building for 64bit
Lee Jones [Wed, 2 Jul 2014 13:34:13 +0000 (14:34 +0100)]
mfd: tps65910: Rid data size incompatibility warn when building for 64bit

Extinguishes:

../drivers/mfd/tps65910.c: In function â€˜tps65910_parse_dt’:
../drivers/mfd/tps65910.c:404:14:
warning: cast from pointer to integer of different size

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Rid data size incompatibility warn when building for 64bit
Lee Jones [Wed, 2 Jul 2014 13:28:46 +0000 (14:28 +0100)]
mfd: arizona: Rid data size incompatibility warn when building for 64bit

Extinguishes:

../drivers/mfd/arizona-core.c: In function â€˜arizona_of_get_type’:
../drivers/mfd/arizona-core.c:505:10:
warning: cast from pointer to integer of different size

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: stmpe: Rid data size incompatibility warn when building for 64bit
Lee Jones [Wed, 2 Jul 2014 10:54:32 +0000 (11:54 +0100)]
mfd: stmpe: Rid data size incompatibility warn when building for 64bit

Extinguishes:

../drivers/mfd/stmpe-i2c.c: In function â€˜stmpe_i2c_probe’:
../drivers/mfd/stmpe-i2c.c:88:13:
warning: cast from pointer to integer of different size
partnum = (int)of_id->data;

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: intel_soc_pmic: Rid compiler working for unused ACPI match table
Lee Jones [Wed, 2 Jul 2014 10:30:12 +0000 (11:30 +0100)]
mfd: intel_soc_pmic: Rid compiler working for unused ACPI match table

If CONIFG_ACPI is not enabled we receive the following warning:

drivers/mfd/intel_soc_pmic_core.c:144:30:
warning: â€˜intel_soc_pmic_acpi_match’ defined but not used

This patch rids it.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab8500-debugfs: Simplify invalid debugfs data checking
Lee Jones [Wed, 2 Jul 2014 10:22:10 +0000 (11:22 +0100)]
mfd: ab8500-debugfs: Simplify invalid debugfs data checking

Noticed during a coding review, if we reorganised the checking a
little, we can rid the code of a pointless 'else'.  Whilst looking
for this particular code hunk I noticed another pointless 'else',
which I've subsequently fixed in this patch.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab8500-core: Remove pointless else in if statement
Lee Jones [Wed, 2 Jul 2014 10:13:42 +0000 (11:13 +0100)]
mfd: ab8500-core: Remove pointless else in if statement

Save a line of code (albeit, it's replaced by a blank line, but
still), as the else is superfluous.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab8500-debugfs: Cleaning up unnecessary to test, unsigned can't be negative.
Rickard Strandqvist [Sat, 28 Jun 2014 21:34:38 +0000 (23:34 +0200)]
mfd: ab8500-debugfs: Cleaning up unnecessary to test, unsigned can't be negative.

Unsigned variable can't be negative so it is unnecessary to test it

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab8500-debugfs: Remove unnecessary null test before debugfs_remove_recursive
Fabian Frederick [Sat, 28 Jun 2014 11:58:17 +0000 (13:58 +0200)]
mfd: ab8500-debugfs: Remove unnecessary null test before debugfs_remove_recursive

Fix checkpatch warning:
WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Move EC interrupt to cros_ec_keyb
Andrew Bresticker [Wed, 18 Jun 2014 18:14:07 +0000 (11:14 -0700)]
mfd: cros_ec: Move EC interrupt to cros_ec_keyb

If we receive EC interrupts after the cros_ec driver has probed, but
before the cros_ec_keyb driver has probed, the cros_ec IRQ handler
will not run the cros_ec_keyb notifier and the EC will leave the IRQ
line asserted.  The cros_ec IRQ handler then returns IRQ_HANDLED and
the resulting flood of interrupts causes the machine to hang.

Since the EC interrupt is currently only used for the keyboard, move
the setup and handling of the EC interrupt to the cros_ec_keyb driver.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: ec_dev->cmd_xfer() returns number of bytes received from EC
Bill Richardson [Wed, 18 Jun 2014 18:14:06 +0000 (11:14 -0700)]
mfd: cros_ec: ec_dev->cmd_xfer() returns number of bytes received from EC

When communicating with the EC, the cmd_xfer() function should return the
number of bytes it received from the EC, or negative on error.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Check result code from EC messages
Bill Richardson [Wed, 18 Jun 2014 18:14:05 +0000 (11:14 -0700)]
mfd: cros_ec: Check result code from EC messages

Just because the host was able to talk to the EC doesn't mean that the EC
was happy with what it was told. Errors in communincation are not the same
as error messages from the EC itself.

This change lets the EC report its errors separately.

[dianders: Added common function to cros_ec.c]

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: cleanup: Remove EC wrapper functions
Bill Richardson [Wed, 18 Jun 2014 18:14:04 +0000 (11:14 -0700)]
mfd: cros_ec: cleanup: Remove EC wrapper functions

Remove the three wrapper functions that talk to the EC without passing all
the desired arguments and just use the underlying communication function
that passes everything in a struct intead.

This is internal code refactoring only. Nothing should change.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: cleanup: remove unused fields from struct cros_ec_device
Bill Richardson [Wed, 18 Jun 2014 18:14:03 +0000 (11:14 -0700)]
mfd: cros_ec: cleanup: remove unused fields from struct cros_ec_device

struct cros_ec_device has a superfluous "name" field. We can get all the
debugging info we need from the existing ec_name and phys_name fields, so
let's take out the extra field.

The printout also has sufficient info in it without explicitly adding
the transport.  Before this change:
  cros-ec-spi spi2.0: Chrome EC (SPI)

After this change:
  cros-ec-spi spi2.0: Chrome EC device registered

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Use struct cros_ec_command to communicate with the EC
Bill Richardson [Wed, 18 Jun 2014 18:14:02 +0000 (11:14 -0700)]
mfd: cros_ec: Use struct cros_ec_command to communicate with the EC

This is some internal structure reorganization / renaming to prepare
for future patches that will add a userspace API to cros_ec.  There
should be no visible changes.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Detect in-progress commands
Simon Glass [Wed, 18 Jun 2014 18:14:01 +0000 (11:14 -0700)]
mfd: cros_ec: Detect in-progress commands

Some commands take a while to execute. Use -EAGAIN to signal this to the
caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Tweak struct cros_ec_device for clarity
Bill Richardson [Wed, 18 Jun 2014 18:14:00 +0000 (11:14 -0700)]
mfd: cros_ec: Tweak struct cros_ec_device for clarity

The members of struct cros_ec_device were improperly commented, and
intermixed the private and public sections. This is just cleanup to make it
more obvious what goes with what.

[dianders: left lock in the structure but gave it the name that will
eventually be used.]

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Allow static din/dout buffers with cros_ec_register()
Bill Richardson [Wed, 18 Jun 2014 18:13:59 +0000 (11:13 -0700)]
mfd: cros_ec: Allow static din/dout buffers with cros_ec_register()

The lower-level driver may want to provide its own buffers. If so,
there's no need to allocate new ones.  This already happens to work
just fine (since we check for size of 0 and use devm allocation), but
it's good to document it.

[dianders: Resolved conflicts; documented that no code changes needed
on mainline]

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: Fix the comment on cros_ec_remove()
Bill Richardson [Wed, 18 Jun 2014 18:13:58 +0000 (11:13 -0700)]
mfd: cros_ec: Fix the comment on cros_ec_remove()

This comment was incorrect, so update it.

Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pcf50633: Reconnect -ENOMEM error path
Lee Jones [Tue, 1 Jul 2014 11:57:36 +0000 (12:57 +0100)]
mfd: pcf50633: Reconnect -ENOMEM error path

If platform_device_alloc() or platform_device_add_data() fail during
pcf50633_probe(), the current code ignores the return error code and
continues to attempt to allocate new platform devices for each of the
supported regulators.  Instead, if any failures occur we should fail
out gracefully by cleaning up after ourselves and return the error.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ab8500-debugfs.c: Cleaning up values that are never used
Rickard Strandqvist [Thu, 26 Jun 2014 13:40:00 +0000 (15:40 +0200)]
mfd: ab8500-debugfs.c: Cleaning up values that are never used

Remove variable that are never used

This was found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Prepare regulators for suspend state to reduce power-consumption
Chanwoo Choi [Wed, 25 Jun 2014 07:14:47 +0000 (16:14 +0900)]
mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption

This patch use regulator_suspend_prepare() function to prepare the proper state
of regulators for suspend state to remove un-necessary leakage power-consumption.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agodt-bindings: mfd: s2mps11: Add support S2MPU02 PMIC
Chanwoo Choi [Wed, 25 Jun 2014 07:14:46 +0000 (16:14 +0900)]
dt-bindings: mfd: s2mps11: Add support S2MPU02 PMIC

This patch add documentation for S2MPU02 PMIC device. S2MPU02 has a little
difference from S2MPS11/S2MPS14 PMIC and has LDO[1-28]/Buck[1-7].

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoregulator: s2mps11: Add support S2MPU02 regulator device
Chanwoo Choi [Wed, 25 Jun 2014 07:14:45 +0000 (16:14 +0900)]
regulator: s2mps11: Add support S2MPU02 regulator device

This patch add S2MPU02 regulator device to existing S2MPS11 device driver
because of little difference between S2MPS1x and S2MPU02. The S2MPU02
regulator device includes LDO[1-28] and BUCK[1-7].

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[Add missing linear_min_sel of S2MPU02 LDO regulators by Jonghwa Lee]
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Add support for S2MPU02 device
Chanwoo Choi [Wed, 25 Jun 2014 07:14:44 +0000 (16:14 +0900)]
mfd: sec-core: Add support for S2MPU02 device

Add support for Samsung S2MPU02 PMIC device to the MFD sec-core driver.
The S2MPU02 device includes PMIC/RTC/Clock devices.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: mc13xxx: Use regmap irq framework for interrupts
Alexander Shiyan [Wed, 18 Jun 2014 17:05:40 +0000 (21:05 +0400)]
mfd: mc13xxx: Use regmap irq framework for interrupts

This patch convert mc13xxx MFD driver to use regmap irq framework
for interrupt registration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921-core: Remove unused variable
Sachin Kamat [Tue, 24 Jun 2014 09:09:07 +0000 (14:39 +0530)]
mfd: pm8921-core: Remove unused variable

‘irq_bit’ is unused in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Add comment to explain non-devm regulator_get
Charles Keepax [Thu, 19 Jun 2014 15:04:23 +0000 (16:04 +0100)]
mfd: arizona: Add comment to explain non-devm regulator_get

To avoid someone attempting to change this regulator_get back into a
devm_regulator_get put a comment in explaining that devres can't be used
here as the regulator will be destroyed before devres calls
regulator_put.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoDocumentation: devicetree: Fix s2mps11 and s5m8767 typos
Andreas Färber [Mon, 23 Jun 2014 01:21:19 +0000 (03:21 +0200)]
Documentation: devicetree: Fix s2mps11 and s5m8767 typos

It's LDO2, not LD02.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoDocumentation: devicetree: Fix s2mps11 example syntax
Andreas Färber [Mon, 23 Jun 2014 01:21:20 +0000 (03:21 +0200)]
Documentation: devicetree: Fix s2mps11 example syntax

It's <1>, not 1.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: wm8994: Add a bunch of missing defaults/readables
Charles Keepax [Mon, 16 Jun 2014 20:15:31 +0000 (21:15 +0100)]
mfd: wm8994: Add a bunch of missing defaults/readables

Ever since this commit:

commit d4807ad2c4c0e17b6f00e3be9492c81de0804f40
regmap: Check readable regs in _regmap_read

Regmap will refuse to read a register which is not marked as readable,
this has highlighted a number of controls in this driver which are not
marked as readable/missing defaults.

This patch corrects the situation, by adding the missing
readables/defaults.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec_spi: Set wakeup capability
Prathyush K [Mon, 16 Jun 2014 21:12:23 +0000 (14:12 -0700)]
mfd: cros_ec_spi: Set wakeup capability

Set the device as wakeup capable and register the wakeup source.

Note: Though it makes more sense to have the SPI framework do this,
(either via device tree or by board_info)
this change is as per an existing mail chain:
https://lkml.org/lkml/2009/8/27/291

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agodt-binding: mfd: as3722: Correct macro name
Laxman Dewangan [Mon, 9 Jun 2014 08:31:59 +0000 (14:01 +0530)]
dt-binding: mfd: as3722: Correct macro name

The macro name for enable3 pin is named as AS3722_EXT_CONTROL_PIN_ENABLE2
which is conflict with the enable2 pin.

Correct this macro name to correctly reflect the enable pin i.e.
AS3722_EXT_CONTROL_PIN_ENABLE3.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reported-by: Dan Willemsen <dwillemsen@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Lower ARIZONA_MAX_CORE_SUPPLIES to 2
Charles Keepax [Mon, 2 Jun 2014 08:50:43 +0000 (09:50 +0100)]
mfd: arizona: Lower ARIZONA_MAX_CORE_SUPPLIES to 2

There are no Arizona devices with 3 core supplies but we define a fix
array with space for 3 core supplies. Lower the ARIZONA_MAX_CORE_SUPPLIES
define to 2, to save a few bytes.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Use num_core_supplies in arizona_dev_exit
Charles Keepax [Mon, 2 Jun 2014 08:50:42 +0000 (09:50 +0100)]
mfd: arizona: Use num_core_supplies in arizona_dev_exit

Currently we call regulator_bulk_disable with
ARRAY_SIZE(arizona->core_supplies), however this array may be larger
than the number of supplies actually used by the chip we are dealing
with. Use the provided num_core_supplies member instead, so that we only
disable supplies which actually exist.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Don't use devres for DCVDD
Charles Keepax [Mon, 2 Jun 2014 08:50:41 +0000 (09:50 +0100)]
mfd: arizona: Don't use devres for DCVDD

Currently the Arizona core uses a devm_regulator_get against its own
device node to obtain DCVDD. The Arizona core is an MFD device and DCVDD
is usually supplied by a child node (arizona-ldo1) of the core. As
devres destruction for the MFD device will run after all its children
have been destroyed, the regulator will be destroyed before devres
calls regulator_put. This causes a warning from both the destruction of
the child node, as the regulator is still open, and from the put of the
regulator as the regulator device has already been destroyed.

This patch handles the regulator get and put without devres to avoid
this issue.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Disable DCVDD before we destroy the MFD
Charles Keepax [Mon, 2 Jun 2014 08:50:40 +0000 (09:50 +0100)]
mfd: arizona: Disable DCVDD before we destroy the MFD

As DCVDD is probably supplied by a child of the MFD device move its
disable to before we destroy the MFD children as the regulator likely
won't exist after that.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Disable PM runtime at start of driver removal
Charles Keepax [Mon, 2 Jun 2014 08:50:39 +0000 (09:50 +0100)]
mfd: arizona: Disable PM runtime at start of driver removal

We don't want to trigger any PM runtime operations whilst we are tearing
down the driver, as things the suspend and resume callbacks rely on
might already have been destroyed. So disable PM runtime for the device
as the first step arizona_dev_exit.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tc3589x: Translate onecell, not twocell
Linus Walleij [Tue, 10 Jun 2014 12:31:32 +0000 (14:31 +0200)]
mfd: tc3589x: Translate onecell, not twocell

Something changed in the OF parser in the v3.16 merge window
making it be strict about passing the number of IRQ cells
correctly and disturbing the irqdomain xlate function guard
to crash when subdevices try to obtain IRQs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at
/home/linus/linux-stericsson/kernel/irq/irqdomain.c:676
irq_domain_xlate_twocell+0x40/0x48()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted
 3.15.0-07915-gf6d059821ce9-dirty #46
[<c0014660>] (unwind_backtrace)
 from [<c0011424>] (show_stack+0x10/0x14)
[<c0011424>] (show_stack)
 from [<c0432630>] (dump_stack+0x9c/0xd4)
[<c0432630>] (dump_stack)
 from [<c001d5c0>] (warn_slowpath_common+0x6c/0x88)
[<c001d5c0>] (warn_slowpath_common)
 from [<c001d678>] (warn_slowpath_null+0x1c/0x24)
[<c001d678>] (warn_slowpath_null)
 from [<c005acd0>] (irq_domain_xlate_twocell+0x40/0x48)
[<c005acd0>] (irq_domain_xlate_twocell)
 from [<c005b658>] (irq_create_of_mapping+0x64/0x110)
[<c005b658>] (irq_create_of_mapping)
 from [<c02e147c>] (of_irq_get+0x38/0x48)
[<c02e147c>] (of_irq_get)
 from [<c01f8910>] (tc3589x_gpio_probe+0x38/0x1e4)
[<c01f8910>] (tc3589x_gpio_probe)
 from [<c022eedc>] (platform_drv_probe+0x18/0x48)
[<c022eedc>] (platform_drv_probe)
 from [<c022d80c>] (driver_probe_device+0x118/0x24c)
[<c022d80c>] (driver_probe_device)
 from [<c022bf20>] (bus_for_each_drv+0x58/0x8c)
[<c022bf20>] (bus_for_each_drv)
 from [<c022d6c4>] (device_attach+0x74/0x88)
[<c022d6c4>] (device_attach)
 from [<c022cdac>] (bus_probe_device+0x84/0xa8)
[<c022cdac>] (bus_probe_device)
 from [<c022b35c>] (device_add+0x440/0x520)
[<c022b35c>] (device_add)
 from [<c022ec50>] (platform_device_add+0xb4/0x218)
[<c022ec50>] (platform_device_add)
 from [<c0243508>] (mfd_add_device+0x220/0x31c)
[<c0243508>] (mfd_add_device)
 from [<c02436a8>] (mfd_add_devices+0xa4/0x100)
[<c02436a8>] (mfd_add_devices)
 from [<c024312c>] (tc3589x_probe+0x334/0x3c0)
[<c024312c>] (tc3589x_probe)
 from [<c022d80c>] (driver_probe_device+0x118/0x24c)

The TC3589x device trees specify the MFD core device
as having one interrupt cell (cannot specify flags) so the
twocell translation function is clearly wrong, changing it to
onecell, as it should be, fixes the regression.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: asic3: Fix potential null pointer dereference
Sachin Kamat [Tue, 10 Jun 2014 10:00:34 +0000 (15:30 +0530)]
mfd: asic3: Fix potential null pointer dereference

We previously assumed 'mem_sdio' could be null but it is
dereferenced in ioremap(). Add a check to avoid a potential
null pointer dereference error.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: cros_ec: spi: Fix end of transfer on devices with no spi-msg-delay
Doug Anderson [Fri, 13 Jun 2014 18:13:32 +0000 (11:13 -0700)]
mfd: cros_ec: spi: Fix end of transfer on devices with no spi-msg-delay

cros_ec_spi makes the assumption that a 0-length message will put the
spi chip select back to normal (non cs_toggle mode).  This used to be
the case back on kernel-3.8 on the spi-s3c64xx driver but doesn't
appear to be true anymore.  It seems like it was a pretty questionable
assumption to begin with, so let's fix the code to be more robust.  We
know that a message with a single 0-length segment _will_ put things
back in order.  Change cros_ec_spi to handle this.

This wasn't a problem on the main user of cros_ec_spi upstream (tegra)
because it specified 'google,cros-ec-spi-msg-delay'.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Fix cs5535 dependencies
Jean Delvare [Mon, 16 Jun 2014 11:54:15 +0000 (13:54 +0200)]
mfd: Fix cs5535 dependencies

As far as I know, the CS5535 and CS5536 chipsets are companions of the
Geode series of processors, which are 32-bit only. So the CS5535
drivers are not needed on x86-64, except for build testing purpose.

This aligns the dependencies to what FB_GEODE already uses.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: timberdale: Depend on X86_32
Jean Delvare [Mon, 16 Jun 2014 11:56:01 +0000 (13:56 +0200)]
mfd: timberdale: Depend on X86_32

As far as I know the Timberdale chip was only used as a companion for
Intel Atom E600 series processors. As such, its drivers are only
useful on X86_32.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoMerge branches 'ib-mfd-extcon-regulator-3.17', 'ib-mfd-gpio-3.17' and 'ib-mfd-mmc...
Lee Jones [Wed, 9 Jul 2014 13:55:13 +0000 (14:55 +0100)]
Merge branches 'ib-mfd-extcon-regulator-3.17', 'ib-mfd-gpio-3.17' and 'ib-mfd-mmc-3.17' into ibs-for-mfd-merged

10 years agommc: rtsx: add support for async request
Micky Ching [Fri, 6 Jun 2014 07:05:45 +0000 (15:05 +0800)]
mmc: rtsx: add support for async request

Add support for non-blocking request, pre_req() runs dma_map_sg() and
post_req() runs dma_unmap_sg(). This patch can increase card read/write
speed, especially for high speed card and slow speed CPU.

Test on intel i3(800MHz - 2.3GHz) performance mode(2.3GHz), SD card
clock 208MHz

run dd if=/dev/mmcblk0 of=/dev/null bs=64k count=1024
before:
67108864 bytes (67 MB) copied, 0.85427 s, 78.6 MB/s
after:
67108864 bytes (67 MB) copied, 0.74799 s, 89.7 MB/s

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: rtsx: Add dma transfer function
Micky Ching [Fri, 6 Jun 2014 07:05:44 +0000 (15:05 +0800)]
mfd: rtsx: Add dma transfer function

rtsx driver using a single function for transfer data, dma map/unmap are
placed in one fix function. We need map/unmap dma in different place(for
mmc async driver), so add three function for dma map, dma transfer and
dma unmap.

Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoLinux 3.16-rc4 v3.16-rc4
Linus Torvalds [Sun, 6 Jul 2014 19:37:51 +0000 (12:37 -0700)]
Linux 3.16-rc4

10 years agoMerge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux
Linus Torvalds [Sun, 6 Jul 2014 19:11:57 +0000 (12:11 -0700)]
Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux

Pull devicetree bugfix from Grant Likely:
 "Important bug fix for parsing 64-bit addresses on 32-bit platforms.
  Without this patch the kernel will try to use memory ranges that
  cannot be reached"

* tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
  of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

10 years agoMerge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
Linus Torvalds [Sun, 6 Jul 2014 19:08:30 +0000 (12:08 -0700)]
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of 13 fixes, a MAINTAINERS update and a sparse update.
  The fixes are mostly correct value initialisations, avoiding NULL
  derefs and some uninitialised pointer avoidance.

  All the patches have been incubated in -next for a few days.  The
  final patch (use the scsi data buffer length to extract transfer size)
  has been rebased to add a cc to stable, but only the commit message
  has changed"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] use the scsi data buffer length to extract transfer size
  virtio-scsi: fix various bad behavior on aborted requests
  virtio-scsi: avoid cancelling uninitialized work items
  ibmvscsi: Add memory barriers for send / receive
  ibmvscsi: Abort init sequence during error recovery
  qla2xxx: Fix sparse warning in qla_target.c.
  bnx2fc: Improve stats update mechanism
  bnx2fc: do not scan uninitialized lists in case of error.
  fc: ensure scan_work isn't active when freeing fc_rport
  pm8001: Fix potential null pointer dereference and memory leak.
  MAINTAINERS: Update LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) maintainers Email IDs
  be2iscsi: remove potential junk pointer free
  be2iscsi: add an missing goto in error path
  scsi_error: set DID_TIME_OUT correctly
  scsi_error: fix invalid setting of host byte

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sun, 6 Jul 2014 00:13:46 +0000 (17:13 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "i915, tda998x and vmwgfx fixes,

  The main one is i915 fix for missing VGA connectors, along with some
  fixes for the tda998x from Russell fixing some modesetting problems.

  (still on holidays, but got a spare moment to find these)"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix incorrect write to read-only register v2:
  drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
  drm/i915: only apply crt_present check on VLV
  drm/i915: Wait for vblank after enabling the primary plane on BDW
  drm/i2c: tda998x: add some basic mode validation
  drm/i2c: tda998x: faster polling for edid
  drm/i2c: tda998x: move drm_i2c_encoder_destroy call

10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 5 Jul 2014 23:57:12 +0000 (16:57 -0700)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "This week's arm-soc fixes:

   - A set of of OMAP patches that we had missed Tony's pull request of:
     * Reset fix for am43xx
     * Proper OPP table for omap5
     * Fix for SoC detection of one of the DRA7 SoCs
     * hwmod updates to get SATA and OCP to work on omap5 (drivers
       merged in 3.16)
     * ... plus a handful of smaller fixes
   - sunxi needed to re-add machine specific restart code that was
     removed in anticipation of a watchdog driver being merged for 3.16,
     and it didn't make it in.
   - Marvell fixes for PCIe on SMP and a big-endian fix.
   - A trivial defconfig update to make my capri test board boot with
     bcm_defconfig again.

  ... and a couple of MAINTAINERS updates, one to claim new Keystone
  drivers that have been merged, and one to merge MXS and i.MX (both
  Freescale platforms).

  The largest diffs come from the hwmod code for omap5 and the re-add of
  the restart code on sunxi.  The hwmod stuff is quite late at this
  point but it slipped through cracks repeatedly while coming up the
  maintainer chain and only affects the one SoC so risk is low"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  MAINTAINERS: Add few more Keystone drivers
  MAINTAINERS: merge MXS entry into IMX one
  ARM: sunxi: Reintroduce the restart code for A10/A20 SoCs
  ARM: mvebu: fix cpuidle implementation to work on big-endian systems
  ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup
  ARM: mvebu: move Armada 375 external abort logic as a quirk
  ARM: bcm: Fix bcm and multi_v7 defconfigs
  ARM: dts: dra7-evm: remove interrupt binding
  ARM: OMAP2+: Fix parser-bug in platform muxing code
  ARM: DTS: dra7/dra7xx-clocks: ATL related changes
  ARM: OMAP2+: drop unused function
  ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm
  ARM: dts: omap5: Update CPU OPP table as per final production Manual
  ARM: DRA722: add detection of SoC information
  ARM: dts: Enable twl4030 off-idle configuration for selected omaps
  ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
  ARM: OMAP2+: hwmod: Change hardreset soc_ops for AM43XX

10 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Jul 2014 23:56:14 +0000 (16:56 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "A few minor fixlets in ARM SoC irq drivers and a fix for a memory leak
  which I introduced in the last round of cleanups :("

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Fix memory leak when calling irq_free_hwirqs()
  irqchip: spear_shirq: Fix interrupt offset
  irqchip: brcmstb-l2: Level-2 interrupts are edge sensitive
  irqchip: armada-370-xp: Mask all interrupts during initialization.

10 years agoMerge tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel
Dave Airlie [Sat, 5 Jul 2014 21:49:59 +0000 (07:49 +1000)]
Merge tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel

Fixes for 3.16-rc3; most importantly Jesse brings back VGA he took away
on a bunch of machines. Also a vblank fix for BDW and a power workaround
fix for VLV.

* tag 'drm-intel-fixes-2014-07-03' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
  drm/i915: only apply crt_present check on VLV
  drm/i915: Wait for vblank after enabling the primary plane on BDW

10 years agoMerge branch 'vmwgfx-fixes-3.16' of git://people.freedesktop.org/~thomash/linux
Dave Airlie [Sat, 5 Jul 2014 21:49:28 +0000 (07:49 +1000)]
Merge branch 'vmwgfx-fixes-3.16' of git://people.freedesktop.org/~thomash/linux

fix to a 3.15 commit.

* 'vmwgfx-fixes-3.16' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: Fix incorrect write to read-only register v2:

10 years agoMerge branch 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox
Dave Airlie [Sat, 5 Jul 2014 21:48:26 +0000 (07:48 +1000)]
Merge branch 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox

mode fixes for tda998x.

* 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox:
  drm/i2c: tda998x: add some basic mode validation
  drm/i2c: tda998x: faster polling for edid
  drm/i2c: tda998x: move drm_i2c_encoder_destroy call

10 years agogenirq: Fix memory leak when calling irq_free_hwirqs()
Keith Busch [Mon, 30 Jun 2014 22:24:44 +0000 (16:24 -0600)]
genirq: Fix memory leak when calling irq_free_hwirqs()

irq_free_hwirqs() always calls irq_free_descs() with a cnt == 0
which makes it a no-op since the interrupt count to free is
decremented in itself.

Fixes: 7b6ef1262549f6afc5c881aaef80beb8fd15f908
Signed-off-by: Keith Busch <keith.busch@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Link: http://lkml.kernel.org/r/1404167084-8070-1-git-send-email-keith.busch@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
10 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Sat, 5 Jul 2014 17:12:52 +0000 (10:12 -0700)]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull ARM64 fixes from Catalin Marinas:
 - Exception level check at boot time (for completeness, not triggering
   any bug before)
 - I/D-cache synchronisation logic for huge pages
 - Config symbol typo

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: fix el2_setup check of CurrentEL
  arm64: mm: Make icache synchronisation logic huge page aware
  arm64: mm: Fix horrendous config typo

10 years agoMAINTAINERS: Add few more Keystone drivers
Santosh Shilimkar [Sun, 22 Jun 2014 20:06:22 +0000 (16:06 -0400)]
MAINTAINERS: Add few more Keystone drivers

Update MAINTAINERS file for recently added reset controller, AEMIF
and clocksource driver for Keystone SOCs.

The EMIF memory controller driver is also added along with AEMIF.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMAINTAINERS: merge MXS entry into IMX one
Shawn Guo [Wed, 2 Jul 2014 07:37:10 +0000 (15:37 +0800)]
MAINTAINERS: merge MXS entry into IMX one

The mach-mxs platform is actually co-maintained by myself and
pengutronix folks.  Also it's hosted in the same kernel tree as IMX.
So let's merge the entry into IMX one.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu into fixes
Olof Johansson [Sat, 5 Jul 2014 04:51:19 +0000 (21:51 -0700)]
Merge tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu into fixes

mvebu fixes for v3.16 (round #2)

 - mvebu
    - Fix PCIe deadlock now that SMP is enabled
    - Fix cpuidle for big-endian systems

* tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: fix cpuidle implementation to work on big-endian systems
  ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup
  ARM: mvebu: move Armada 375 external abort logic as a quirk

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: sunxi: Reintroduce the restart code for A10/A20 SoCs
Maxime Ripard [Sun, 29 Jun 2014 13:48:53 +0000 (15:48 +0200)]
ARM: sunxi: Reintroduce the restart code for A10/A20 SoCs

This partly reverts commits 553600502b84 (ARM: sunxi: Remove reset code from
the platform) and 5e669ec583e2 (ARM: sunxi: Remove init_machine callback) for
the sun4i, sun5i and sun7i families.

This is needed because the watchdog counterpart of these commits was dropped,
and didn't make it into 3.16. In order to still be able to reboot the board, we
need to reintroduce that code. Of course, the long term view is still to get
rid of that code in mach-sunxi.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'omap-for-v3.16/fixes-against-rc1' of git://git.kernel.org/pub/scm/linux...
Olof Johansson [Sat, 5 Jul 2014 04:45:38 +0000 (21:45 -0700)]
Merge tag 'omap-for-v3.16/fixes-against-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Merge OMAP fixes from Tony Lindgren:

Fixes for omaps for issues discovered during the merge window and
enabling of a few features that had to wait for the driver
dependencies to clear.

The fixes included are:

- Fix am43xx hard reset flags
- Fix SoC detection for DRA722
- Fix CPU OPP table for omap5
- Fix legacy mux parser bug if requested muxname is a prefix of
  multiple mux entries
- Fix qspi interrupt binding that relies on the irq crossbar
  that has not yet been enabled
- Add missing phy_sel for am43x-epos-evm
- Drop unused gic_init_irq() that is no longer needed

And the enabling of features that had driver dependencies are:

- Change dra7 to use Audio Tracking Logic clock instead of a fixed
  clock now that the clock driver for it has been merged

- Enable off idle configuration for selected omaps as all the kernel
  dependencies for device tree based booting are finally merged as
  this is needed to get the automated PM tests working finally with
  device tree based booting

- Add hwmod entry for ocp2scp3 for omap5 to get sata working as
  all the driver dependencies are now in the kernel and this patch
  fell through the cracks during the merge window

* tag 'omap-for-v3.16/fixes-against-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: dra7-evm: remove interrupt binding
  ARM: OMAP2+: Fix parser-bug in platform muxing code
  ARM: DTS: dra7/dra7xx-clocks: ATL related changes
  ARM: OMAP2+: drop unused function
  ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm
  ARM: dts: omap5: Update CPU OPP table as per final production Manual
  ARM: DRA722: add detection of SoC information
  ARM: dts: Enable twl4030 off-idle configuration for selected omaps
  ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
  ARM: OMAP2+: hwmod: Change hardreset soc_ops for AM43XX

10 years agoMerge tag 'md/3.16-fixes' of git://neil.brown.name/md
Linus Torvalds [Fri, 4 Jul 2014 16:37:43 +0000 (09:37 -0700)]
Merge tag 'md/3.16-fixes' of git://neil.brown.name/md

Pull md bugfixes from Neil Brown:
 "Two minor bugfixes for md in 3.16"

* tag 'md/3.16-fixes' of git://neil.brown.name/md:
  md: flush writes before starting a recovery.
  md: make sure GET_ARRAY_INFO ioctl reports correct "clean" status

10 years agoMerge tag 'sound-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 4 Jul 2014 15:56:57 +0000 (08:56 -0700)]
Merge tag 'sound-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This contains a few fixes for HD-audio: yet another Dell headset pin
  quirk, a fixup for Thinkpad T540P, and an improved fix for
  Haswell/Broadwell HDMI clock setup"

* tag 'sound-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - restore BCLK M/N value as per CDCLK for HSW/BDW display HDA controller
  drm/i915: provide interface for audio driver to query cdclk
  ALSA: hda - Add a fixup for Thinkpad T540p
  ALSA: hda - Add another headset pin quirk for some Dell machines

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 4 Jul 2014 15:53:53 +0000 (08:53 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "We've queued up a few fixes in my for-linus branch"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix crash when starting transaction
  Btrfs: fix btrfs_print_leaf for skinny metadata
  Btrfs: fix race of using total_bytes_pinned
  btrfs: use E2BIG instead of EIO if compression does not help
  btrfs: remove stale comment from btrfs_flush_all_pending_stuffs
  Btrfs: fix use-after-free when cloning a trailing file hole
  btrfs: fix null pointer dereference in btrfs_show_devname when name is null
  btrfs: fix null pointer dereference in clone_fs_devices when name is null
  btrfs: fix nossd and ssd_spread mount option regression
  Btrfs: fix race between balance recovery and root deletion
  Btrfs: atomically set inode->i_flags in btrfs_update_iflags
  btrfs: only unlock block in verify_parent_transid if we locked it
  Btrfs: assert send doesn't attempt to start transactions
  btrfs compression: reuse recently used workspace
  Btrfs: fix crash when mounting raid5 btrfs with missing disks
  btrfs: create sprout should rename fsid on the sysfs as well
  btrfs: dev replace should replace the sysfs entry
  btrfs: dev add should add its sysfs entry
  btrfs: dev delete should remove sysfs entry
  btrfs: rename add_device_membership to btrfs_kobj_add_device

10 years agoarm64: fix el2_setup check of CurrentEL
Marc Zyngier [Fri, 6 Jun 2014 13:16:21 +0000 (14:16 +0100)]
arm64: fix el2_setup check of CurrentEL

The CurrentEL system register reports the Current Exception Level
of the CPU. It doesn't say anything about the stack handling, and
yet we compare it to PSR_MODE_EL2t and PSR_MODE_EL2h.

It works by chance because PSR_MODE_EL2t happens to match the right
bits, but that's otherwise a very bad idea. Just check for the EL
value instead.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[catalin.marinas@arm.com: fixed arch/arm64/kernel/efi-entry.S]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
10 years agoarm64: mm: Make icache synchronisation logic huge page aware
Steve Capper [Wed, 2 Jul 2014 10:46:23 +0000 (11:46 +0100)]
arm64: mm: Make icache synchronisation logic huge page aware

The __sync_icache_dcache routine will only flush the dcache for the
first page of a compound page, potentially leading to stale icache
data residing further on in a hugetlb page.

This patch addresses this issue by taking into consideration the
order of the page when flushing the dcache.

Reported-by: Mark Brown <broonie@linaro.org>
Tested-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@vger.kernel.org> # v3.11+
10 years agoarm64: mm: Fix horrendous config typo
Steve Capper [Wed, 25 Jun 2014 07:41:45 +0000 (08:41 +0100)]
arm64: mm: Fix horrendous config typo

The define ARM64_64K_PAGES is tested for rather than
CONFIG_ARM64_64K_PAGES. Correct that typo here.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
10 years agoALSA: hda - restore BCLK M/N value as per CDCLK for HSW/BDW display HDA controller
Mengdong Lin [Thu, 3 Jul 2014 09:02:23 +0000 (17:02 +0800)]
ALSA: hda - restore BCLK M/N value as per CDCLK for HSW/BDW display HDA controller

For HSW/BDW display HD-A controller, hda_set_bclk() is defined to set BCLK
by programming the M/N values as per the core display clock (CDCLK) queried from
i915 display driver.

And the audio driver will also set BCLK in azx_first_init() since the display
driver can turn off the shared power in boot phase if only eDP is connected
and M/N values will be lost and must be reprogrammed.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agodrm/i915: provide interface for audio driver to query cdclk
Jani Nikula [Fri, 4 Jul 2014 02:00:37 +0000 (10:00 +0800)]
drm/i915: provide interface for audio driver to query cdclk

For Haswell and Broadwell, if the display power well has been disabled,
the display audio controller divider values EM4 M VALUE and EM5 N VALUE
will have been lost. The CDCLK frequency is required for reprogramming them
to generate 24MHz HD-A link BCLK. So provide a private interface for the
audio driver to query CDCLK.

This is a stopgap solution until a more generic interface between audio
and display drivers has been implemented.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'usb-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Fri, 4 Jul 2014 02:12:58 +0000 (19:12 -0700)]
Merge tag 'usb-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB bugfixes from Greg KH:
 "Here's a round of USB bugfixes, quirk additions, and new device ids
  for 3.16-rc4.  Nothing major in here at all, just a bunch of tiny
  changes.  All have been in linux-next with no reported issues"

* tag 'usb-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
  usb: chipidea: udc: delete td from req's td list at ep_dequeue
  usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs
  usb-storage/SCSI: Add broken_fua blacklist flag
  usb: musb: dsps: fix the base address for accessing the mode register
  tools: ffs-test: fix header values endianess
  usb: phy: msm: Do not do runtime pm if the phy is not idle
  usb: musb: Ensure that cppi41 timer gets armed on premature DMA TX irq
  usb: gadget: gr_udc: Fix check for invalid number of microframes
  usb: musb: Fix panic upon musb_am335x module removal
  usb: gadget: f_fs: resurect usb_functionfs_descs_head structure
  Revert "tools: ffs-test: convert to new descriptor format fixing compilation error"
  xhci: Fix runtime suspended xhci from blocking system suspend.
  xhci: clear root port wake on bits if controller isn't wake-up capable
  xhci: correct burst count field for isoc transfers on 1.0 xhci hosts
  xhci: Use correct SLOT ID when handling a reset device command
  MAINTAINERS: update e-mail address
  usb: option: add/modify Olivetti Olicard modems
  USB: ftdi_sio: fix null deref at port probe
  MAINTAINERS: drop two usb-serial subdriver entries
  USB: option: add device ID for SpeedUp SU9800 usb 3g modem
  ...