16 Jul, 2019

1 commit

  • Pull MFD updates from Lee Jones:
    "Core Frameworks:
    - Set 'struct device' fwnode when registering a new device

    New Drivers:
    - Add support for ROHM BD70528 PMIC

    New Device Support:
    - Add support for LP87561 4-Phase Regulator to TI LP87565 PMIC
    - Add support for RK809 and RK817 to Rockchip RK808
    - Add support for Lid Angle to ChromeOS core
    - Add support for CS47L15 CODEC to Madera core
    - Add support for CS47L92 CODEC to Madera core
    - Add support for ChromeOS (legacy) Accelerometers in ChromeOS core
    - Add support for Add Intel Elkhart Lake PCH to Intel LPSS

    New Functionality:
    - Provide regulator supply information when registering; madera-core
    - Additional Device Tree support; lp87565, madera, cros-ec, rohm,bd71837-pmic
    - Allow over-riding power button press via Device Tree; rohm-bd718x7
    - Differentiate between running processors; cros_ec_dev

    Fix-ups:
    - Big header file update; cros_ec_commands.h
    - Split header per-subsystem; rohm-bd718x7
    - Remove superfluous code; menelaus, cs5535-mfd, cs47lXX-tables
    - Trivial; sorting, coding style; intel-lpss-pci
    - Only remove Power Off functionality if set locally; rk808
    - Make use for Power Off Prepare(); rk808
    - Fix spelling mistake in header guards; stmfx
    - Properly free IDA resources
    - SPDX fixups; cs47lXX-tables, madera
    - Error path fixups; hi655x-pmic

    Bug Fixes:
    - Add missing break in case() statement
    - Repair undefined behaviour when not initialising variables; arizona-core, madera-core
    - Fix reference to Device Tree documentation; madera"

    * tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
    mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk
    mfd: madera: Fixup SPDX headers
    mfd: madera: Remove some unused registers and fix some defaults
    mfd: intel-lpss: Release IDA resources
    mfd: intel-lpss: Add Intel Elkhart Lake PCH PCI IDs
    mfd: cs5535-mfd: Remove ifdef OLPC noise
    mfd: stmfx: Fix macro definition spelling
    dt-bindings: mfd: Add link to ROHM BD71847 Datasheet
    MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERS
    mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice
    mfd: rk808: Prepare rk805 for poweroff
    mfd: rk808: Check pm_power_off pointer
    mfd: cros_ec: differentiate SCP from EC by feature bit
    dt-bindings: Add binding for cros-ec-rpmsg
    mfd: madera: Add Madera core support for CS47L92
    mfd: madera: Add Madera core support for CS47L15
    mfd: madera: Update DT bindings to add additional CODECs
    mfd: madera: Add supply mapping for MICVDD
    mfd: madera: Fix potential uninitialised use of variable
    mfd: madera: Fix bad reference to pinctrl.txt file
    ...

    Linus Torvalds
     

02 Jul, 2019

1 commit


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

11 Sep, 2018

1 commit

  • The IRQ work is added before the struct rtc is allocated and registered,
    but this struct is used in the IRQ handler. This may lead to a NULL pointer
    dereference.

    Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc
    before calling menelaus_add_irq_work.

    Also, this solves a possible leak as the RTC is never released.

    Signed-off-by: Alexandre Belloni
    Signed-off-by: Lee Jones

    Alexandre Belloni
     

27 Apr, 2017

1 commit


16 Feb, 2016

1 commit

  • Most arches have an asm/gpio.h that merely includes linux/gpio.h. The
    others select ARCH_HAVE_CUSTOM_GPIO_H, and when that's selected,
    linux/gpio.h includes asm/gpio.h.

    Therefore, code should include linux/gpio.h instead of including asm/gpio.h
    directly.

    Remove includes of asm/gpio.h, adding an include of linux/gpio.h when
    necessary.

    This is a follow-on to 7563bbf89d06 ("gpiolib/arches: Centralise
    bolierplate asm/gpio.h").

    Signed-off-by: Bjorn Helgaas
    Acked-by: Thomas Gleixner
    Acked-by: Arnd Bergmann
    Acked-by: Alexandre Courbot
    Signed-off-by: Linus Walleij

    Bjorn Helgaas
     

30 Mar, 2015

2 commits


23 Mar, 2015

1 commit

  • Even if bus is not hot-pluggable, the devices can be unbound from the
    driver via sysfs, so we should not be using __exit annotations on
    remove() methods. The only exception is drivers registered with
    platform_driver_probe() which specifically disables sysfs bind/unbind
    attributes.

    Signed-off-by: Dmitry Torokhov
    Acked-by: Tony Lindgren
    Signed-off-by: Lee Jones

    Dmitry Torokhov
     

26 Sep, 2014

2 commits

  • Convert a zero return value on error to a negative one, as returned
    elsewhere in the function.

    Additionally, converted 1 << 7 to BIT(7) at the suggestion of Lee Jones.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Lee Jones

    Julia Lawall
     
  • If vtg is NULL, it is not possible to access its mode_reg field. At all
    sites where the static function menelaus_set_voltage is called, the first
    argument is the address of a structure defined in the file. So, the null
    test is unnecessary and is removed. Also, a label is done away with.

    This problem was found using the following Coccinelle semantic match:

    //
    @@
    expression E, E1;
    identifier f;
    statement S1,S2,S3;
    @@

    * if (E == NULL)
    {
    ... when != if (E == NULL) S1 else S2
    when != E = E1
    * E->f
    ... when any
    return ...;
    }
    else S3
    //

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Lee Jones

    Himangi Saraogi
     

03 Jun, 2014

1 commit


20 Aug, 2013

1 commit


07 Aug, 2013

1 commit

  • 'mmc_callback_data' and 'vtg' are pointers.

    Fix the following sparse warning:

    drivers/mfd/menelaus.c:445:43: warning: Using plain integer as NULL pointer
    drivers/mfd/menelaus.c:469:20: warning: Using plain integer as NULL pointer

    Signed-off-by: Jingoo Han
    Signed-off-by: Lee Jones

    Jingoo Han
     

31 Jul, 2013

1 commit


16 Oct, 2012

1 commit


21 Aug, 2012

1 commit

  • flush[_delayed]_work_sync() are now spurious. Mark them deprecated
    and convert all users to flush[_delayed]_work().

    If you're cc'd and wondering what's going on: Now all workqueues are
    non-reentrant and the regular flushes guarantee that the work item is
    not pending or running on any CPU on return, so there's no reason to
    use the sync flushes at all and they're going away.

    This patch doesn't make any functional difference.

    Signed-off-by: Tejun Heo
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Ian Campbell
    Cc: Jens Axboe
    Cc: Mattia Dongili
    Cc: Kent Yoder
    Cc: David Airlie
    Cc: Jiri Kosina
    Cc: Karsten Keil
    Cc: Bryan Wu
    Cc: Benjamin Herrenschmidt
    Cc: Alasdair Kergon
    Cc: Mauro Carvalho Chehab
    Cc: Florian Tobias Schandinat
    Cc: David Woodhouse
    Cc: "David S. Miller"
    Cc: linux-wireless@vger.kernel.org
    Cc: Anton Vorontsov
    Cc: Sangbeom Kim
    Cc: "James E.J. Bottomley"
    Cc: Greg Kroah-Hartman
    Cc: Eric Van Hensbergen
    Cc: Takashi Iwai
    Cc: Steven Whitehouse
    Cc: Petr Vandrovec
    Cc: Mark Fasheh
    Cc: Christoph Hellwig
    Cc: Avi Kivity

    Tejun Heo
     

04 Nov, 2011

1 commit

  • * 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6: (80 commits)
    mfd: Fix missing abx500 header file updates
    mfd: Add missing include to intel_msic
    x86, mrst: add platform support for MSIC MFD driver
    mfd: Expose TurnOnStatus in ab8500 sysfs
    mfd: Remove support for early drop ab8500 chip
    mfd: Add support for ab8500 v3.3
    mfd: Add ab8500 interrupt disable hook
    mfd: Convert db8500-prcmu panic() into pr_crit()
    mfd: Refactor db8500-prcmu request_clock() function
    mfd: Rename db8500-prcmu init function
    mfd: Fix db5500-prcmu defines
    mfd: db8500-prcmu voltage domain consumers additions
    mfd: db8500-prcmu reset code retrieval
    mfd: db8500-prcmu tweak for modem wakeup
    mfd: Add db8500-pcmu watchdog accessor functions for watchdog
    mfd: hwacc power state db8500-prcmu accessor
    mfd: Add db8500-prcmu accessors for PLL and SGA clock
    mfd: Move to the new db500 PRCMU API
    mfd: Create a common interface for dbx500 PRCMU drivers
    mfd: Initialize DB8500 PRCMU regs
    ...

    Fix up trivial conflicts in
    arch/arm/mach-imx/mach-mx31moboard.c
    arch/arm/mach-omap2/board-omap3beagle.c
    arch/arm/mach-u300/include/mach/irqs.h
    drivers/mfd/wm831x-spi.c

    Linus Torvalds
     

24 Oct, 2011

1 commit


08 Aug, 2011

1 commit


24 Dec, 2010

1 commit

  • flush_scheduled_work() is deprecated and scheduled to be removed.

    * In menelaus, flush menelaus->work directly on probe failure. Also,
    make sure the work isn't running on removal.

    * In tps65010, cancel_delayed_work() + flush_scheduled_work() ->
    cancel_delayed_work_sync(). While at it, remove unnecessary (void)
    casts on return value, and use schedule_delayed_work() and
    to_delayed_work() instead of using delayed_work's internal work
    field.

    Signed-off-by: Tejun Heo
    Cc: Samuel Ortiz

    Tejun Heo
     

12 Aug, 2010

2 commits

  • This patch is originally done by Carlos Eduardo Aguiar. Original fix is
    commit 3305829b2816072b9c8ed01374b205ae4de74027 in
    git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git

    Author modified the fix for mainline version of menelaus.

    Signed-off-by: Jarkko Nikula
    Cc: Carlos Eduardo Aguiar
    Signed-off-by: Samuel Ortiz

    Jarkko Nikula
     
  • We are modifying register value instead of return value.

    This fix is originally done by Carlos Eduardo Aguiar. Original fix is
    commit bb4e91722e29efe31587d2cc664b6def645aecd9 in
    git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git

    Author modified the fix for mainline version of menelaus.

    Signed-off-by: Jarkko Nikula
    Cc: Carlos Eduardo Aguiar
    Signed-off-by: Samuel Ortiz

    Jarkko Nikula
     

03 Jun, 2010

1 commit

  • I2C drivers can use the clientdata-pointer to point to private data. As I2C
    devices are not really unregistered, but merely detached from their driver, it
    used to be the drivers obligation to clear this pointer during remove() or a
    failed probe(). As a couple of drivers forgot to do this, it was agreed that it
    was cleaner if the i2c-core does this clearance when appropriate, as there is
    no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
    This feature was added to the core with commit
    e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

    As there is no need anymore to clear the clientdata-pointer, remove all current
    occurrences in the drivers to simplify the code and prevent confusion.

    Signed-off-by: Wolfram Sang
    Acked-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Acked-by: Richard Purdie
    Acked-by: Dmitry Torokhov
    Signed-off-by: Jean Delvare

    Wolfram Sang
     

28 May, 2010

1 commit

  • Fix I2C-drivers which missed setting clientdata to NULL before freeing the
    structure it points to. Also fix drivers which do this _after_ the structure
    was freed already.

    Signed-off-by: Wolfram Sang
    Acked-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Wolfram Sang
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

21 Oct, 2009

1 commit

  • Move the remaining headers under plat-omap/include/mach
    to plat-omap/include/plat. Also search and replace the
    files using these headers to include using the right path.

    This was done with:

    #!/bin/bash
    mach_dir_old="arch/arm/plat-omap/include/mach"
    plat_dir_new="arch/arm/plat-omap/include/plat"
    headers=$(cd $mach_dir_old && ls *.h)
    omap_dirs="arch/arm/*omap*/ \
    drivers/video/omap \
    sound/soc/omap"
    other_files="drivers/leds/leds-ams-delta.c \
    drivers/mfd/menelaus.c \
    drivers/mfd/twl4030-core.c \
    drivers/mtd/nand/ams-delta.c"

    for header in $headers; do
    old="#include

    Tony Lindgren
     

04 Jan, 2009

1 commit

  • ove the menelaus driver from drivers/i2c/chips to drivers/mfd
    since it's more of a multi-function device than anything else,
    and since Jean is trying to vanish drivers/i2c/chips ASAP.

    One way to think of these chips are as the PMIC family most
    used with OMAP2 generation chips.

    Signed-off-by: David Brownell
    Signed-off-by: Samuel Ortiz

    David Brownell