14 Jan, 2016

1 commit

  • WARNING: line over 80 characters
    +#define ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ib
    t*/

    WARNING: line over 80 characters
    +#define ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat*/

    WARNING: suspect code indent for conditional statements (16, 20)
    + if (!strcmp(name, dev_name(gpadc->dev)))
    + return gpadc;

    WARNING: suspect code indent for conditional statements (0, 16)
    +if (ad_value < 0) {
    + dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n",

    WARNING: quoted string split across lines
    + dev_err(gpadc->dev, "GPADC to voltage conversion failed ch:"
    + " %d AD: 0x%x\n", channel, ad_value);

    WARNING: Missing a blank line after declarations
    + int raw_data;
    + raw_data = ab8500_gpadc_double_read_raw(gpadc, channel,

    WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
    + msleep(10);

    ERROR: else should follow close brace '}'
    + }
    + else

    WARNING: line over 80 characters
    + delay_max = 10000; /* large range to optimise sleep mode */

    WARNING: line over 80 characters
    + gpadc->cal_data[ADC_INPUT_IBAT].gain = V_gain * V2A_gain;

    WARNING: line over 80 characters
    + gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL);

    WARNING: Possible unnecessary 'out of memory' message
    + if (!gpadc) {
    + dev_err(&pdev->dev, "Error: No memory\n");

    WARNING: space prohibited before semicolon
    + return ;

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

    WARNING: quoted string split across lines
    +MODULE_AUTHOR("Arun R Murthy, Daniel Willerud, Johan Palsson,"
    + "M'boumba Cedric Madianga");

    total: 1 errors, 14 warnings, 1089 lines checked

    Cc: Linus Walleij
    Signed-off-by: Lee Jones

    Lee Jones
     

22 Jun, 2015

1 commit

  • Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
    bogus threaded irq requests") threaded IRQs without a primary handler
    need to be requested with IRQF_ONESHOT, otherwise the request will fail.

    So pass the IRQF_ONESHOT flag in this case.

    The semantic patch that makes this change is available
    in scripts/coccinelle/misc/irqf_oneshot.cocci.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Lee Jones

    Fabio Estevam
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

05 Dec, 2014

1 commit

  • After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
    selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
    depending on CONFIG_PM_RUNTIME may now be changed to depend on
    CONFIG_PM.

    Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
    drivers/mfd/.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Lee Jones

    Rafael J. Wysocki
     

20 Oct, 2014

1 commit


15 Aug, 2013

2 commits

  • Add CONFIG_PM_SLEEP to suspend/resume functions to fix the build
    warnings when CONFIG_PM_SLEEP is not selected. This is because
    sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
    when the CONFIG_PM_SLEEP is enabled.

    drivers/mfd/ab8500-gpadc.c:891:12: warning: 'ab8500_gpadc_suspend' defined but not used [-Wunused-function]
    drivers/mfd/ab8500-gpadc.c:903:12: warning: 'ab8500_gpadc_resume' defined but not used [-Wunused-function]

    Acked-by: Linus Walleij
    Signed-off-by: Jingoo Han
    Signed-off-by: Lee Jones

    Jingoo Han
     
  • Add CONFIG_PM_RUNTIME to runtime_suspend/runtime_resume functions
    to fix the build warnings when CONFIG_PM_RUNTIME is not selected.
    This is because runtime PM callbacks defined by SET_RUNTIME_PM_OPS
    are only used when the CONFIG_PM_RUNTIME is enabled.

    drivers/mfd/ab8500-gpadc.c:870:12: warning: 'ab8500_gpadc_runtime_suspend' defined but not used [-Wunused-function]
    drivers/mfd/ab8500-gpadc.c:878:12: warning: 'ab8500_gpadc_runtime_resume' defined but not used [-Wunused-function]

    Acked-by: Linus Walleij
    Signed-off-by: Jingoo Han
    Signed-off-by: Lee Jones

    Jingoo Han
     

11 Jul, 2013

1 commit

  • Pull MFD update from Samuel Ortiz:
    "For the 3.11 merge we only have one new MFD driver for the Kontron
    PLD.

    But we also have:
    - Support for the TPS659038 PMIC from the palmas driver.
    - Intel's Coleto Creek and Avoton SoCs support from the lpc_ich
    driver.
    - RTL8411B support from the rtsx driver.
    - More DT support for the Arizona, max8998, twl4030-power and the
    ti_am335x_tsadc drivers.
    - The SSBI driver move under MFD.
    - A conversion to the devm_* API for most of the MFD drivers.
    - The twl4030-power got split from twl-core into its own module.
    - A major ti_am335x_adc cleanup, leading to a proper DT support.
    - Our regular arizona and wm* updates and cleanups from the Wolfson
    folks.
    - A better error handling and initialization, and a regulator
    subdevice addition for the 88pm80x driver.
    - A bulk platform_set_drvdata() call removal that's no longer need
    since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when
    no driver is bound")

    * tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (102 commits)
    mfd: sec: Provide max_register to regmap
    mfd: wm8994: Remove duplicate check for active JACKDET
    MAINTAINERS: Add include directory to MFD file patterns
    mfd: sec: Remove fields not used since regmap conversion
    watchdog: Kontron PLD watchdog timer driver
    mfd: max8998: Add support for Device Tree
    regulator: max8998: Use arrays for specifying voltages in platform data
    mfd: max8998: Add irq domain support
    regulator: palmas: Add TPS659038 support
    mfd: Kontron PLD mfd driver
    mfd: palmas: Add TPS659038 PMIC support
    mfd: palmas: Add SMPS10_BOOST feature
    mfd: palmas: Check if irq is valid
    mfd: lpc_ich: iTCO_wdt patch for Intel Coleto Creek DeviceIDs
    mfd: twl-core: Change TWL6025 references to TWL6032
    mfd: davinci_voicecodec: Fix build breakage
    mfd: vexpress: Make the driver optional for arm and arm64
    mfd: htc-egpio: Use devm_ioremap_nocache() instead of ioremap_nocache()
    mfd: davinci_voicecodec: Convert to use devm_* APIs
    mfd: twl4030-power: Fix relocking on error
    ...

    Linus Torvalds
     

13 Jun, 2013

1 commit


04 Jun, 2013

1 commit

  • The "runtime idle" helper routine, rpm_idle(), currently ignores
    return values from .runtime_idle() callbacks executed by it.
    However, it turns out that many subsystems use
    pm_generic_runtime_idle() which checks the return value of the
    driver's callback and executes pm_runtime_suspend() for the device
    unless that value is not 0. If that logic is moved to rpm_idle()
    instead, pm_generic_runtime_idle() can be dropped and its users
    will not need any .runtime_idle() callbacks any more.

    Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
    routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
    ata_port_runtime_idle(), respectively, as well as a few drivers'
    ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
    been returned by the .runtime_idle() callback executed by it.

    To reduce overall code bloat, make the changes described above.

    Tested-by: Mika Westerberg
    Tested-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Kevin Hilman
    Reviewed-by: Ulf Hansson
    Acked-by: Alan Stern

    Rafael J. Wysocki
     

17 May, 2013

1 commit


26 Apr, 2013

1 commit

  • Apparently the ab8500_gpadc_sw_hw_convert function got renamed
    from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in
    commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion",
    but the export for this function did not get changed at the
    same time, causing this allyesconfig error:

    ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!

    This patch fixes the export.

    Signed-off-by: Arnd Bergmann
    Cc: M'boumba Cedric Madianga
    Cc: Lee Jones
    Cc: Mattias WALLIN
    Cc: Michel JAOUEN
    Acked-by: Linus Walleij
    Signed-off-by: Samuel Ortiz

    Arnd Bergmann
     

08 Apr, 2013

1 commit


12 Mar, 2013

1 commit

  • Since commit c8801a8e
    "regulator: core: Mark all get and enable calls as __must_check",
    we must check return value of regulator_enable() to silence below build warning.

    CC drivers/mfd/ab8500-gpadc.o
    drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_runtime_resume':
    drivers/mfd/ab8500-gpadc.c:598:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
    drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_probe':
    drivers/mfd/ab8500-gpadc.c:655:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

    Also convert to devm_regulator_get(), this fixes a missing regulator_put() call
    in ab8500_gpadc_remove().

    Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     

07 Mar, 2013

7 commits


04 Feb, 2013

5 commits


29 Nov, 2012

3 commits

  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: Srinidhi Kasagar
    Cc: Peter Tyser
    Cc: Daniel Walker
    Cc: Bryan Huntsman
    Acked-by: David Brown
    Acked-by: Linus Walleij
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Srinidhi Kasagar
    Cc: Peter Tyser
    Cc: Daniel Walker
    Cc: Bryan Huntsman
    Acked-by: David Brown
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Srinidhi Kasagar
    Cc: Peter Tyser
    Cc: Daniel Walker
    Cc: Bryan Huntsman
    Acked-by: David Brown
    Acked-by: Linus Walleij
    Acked-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

02 Oct, 2012

1 commit

  • Pull the trivial tree from Jiri Kosina:
    "Tiny usual fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    doc: fix old config name of kprobetrace
    fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
    btrfs: fix the commment for the action flags in delayed-ref.h
    btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
    vfs: fix kerneldoc for generic_fh_to_parent()
    treewide: fix comment/printk/variable typos
    ipr: fix small coding style issues
    doc: fix broken utf8 encoding
    nfs: comment fix
    platform/x86: fix asus_laptop.wled_type module parameter
    mfd: printk/comment fixes
    doc: getdelays.c: remember to close() socket on error in create_nl_socket()
    doc: aliasing-test: close fd on write error
    mmc: fix comment typos
    dma: fix comments
    spi: fix comment/printk typos in spi
    Coccinelle: fix typo in memdup_user.cocci
    tmiofb: missing NULL pointer checks
    tools: perf: Fix typo in tools/perf
    tools/testing: fix comment / output typos
    ...

    Linus Torvalds
     

02 Sep, 2012

1 commit


09 Jul, 2012

2 commits


20 May, 2012

2 commits


09 Jan, 2012

1 commit

  • This moves all the header files related to the abx500 family into
    a common include directory below mfd. From now on we place any
    subchip header in that directory. Headers previously in e.g.
    get prefixed and are now e.g.
    . The top-level abstract interface
    remains in .

    Signed-off-by: Linus Walleij
    Signed-off-by: Samuel Ortiz

    Linus Walleij
     

24 Oct, 2011

1 commit

  • Refactor the GPADC interface to avoid bugs in calling code:

    - ab8500_gpadc_[convert|read_raw|ad_to_voltage] clarifies
    each functions use case, *convert wraps *read_raw, and we
    can access raw ADC values properly.
    - Renamed gpadc function arguments from "input" to "channel" to
    clarify use, so we don't get confused again.

    Signed-off-by: Kalle Komierowski
    Reviewed-by: Mattias Wallin
    Reviewed-by: John Beckett
    Signed-off-by: Linus Walleij
    Signed-off-by: Samuel Ortiz

    Karl Komierowski
     

27 May, 2011

2 commits


31 Mar, 2011

1 commit