14 Dec, 2020

1 commit

  • At some systems, the pinctrl setting will be lost or needs to
    set as "sleep" state to save power consumption. So, we need to
    configure pinctrl as "sleep" state when system enters suspend,
    and as "default" state after system resumes. In this way, the
    pinctrl value can be recovered as "default" state after resuming.

    Signed-off-by: Peter Chen
    Signed-off-by: Vipul Kumar

    Peter Chen
     

14 Sep, 2020

1 commit

  • The only usage of fixed_voltage_ops and fixed_voltage_clkenabled_ops is
    to assign their address the ops field in the regulator_desc struct,
    which is a const pointer. Make them const to allow the compiler to put
    them in read-only memory.
    make them const to allow the compiler to put them in read-only memory.

    Signed-off-by: Rikard Falkeborn
    Link: https://lore.kernel.org/r/20200913084114.8851-3-rikard.falkeborn@gmail.com
    Signed-off-by: Mark Brown

    Rikard Falkeborn
     

22 Aug, 2020

1 commit

  • Fix below warnings when CONFIG_OF=n:

    drivers/regulator/fixed.c:48:36: warning: ‘fixed_clkenable_data’ defined but not used [-Wunused-const-variable=]
    48 | static const struct fixed_dev_type fixed_clkenable_data = {
    | ^~~~~~~~~~~~~~~~~~~~
    drivers/regulator/fixed.c:44:36: warning: ‘fixed_voltage_data’ defined but not used [-Wunused-const-variable=]
    44 | static const struct fixed_dev_type fixed_voltage_data = {
    | ^~~~~~~~~~~~~~~~~~

    Signed-off-by: Jisheng Zhang
    Link: https://lore.kernel.org/r/20200821111403.3e8b58a3@xhacker.debian
    Signed-off-by: Mark Brown

    Jisheng Zhang
     

11 Aug, 2020

1 commit


16 Jun, 2020

1 commit

  • The word 'descriptor' is misspelled throughout the tree.

    Fix it up accordingly:
    decriptors -> descriptors

    Signed-off-by: Kieran Bingham
    Link: https://lore.kernel.org/r/20200609124610.3445662-10-kieran.bingham+renesas@ideasonboard.com
    Signed-off-by: Mark Brown

    Kieran Bingham
     

29 Oct, 2019

1 commit

  • Depends on board design, the gpio controlling regulator may
    connects with a big capacitance. When need off, it takes some time
    to let the regulator to be truly off. If not add enough delay, the
    regulator might have always been on, so introduce off-on-delay to
    handle such case.

    Signed-off-by: Peng Fan
    Link: https://lore.kernel.org/r/1572311875-22880-3-git-send-email-peng.fan@nxp.com
    Signed-off-by: Mark Brown

    Peng Fan
     

24 Sep, 2019

1 commit


10 Sep, 2019

1 commit

  • This commit adds the possibility to choose the compatible
    "regulator-fixed-clock" in devicetree.

    This is a special regulator-fixed that has to have a clock, from which
    the regulator gets switched on and off.

    Signed-off-by: Philippe Schenker
    Link: https://lore.kernel.org/r/20190910062103.39641-2-philippe.schenker@toradex.com
    Signed-off-by: Mark Brown

    Philippe Schenker
     

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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

06 Feb, 2019

1 commit

  • This pushes the handling of inversion semantics and open drain
    settings to the GPIO descriptor and gpiolib. All affected board
    files are also augmented.

    This is especially nice since we don't have to have any
    confusing flags passed around to the left and right littering
    the fixed and GPIO regulator drivers and the regulator core.
    It is all just very straight-forward: the core asks the GPIO
    line to be asserted or deasserted and gpiolib deals with the
    rest depending on how the platform is configured: if the line
    is active low, it deals with that, if the line is open drain,
    it deals with that too.

    Cc: Alexander Shiyan # i.MX boards user
    Cc: Haojian Zhuang # MMP2 maintainer
    Cc: Aaro Koskinen # OMAP1 maintainer
    Cc: Tony Lindgren # OMAP1,2,3 maintainer
    Cc: Mike Rapoport # EM-X270 maintainer
    Cc: Robert Jarzmik # EZX maintainer
    Cc: Philipp Zabel # Magician maintainer
    Cc: Petr Cvek # Magician
    Cc: Robert Jarzmik # PXA
    Cc: Paul Parsons # hx4700
    Cc: Daniel Mack # Raumfeld maintainer
    Cc: Marc Zyngier # Zeus maintainer
    Cc: Geert Uytterhoeven # SuperH pinctrl/GPIO maintainer
    Cc: Russell King # SA1100
    Tested-by: Marek Szyprowski
    Tested-by: Janusz Krzysztofik #OMAP1 Amstrad Delta
    Signed-off-by: Linus Walleij
    Signed-off-by: Mark Brown

    Linus Walleij
     

11 Dec, 2018

1 commit

  • Use the gpiod_get() rather than the devm_* version so that the
    regulator core can handle the lifecycle of these descriptors.

    Fixes: efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only")
    Signed-off-by: Linus Walleij
    Reviewed-by: Marek Szyprowski
    Tested-by: Marek Szyprowski
    Reviewed-by: Charles Keepax
    Signed-off-by: Mark Brown

    Linus Walleij
     

13 Oct, 2018

1 commit

  • This allows nonexclusive (simultaneous) access to a single
    GPIO line for the fixed regulator enable line. This happens
    when several regulators use the same GPIO for enabling and
    disabling a regulator, and all need a handle on their GPIO
    descriptor.

    This solution with a special flag is not entirely elegant
    and should ideally be replaced by something more careful as
    this makes it possible for several consumers to
    enable/disable the same GPIO line to the left and right
    without any consistency. The current use inside the regulator
    core should however be fine as it takes special care to
    handle this.

    For the state of the GPIO backend, this is still the
    lesser evil compared to going back to global GPIO
    numbers.

    Cc: Marek Szyprowski
    Cc: Jon Hunter
    Fixes: efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only")
    Reported-by: Marek Szyprowski
    Tested-by: Jon Hunter
    Tested-by: Marek Szyprowski
    Signed-off-by: Linus Walleij
    Signed-off-by: Mark Brown

    Linus Walleij
     

02 Oct, 2018

1 commit

  • commit efdfeb079cc3
    ("regulator: fixed: Convert to use GPIO descriptor only")
    switched to use gpiod_get() to look up the regulator from the
    gpiolib core whether that is device tree or boardfile.

    This meant that we activate the code in
    a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags")
    which means the descriptors coming from the device tree already
    have the right inversion and open drain semantics set up from
    the gpiolib core.

    As the fixed regulator was inspected again we got the
    inverted inversion and things broke.

    Fix it by ignoring the config in the device tree for now: the
    later patches in the series will push all inversion handling
    over to the gpiolib core and set it up properly in the
    boardfiles for legacy devices, but I did not finish that
    for this kernel cycle.

    Fixes: commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only")
    Reported-by: Leonard Crestez
    Reported-by: Fabio Estevam
    Reported-by: John Stultz
    Reported-by: Anders Roxell
    Signed-off-by: Linus Walleij
    Tested-by: John Stultz
    Signed-off-by: Mark Brown

    Linus Walleij
     

18 Sep, 2018

1 commit

  • As we augmented the regulator core to accept a GPIO descriptor instead
    of a GPIO number, we can augment the fixed GPIO regulator to look up
    and pass that descriptor directly from device tree or board GPIO
    descriptor look up tables.

    Some boards just auto-enumerate their fixed regulator platform devices
    and I have assumed they get names like "fixed-regulator.0" but it's
    pretty hard to guess this. I need some testing from board maintainers to
    be sure. Other boards are straight forward, using just plain
    "fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the
    device ID.

    It seems the da9055 and da9211 has never got around to actually passing
    any enable gpio into its platform data (not the in-tree code anyway) so we
    can just decide to simply pass a descriptor instead.

    The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named
    "*_dummy_supply_device" while it is a very real device backed by a GPIO
    line. There is nothing dummy about it at all, so I renamed it with the
    infix *_regulator_* as part of this patch set.

    Intel MID portions tested by Andy.

    Tested-by: Andy Shevchenko # Check the x86 BCM stuff
    Acked-by: Tony Lindgren # OMAP1,2,3 maintainer
    Signed-off-by: Linus Walleij
    Reviewed-by: Janusz Krzysztofik
    Reviewed-by: Mike Rapoport
    Signed-off-by: Mark Brown

    Linus Walleij
     

26 Jan, 2017

1 commit

  • This reverts commit 13bed58ce874 (regulator: fixed: add support for ACPI
    interface).

    While there does appear to be a practical need to manage regulators on ACPI
    systems, using ad-hoc properties to describe regulators to the kernel presents
    a number of problems (especially should ACPI gain first class support for such
    things), and there are ongoing discussions as to how to manage this.

    Until there is a rough consensus, revert commit 13bed58ce8748d43, which hasn't
    been in a released kernel yet as discussed in [1] and the surrounding thread.

    [1] http://lkml.kernel.org/r/20170125184949.x2wkoo7kbaaajkjk@sirena.org.uk

    Signed-off-by: Mark Rutland
    Cc: Liam Girdwood
    Cc: Lorenzo Pieralisi
    Cc: Lu Baolu
    Cc: Mark Brown
    Cc: Rafael J. Wysocki
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Mark Brown

    Mark Rutland
     

01 Jun, 2016

1 commit


30 May, 2016

1 commit


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


27 Nov, 2014

1 commit

  • The of_get_regulator_init_data() function is used to extract the regulator
    init_data but information on how to extract certain data is defined in the
    static regulator descriptor (e.g: how to map the hardware operating modes).

    Add a const struct regulator_desc * parameter to the function signature so
    the parsing logic could use the information in the struct regulator_desc.

    of_get_regulator_init_data() relies on of_get_regulation_constraints() to
    actually extract the init_data so it has to pass the struct regulator_desc
    but that is modified on a later patch.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Mark Brown

    Javier Martinez Canillas
     

07 Nov, 2014

2 commits


20 Oct, 2014

1 commit


26 May, 2014

1 commit


20 Feb, 2014

1 commit


12 Feb, 2014

1 commit


15 Oct, 2013

1 commit


11 Sep, 2013

1 commit


30 Jul, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Liam Girdwood
    Cc: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

20 Nov, 2012

3 commits


05 Jul, 2012

1 commit


04 Jul, 2012

2 commits


02 Jul, 2012

1 commit


03 Jun, 2012

1 commit


07 May, 2012

1 commit


23 Apr, 2012

1 commit

  • All the drivers that need delay for the regulator voltage output voltage to
    stabilize after being enabled or after being set to a new value has been
    converted to implement enable_time and set_voltage_time_sel callbacks.
    Then regulator core will take care of the necessary delay.

    For the drivers that don't need the delay, don't need to include linux/delay.h.
    This patch removes the unneeded include of linux/delay.h in regulator drivers.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin