1. 28 Jul, 2014 8 commits
  2. 25 Jul, 2014 14 commits
    • Lee Jones's avatar
      mfd: max77686: Ensure device type IDs are architecture agnostic · ec8bd566
      Lee Jones authored
      Extinguishes:
      
      ../drivers/mfd/max77686.c: In function ‘max77686_i2c_probe’:
      ../drivers/mfd/max77686.c:254:20:
      	warning: cast from pointer to integer of different size
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      ec8bd566
    • Javier Martinez Canillas's avatar
      mfd: max77686: Add Maxim 77802 PMIC support · a259f389
      Javier Martinez Canillas authored
      Maxim MAX77802 is a power management chip that contains 10 high
      efficiency Buck regulators, 32 Low-dropout (LDO) regulators used
      to power up application processors and peripherals, a 2-channel
      32kHz clock outputs, a Real-Time-Clock (RTC) and a I2C interface
      to program the individual regulators, clocks outputs and the RTC.
      
      This patch adds support for MAX77802 to the MAX77686 driver and is
      based on a driver added to the Chrome OS kernel 3.8 by Simon Glass.
      Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      a259f389
    • Himangi Saraogi's avatar
      mfd: tps6105x: Use managed resources when allocating memory · ad83533a
      Himangi Saraogi authored
      This patch introduces the use of devm_kzalloc instead of the
      corresponding unmanaged version and does away with the kfrees in the
      probe and remove functions. Also, a label is done away with.
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      ad83533a
    • Lee Jones's avatar
      mfd: wm8997-tables: Suppress 'line over 80 chars' warnings · 23213218
      Lee Jones authored
      This is part of an effort to clean-up the MFD subsystem.
      
      WARNING: line over 80 characters
      +       { 0x00000068, 0x01FF },    /* R104   - Always On Triggers Sequence Select 3 */
      
      WARNING: line over 80 characters
      +       { 0x00000069, 0x01FF },    /* R105   - Always On Triggers Sequence Select 4 */
      
      WARNING: line over 80 characters
      +       { 0x0000006A, 0x01FF },    /* R106   - Always On Triggers Sequence Select 5 */
      
      WARNING: line over 80 characters
      +       { 0x0000006B, 0x01FF },    /* R107   - Always On Triggers Sequence Select 6 */
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      23213218
    • Lee Jones's avatar
      mfd: kempld-core: Correct a variety of checkpatch warnings · 9ef4e935
      Lee Jones authored
      WARNING: line over 80 characters
      +module_param_string(force_device_id, force_device_id, sizeof(force_device_id), 0);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(1);
      
      WARNING: __initdata should be placed after kempld_dmi_table[]
      +static struct dmi_system_id __initdata kempld_dmi_table[] = {
      
      WARNING: line over 80 characters
      +               for (id = kempld_dmi_table; id->matches[0].slot != DMI_NONE; id++)
      
      total: 0 errors, 4 warnings, 771 lines checked
      
      This is part of an effort to clean-up the MFD subsystem.
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      9ef4e935
    • Lee Jones's avatar
      mfd: ipaq-micro: Fix coding style errors/warnings reported by checkpatch · 9336fe91
      Lee Jones authored
      This is part of an effort to clean-up the MFD subsystem.
      
      ERROR: space required before the open parenthesis '('
      +                       if(!micro->msg)
      
      WARNING: unnecessary whitespace before a quoted newline
      +                       dev_dbg(micro->dev, "key message ignored, no handle \n");
      
      WARNING: unnecessary whitespace before a quoted newline
      +                       dev_dbg(micro->dev, "touchscreen message ignored, no handle \n");
      
      WARNING: space prohibited before semicolon
      +               rx->id = (ch & 0xf0) >> 4 ;
      
      total: 1 errors, 3 warnings, 482 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      9336fe91
    • Lee Jones's avatar
      mfd: si476x-cmd: Remedy checkpatch style complains · d69d4212
      Lee Jones authored
      This is part of an effort to clean-up the MFD subsystem.
      
      WARNING: line over 80 characters
      +                        struct si476x_rsq_status_args *rsqargs,
      
      WARNING: line over 80 characters
      +                        struct si476x_rsq_status_report *report)
      
      WARNING: Unnecessary space before function pointer arguments
      +       int (*power_up) (struct si476x_core *,
      
      WARNING: Unnecessary space before function pointer arguments
      +       int (*power_down) (struct si476x_core *,
      
      total: 0 errors, 4 warnings, 1555 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      d69d4212
    • Lee Jones's avatar
      mfd: tc6387xb: Remove unnecessary braces and correct style warnings · d5ce79ff
      Lee Jones authored
      This is part of an effort to clean-up the MFD subsystem.
      
      WARNING: braces {} are not necessary for single statement blocks
      +       if (!iomem) {
      +               return -EINVAL;
      +       }
      
      WARNING: sizeof *tc6387xb should be sizeof(*tc6387xb)
      +       tc6387xb = kzalloc(sizeof *tc6387xb, GFP_KERNEL);
      
      WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
      +       printk(KERN_INFO "Toshiba tc6387xb initialised\n");
      
      total: 0 errors, 3 warnings, 242 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      d5ce79ff
    • Lee Jones's avatar
      mfd: twl6030-irq: Extinguish coding style warnings · 3103de8c
      Lee Jones authored
      This is part of an effort to clean-up the MFD subsystem.
      
      WARNING: please, no space before tabs
      +^IRSV_INTR_OFFSET,  ^I/* Bit 12^IReserved^I^I*/$
      
      WARNING: Missing a blank line after declarations
      +       u8 unmask_value;
      +       ret = twl_i2c_read_u8(TWL_MODULE_PIH, &unmask_value,
      
      WARNING: Missing a blank line after declarations
      +       u8 mask_value;
      +       ret = twl_i2c_read_u8(TWL_MODULE_PIH, &mask_value,
      
      total: 0 errors, 3 warnings, 484 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      3103de8c
    • Lee Jones's avatar
      mfd: wm8350-i2c: Replace spaces with tabs · 6db1c9ba
      Lee Jones authored
      This is part of an effort to clean-up the MFD subsystem.
      
      WARNING: please, no spaces at the start of a line
      +       { "wm8350", 0 },$
      
      WARNING: please, no spaces at the start of a line
      +       { "wm8351", 0 },$
      
      WARNING: please, no spaces at the start of a line
      +       { "wm8352", 0 },$
      
      WARNING: please, no spaces at the start of a line
      +       { }$
      
      total: 0 errors, 4 warnings, 93 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      6db1c9ba
    • Lee Jones's avatar
      mfd: max8925-core: Fix 'missing blank line after declarations' warning · a5c5accf
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      a5c5accf
    • Lee Jones's avatar
      mfd: twl4030-irq: Fix style warnings relating to pr_warn() and sizeof() · 04aa4438
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      04aa4438
    • Lee Jones's avatar
      mfd: lp8788-irq: Fix 'missing blank line after declarations' warning · 52149ad2
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      52149ad2
    • Lee Jones's avatar
      mfd: ezx-pcap: Repair coding style errors picked up with checkpatch · 0309528a
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      0309528a
  3. 22 Jul, 2014 5 commits
  4. 21 Jul, 2014 11 commits
    • Lee Jones's avatar
      mfd: max8925-i2c: Fix 'blank line after declarations' warning · 4ed8f718
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      4ed8f718
    • Lee Jones's avatar
      mfd: max77686: Fix 'line over 80 chars' warning · a31b0fa6
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      a31b0fa6
    • Javier Martinez Canillas's avatar
      mfd: max77686: Remove unneeded OOM error message · 8a789b64
      Javier Martinez Canillas authored
      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: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      8a789b64
    • Javier Martinez Canillas's avatar
      mfd: max77686: Make error checking consistent · c0e0fcda
      Javier Martinez Canillas authored
      Error checking across the driver is mostly consistent besides
      a few exceptions, so change these exceptions for consistency.
      Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      c0e0fcda
    • Javier Martinez Canillas's avatar
      mfd: max77686: Return correct error when pdata isn't found · b452d7b6
      Javier Martinez Canillas authored
      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: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      b452d7b6
    • Javier Martinez Canillas's avatar
      mfd: max77686: Make platform data over-rule DT · ede04c61
      Javier Martinez Canillas authored
      The function max77802_i2c_parse_dt_pdata() should only be called
      if there isn't already platform data for the device.
      Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      ede04c61
    • Javier Martinez Canillas's avatar
      mfd: max77686: Don't define dummy function if OF isn't enabled · 154409e4
      Javier Martinez Canillas authored
      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: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      154409e4
    • Javier Martinez Canillas's avatar
      mfd: max77686: Add power management support · 2b52b5d5
      Javier Martinez Canillas authored
      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: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      2b52b5d5
    • Javier Martinez Canillas's avatar
      mfd: max77686: Convert to use regmap_irq · 6f1c1e71
      Javier Martinez Canillas authored
      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: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reviewed-by: default avatarDoug Anderson <dianders@chromium.org>
      Tested-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      6f1c1e71
    • Chen-Yu Tsai's avatar
      mfd: sun6i-prcm: Add support for Allwinner A23 PRCM · 4eb9560b
      Chen-Yu Tsai authored
      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: default avatarChen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      4eb9560b
    • Lee Jones's avatar
      mfd: ab8500-debugfs: BIG clean-up · 4362175d
      Lee Jones authored
      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: default avatarLee Jones <lee.jones@linaro.org>
      4362175d
  5. 11 Jul, 2014 2 commits