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
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
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
11 Aug, 2020
1 commit
-
There is a spelling mistake in a dev_err message. Fix it.
Signed-off-by: Colin Ian King
Link: https://lore.kernel.org/r/20200810093931.50624-1-colin.king@canonical.com
Signed-off-by: Mark Brown
16 Jun, 2020
1 commit
-
The word 'descriptor' is misspelled throughout the tree.
Fix it up accordingly:
decriptors -> descriptorsSigned-off-by: Kieran Bingham
Link: https://lore.kernel.org/r/20200609124610.3445662-10-kieran.bingham+renesas@ideasonboard.com
Signed-off-by: Mark Brown
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
24 Sep, 2019
1 commit
-
Use of_device_get_match_data which has NULL test for match before
dereference match->data. Add NULL test for drvtype so it still works
for fixed_voltage_ops when !CONFIG_OF.Signed-off-by: Axel Lin
Reviewed-by: Philippe Schenker
Link: https://lore.kernel.org/r/20190922022928.28355-1-axel.lin@ingics.com
Signed-off-by: Mark Brown
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
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 versionextracted 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
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
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
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
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
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
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
01 Jun, 2016
1 commit
-
Add support to retrieve fixed voltage configure information through
ACPI interface. This is needed for Intel Bay Trail devices, where a
GPIO is used to control the USB vbus.Signed-off-by: Lu Baolu
Signed-off-by: Mark Brown
30 May, 2016
1 commit
-
The GPIO interface of_get_named_gpio() has implemented the proper
error returns even EPROBE_DEFER and hence caller need not to
implement any workaround for translating the returned error.Remove the workaround implemented to handle the return of
of_get_named_gpio().Signed-off-by: Laxman Dewangan
Signed-off-by: Mark Brown
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
...
05 Dec, 2014
1 commit
-
…7693', 'regulator/topic/max77802', 'regulator/topic/power-off' and 'regulator/topic/rk808' into regulator-next
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
07 Nov, 2014
2 commits
-
Use gpio_is_valid instead of an explicit comparison with 0.
Signed-off-by: Markus Pargmann
Signed-off-by: Mark Brown -
This patch sets ena_gpio_initialized for all drivers which set a
ena_gpio from parsed DT properties. Drivers using pdata may get zero
initialized pdata and therefore copy a 0 into the regulator_config
ena_gpio field.Signed-off-by: Markus Pargmann
Signed-off-by: Mark Brown
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
26 May, 2014
1 commit
-
Use more compact of_property_read_{bool|u32}() calls instead of the
of_{find|get}_property() calls.Signed-off-by: Sergei Shtylyov
Signed-off-by: Mark Brown
20 Feb, 2014
1 commit
-
kzalloc prints its own OOM message upon failure.
Signed-off-by: Sachin Kamat
Signed-off-by: Mark Brown
12 Feb, 2014
1 commit
-
Update the code to use devm_* API so that driver core will manage
resources.Signed-off-by: Manish Badarkhe
Signed-off-by: Mark Brown
15 Oct, 2013
1 commit
-
Fix the following checkpatch warnings.
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
11 Sep, 2013
1 commit
-
Provide the rail supply voltage through descriptor to the
core and remove the callbacks which implement the get_voltage
and list_voltage.Signed-off-by: Laxman Dewangan
Signed-off-by: Mark Brown
30 Jul, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
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
20 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Signed-off-by: Mark Brown -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Signed-off-by: Mark Brown -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Signed-off-by: Mark Brown
05 Jul, 2012
1 commit
-
Add support for input supply in DT parsing of node.
The input supply will be provided by the property
"vin-supply" in the regulator node.Signed-off-by: Laxman Dewangan
Signed-off-by: Mark Brown
04 Jul, 2012
2 commits
-
This is essentially the code that was factored out into the core when the
feature was implemented.Signed-off-by: Mark Brown
-
Signed-off-by: Mark Brown
02 Jul, 2012
1 commit
-
of_get_named_gpio() needs the driver hosting the GPIO that the DT
property references to have been probed. Detect this specific failure,
and defer the probe of the whole regulator until this API can complete.Signed-off-by: Stephen Warren
Signed-off-by: Mark Brown
03 Jun, 2012
1 commit
-
Use the new of_match_ptr() macro for the of_match_table
pointer entry to avoid having to #define match NULL.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
07 May, 2012
1 commit
-
Add property for the gpio flag open drain when registering
fixed regulator.Signed-off-by: Laxman Dewangan
Signed-off-by: Mark Brown
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