12 Jul, 2016

1 commit


14 Jan, 2016

1 commit

  • WARNING: Block comments use a trailing */ on a separate line
    + * */

    WARNING: Block comments use a trailing */ on a separate line
    + * bank on higher 8 bits and reg in lower */

    WARNING: Block comments use a trailing */ on a separate line
    + * bank on higher 8 bits and reg in lower */

    WARNING: suspect code indent for conditional statements (8, 24)
    + if (unlikely(*offset == 17))
    + *offset = 24;

    WARNING: suspect code indent for conditional statements (8, 24)
    + if (unlikely(*offset == 16))
    + *offset = 25;

    WARNING: suspect code indent for conditional statements (8, 24)
    + if ((i == 3) && (*offset >= 24))
    + *offset += 2;

    WARNING: ENOSYS means 'invalid syscall nr' and nothing else
    + return -ENOSYS;

    WARNING: static const char * array should probably be static const char * const
    + static const char *switch_off_status[] = {

    WARNING: static const char * array should probably be static const char * const
    + static const char *turn_on_status[] = {

    total: 0 errors, 9 warnings, 1867 lines checked

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

    Lee Jones
     

04 Dec, 2015

1 commit

  • The platforms that use the AB8500 define all IRQ resources in the
    device tree and they are automatically populated by matching
    the .of_compatible string. These static resources are just
    surplus baggage these days.

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

    Linus Walleij
     

11 Aug, 2015

1 commit

  • set_irq_flags is ARM specific with custom flags which have genirq
    equivalents. Convert drivers to use the genirq interfaces directly, so we
    can kill off set_irq_flags. The translation of flags is as follows:

    IRQF_VALID -> !IRQ_NOREQUEST
    IRQF_PROBE -> !IRQ_NOPROBE
    IRQF_NOAUTOEN -> IRQ_NOAUTOEN

    For IRQs managed by an irqdomain, the irqdomain core code handles clearing
    and setting IRQ_NOREQUEST already, so there is no need to do this in
    .map() functions and we can simply remove the set_irq_flags calls. Some
    users also modify IRQ_NOPROBE and this has been maintained although it
    is not clear that is really needed. There appears to be a great deal of
    blind copy and paste of this code.

    Signed-off-by: Rob Herring
    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones

    Rob Herring
     

22 Jun, 2015

1 commit


20 Oct, 2014

1 commit


20 Aug, 2014

1 commit


09 Jul, 2014

2 commits

  • 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 = 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
    Signed-off-by: Lee Jones

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

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

    Lee Jones
     

26 Jun, 2014

1 commit

  • The AD8500 defines itself as interrupt-controller in DT,
    but it doesn't assign DT node to IRQ domain when creates it.
    As result, of_irq_xx() helpers don't work because they can't
    find necessary IRQ domain.

    Hence, fix it by assigning AD8500 core device DT node to IRQ
    domain when it's created.

    This patch fixes STE u8500 Snowball boot failure reported by Kevin Hilman
    https://lkml.org/lkml/2014/5/27/624

    Reported-and-tested-by: Kevin Hilman
    Signed-off-by: Grygorii Strashko
    Reviewed-by: Linus Walleij
    Signed-off-by: Lee Jones

    Grygorii Strashko
     

04 Mar, 2014

1 commit

  • The DBx500 and ABx500 should be getting their IRQs from the
    device tree and nowhere else. Get rid of all the static assignments
    everywhere, delete it from the driver, platform data and the
    board files in one swift strike.

    Lots of cross-dependencies in the MFD drivers for PRCMU and
    AB8500 makes it necessary to strike everywhere at once to
    eradicate IRQs passed as resources and platform data to the left
    and right around the platform.

    Cc: Mark Brown
    Cc: Samuel Ortiz
    Acked-by: Lee Jones
    Signed-off-by: Linus Walleij

    Linus Walleij
     

21 Jan, 2014

1 commit


06 Jan, 2014

1 commit

  • As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting
    refcounting pointers in original mfd_cell arrays"), the "cell" parameter of
    mfd_add_devices() is "const" again. Hence make all cell data passed to
    mfd_add_devices() const where possible.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Lee Jones

    Geert Uytterhoeven
     

13 Jun, 2013

4 commits


17 May, 2013

3 commits

  • When booting with Device Tree enabled the MFD core uses each device's
    compatible string to find and allocate its associated of_node pointer,
    which in turn is passed to the driver via the platform_device struct.
    Without it, the driver won't be able to interrogate the Device Tree or
    locate suitable regulators and will most likely fail to probe.

    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • When we're using Device Tree to enable GPIO drivers we're forced to be
    OS agnostic, thus we are forbidden use names like pinctrl as they are
    specific only to Linux, at least for the time being. However, when we
    are registering devices using internal systems such as MFD or platform
    registration, we can use such terminology. In this case we can and
    should use the platform device ID mechanism to specify which device we
    wish to utilise by detailing pinctrl-.

    This patch fixes a regression that when booting with Device Tree
    enabled the ABx500 GPIO/Pinctrl devices are not probed.

    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • The AB8500 debug code which was merged in parallell with the
    multiplatform work incidentally introduced a new instance using
    the header which is now deleted, causing this
    build regression:

    drivers/mfd/ab8500-debugfs.c:95:23:
    fatal error: mach/irqs.h: No such file or directory
    compilation terminated.
    make[4]: *** [drivers/mfd/ab8500-debugfs.o] Error 1

    The code most certainly never worked with device tree either
    since that does not rely on this kind of hard-coded interrupt
    numbers.

    Fix the problem at the root by passing it as a named resource
    from the ab8500-core driver. Use an untyped resource to
    stop the MFD core from remapping this IRQ relative to the
    AB8500 irqdomain.

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

    Linus Walleij
     

09 Apr, 2013

2 commits


07 Mar, 2013

11 commits


25 Feb, 2013

1 commit

  • Pull MFS updates from Samuel Ortiz:
    "This is the MFD pull request for the 3.9 merge window.

    No new drivers this time, but a bunch of fairly big cleanups:

    - Roger Quadros worked on a OMAP USBHS and TLL platform data
    consolidation, OMAP5 support and clock management code cleanup.

    - The first step of a major sync for the ab8500 driver from Lee
    Jones. In particular, the debugfs and the sysct interfaces got
    extended and improved.

    - Peter Ujfalusi sent a nice patchset for cleaning and fixing the
    twl-core driver, with a much needed module id lookup code
    improvement.

    - The regular wm5102 and arizona cleanups and fixes from Mark Brown.

    - Laxman Dewangan extended the palmas APIs in order to implement the
    palmas GPIO and rt drivers.

    - Laxman also added DT support for the tps65090 driver.

    - The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra
    and Darren Hart.

    - Linus Walleij patchset for the ab8500 driver allowed ab8500 and
    ab9540 based devices to switch to the new abx500 pin-ctrl driver.

    - The max8925 now has device tree and irqdomain support thanks to
    Qing Xu.

    - The recently added rtsx driver got a few cleanups and fixes for a
    better card detection code path and now also supports the RTS5227
    chipset, thanks to Wei Wang and Roger Tseng."

    * tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (109 commits)
    mfd: lpc_ich: Use devres API to allocate private data
    mfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH
    mfd: lpc_sch: Accomodate partial population of the MFD devices
    mfd: da9052-i2c: Staticize da9052_i2c_fix()
    mfd: syscon: Fix sparse warning
    mfd: twl-core: Fix kernel panic on boot
    mfd: rtsx: Fix issue that booting OS with SD card inserted
    mfd: ab8500: Fix compile error
    mfd: Add missing GENERIC_HARDIRQS dependecies
    Documentation: Add docs for max8925 dt
    mfd: max8925: Add dts
    mfd: max8925: Support dt for backlight
    mfd: max8925: Fix onkey driver irq base
    mfd: max8925: Fix mfd device register failure
    mfd: max8925: Add irqdomain for dt
    mfd: vexpress: Allow vexpress-sysreg to self-initialise
    mfd: rtsx: Support RTS5227
    mfd: rtsx: Implement driving adjustment to device-dependent callbacks
    mfd: vexpress: Add pseudo-GPIO based LEDs
    mfd: ab8500: Rename ab8500 to abx500 for hwmon driver
    ...

    Linus Torvalds
     

21 Feb, 2013

1 commit

  • Pull battery updates from Anton Vorontsov:
    "Four new drivers:

    - goldfish_battery:

    This is Android Emulator battery driver. Originally from Google,
    but Intel folks reshaped it for mainline

    - pm2301_charger:

    A new driver for ST-Ericsson 2301 Power Management chip, uses
    AB8500 battery management core

    - qnap-poweroff:

    The driver adds poweroff functionality for QNAP NAS boxes

    - restart-poweroff:

    A generic driver that implements 'power off by restarting'. The
    actual poweroff functionality is implemented through a bootloader,
    so Linux' task is just to restart the box. The driver is useful on
    Buffalo Linkstation LS-XHL and LS-CHLv2 boards. Andrew Lunn worked
    on submitting the driver (as well as qnap-poweroff above).

    Additionally:

    - A lot of fixes for ab8500 drivers. This is a part of efforts of
    syncing internal ST-Ericsson development tree with the mainline.
    Lee Jones @ Linaro worked on compilation and reshaping these
    series.

    - New health properties for the power supplies: "Watchdog timer
    expire" and "Safety timer expire"

    - As usual, a bunch of fixes/cleanups here and there"

    * tag 'for-v3.9' of git://git.infradead.org/battery-2.6: (81 commits)
    bq2415x_charger: Add support for offline and 100mA mode
    generic-adc-battery: Fix forever loop in gab_remove()
    goldfish_battery: Add missing GENERIC_HARDIRQS dependency
    da9030_battery: Include notifier.h
    bq27x00_battery: Fix reporting battery temperature
    power/reset: Remove newly introduced __dev* annotations
    lp8727_charger: Small cleanup in naming
    ab8500_btemp: Demote initcall sequence
    ds2782_battery: Add power_supply_changed() calls for proper uevent support
    power: Add battery driver for goldfish emulator
    u8500-charger: Delay for USB enumeration
    ab8500-bm: Remove individual [charger|btemp|fg|chargalg] pdata structures
    ab8500-charger: Do not touch VBUSOVV bits
    ab8500-fg: Use correct battery charge full design
    pm2301: LPN mode control support
    pm2301: Enable vbat low monitoring
    ab8500-bm: Flush all work queues before suspending
    ab8500-fg: Go to INIT_RECOVERY when charger removed
    ab8500-charger: Add support for autopower on AB8505 and AB9540
    abx500-chargalg: Add new sysfs interface to get current charge status
    ...

    Fix up fairly straightforward conflicts in the ab8500 driver. But since
    it seems to be ARM-specific, I can't even compile-test the result..

    Linus Torvalds
     

14 Feb, 2013

3 commits


08 Feb, 2013

2 commits