platform/kernel/linux-rpi.git
3 years agoregulator: push allocation in regulator_init_coupling() outside of lock
Michał Mirosław [Wed, 12 Aug 2020 01:31:34 +0000 (03:31 +0200)]
regulator: push allocation in regulator_init_coupling() outside of lock

Allocating memory with regulator_list_mutex held makes lockdep unhappy
when memory pressure makes the system do fs_reclaim on eg. eMMC using
a regulator. Push the lock inside regulator_init_coupling() after the
allocation.

======================================================
WARNING: possible circular locking dependency detected
5.7.13+ #533 Not tainted
------------------------------------------------------
kswapd0/383 is trying to acquire lock:
cca78ca4 (&sbi->write_io[i][j].io_rwsem){++++}-{3:3}, at: __submit_merged_write_cond+0x104/0x154
but task is already holding lock:
c0e38518 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x0/0x50
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (fs_reclaim){+.+.}-{0:0}:
       fs_reclaim_acquire.part.11+0x40/0x50
       fs_reclaim_acquire+0x24/0x28
       __kmalloc+0x54/0x218
       regulator_register+0x860/0x1584
       dummy_regulator_probe+0x60/0xa8
[...]
other info that might help us debug this:

Chain exists of:
  &sbi->write_io[i][j].io_rwsem --> regulator_list_mutex --> fs_reclaim

Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(fs_reclaim);
                               lock(regulator_list_mutex);
                               lock(fs_reclaim);
  lock(&sbi->write_io[i][j].io_rwsem);
 *** DEADLOCK ***

1 lock held by kswapd0/383:
 #0: c0e38518 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x0/0x50
[...]

Fixes: d8ca7d184b33 ("regulator: core: Introduce API for regulators coupling customization")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1a889cf7f61c6429c9e6b34ddcdde99be77a26b6.1597195321.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
3 years agoregulator: fix spelling mistake "Cant" -> "Can't"
Colin Ian King [Mon, 10 Aug 2020 09:39:31 +0000 (10:39 +0100)]
regulator: fix spelling mistake "Cant" -> "Can't"

There is a spelling mistake in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200810093931.50624-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: cros-ec-regulator: Add NULL test for devm_kmemdup call
Axel Lin [Sun, 2 Aug 2020 03:25:09 +0000 (11:25 +0800)]
regulator: cros-ec-regulator: Add NULL test for devm_kmemdup call

Fix possible NULL pointer dereference.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200802032509.305425-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: add the sub node names for the MP5496 PMIC
Kathiravan T [Thu, 30 Jul 2020 08:49:23 +0000 (14:19 +0530)]
regulator: add the sub node names for the MP5496 PMIC

MP5496 PMIC is found on IPQ6018 SoC. SMPA2 regulator controls the APSS
voltage scaling. Document the sub node name for the same.

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
Link: https://lore.kernel.org/r/1596098964-19878-3-git-send-email-kathirav@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: cros-ec-regulator: Fix double free of desc->name.
Pi-Hsun Shih [Tue, 28 Jul 2020 09:19:09 +0000 (17:19 +0800)]
regulator: cros-ec-regulator: Fix double free of desc->name.

The desc->name field is allocated with devm_kstrdup, but is also kfreed
on the error path, causing it to be double freed. Remove the kfree on
the error path.

Fixes: 8d9f8d57e023 ("regulator: Add driver for cros-ec-regulator")
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200728091909.2009771-1-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoplatform/chrome: cros_ec: Fix host command for regulator control.
Pi-Hsun Shih [Fri, 24 Jul 2020 08:03:55 +0000 (16:03 +0800)]
platform/chrome: cros_ec: Fix host command for regulator control.

Since the host command number 0x012B conflicts with other EC host
command, add one to all regulator control related host command.

Also fix a wrong alignment on struct and sync the comment with the one
in ChromeOS EC codebase.

Fixes: dff08caf35ec ("platform/chrome: cros_ec: Add command for regulator control.")
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200724080358.619245-1-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: pca9450: Convert to use module_i2c_driver
Axel Lin [Sat, 25 Jul 2020 01:44:14 +0000 (09:44 +0800)]
regulator: pca9450: Convert to use module_i2c_driver

Use module_i2c_driver to simplify driver init boilerplate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200725014414.1825183-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: fix memory leak on error path of regulator_register()
Vladimir Zapolskiy [Fri, 24 Jul 2020 00:50:13 +0000 (03:50 +0300)]
regulator: fix memory leak on error path of regulator_register()

The change corrects registration and deregistration on error path
of a regulator, the problem was manifested by a reported memory
leak on deferred probe:

    as3722-regulator as3722-regulator: regulator 13 register failed -517

    # cat /sys/kernel/debug/kmemleak
    unreferenced object 0xecc43740 (size 64):
      comm "swapper/0", pid 1, jiffies 4294937640 (age 712.880s)
      hex dump (first 32 bytes):
        72 65 67 75 6c 61 74 6f 72 2e 32 34 00 5a 5a 5a  regulator.24.ZZZ
        5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      backtrace:
        [<0c4c3d1c>] __kmalloc_track_caller+0x15c/0x2c0
        [<40c0ad48>] kvasprintf+0x64/0xd4
        [<109abd29>] kvasprintf_const+0x70/0x84
        [<c4215946>] kobject_set_name_vargs+0x34/0xa8
        [<62282ea2>] dev_set_name+0x40/0x64
        [<a39b6757>] regulator_register+0x3a4/0x1344
        [<16a9543f>] devm_regulator_register+0x4c/0x84
        [<51a4c6a1>] as3722_regulator_probe+0x294/0x754
        ...

The memory leak problem was introduced as a side ef another fix in
regulator_register() error path, I believe that the proper fix is
to decouple device_register() function into its two compounds and
initialize a struct device before assigning any values to its fields
and then using it before actual registration of a device happens.

This lets to call put_device() safely after initialization, and, since
now a release callback is called, kfree(rdev->constraints) shall be
removed to exclude a double free condition.

Fixes: a3cde9534ebd ("regulator: core: fix regulator_register() error paths to properly release rdev")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: Wen Yang <wenyang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20200724005013.23278-1-vz@mleia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Replace HTTP links with HTTPS ones
Alexander A. Klimov [Sun, 19 Jul 2020 20:06:23 +0000 (22:06 +0200)]
regulator: Replace HTTP links with HTTPS ones

Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200719200623.61524-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: convert QCOM SMD-RPM regulator document to YAML schema
Kathiravan T [Mon, 20 Jul 2020 06:12:23 +0000 (11:42 +0530)]
regulator: convert QCOM SMD-RPM regulator document to YAML schema

Convert qcom,smd-rpm-regulator.txt document to YAML schema

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1595225543-12127-5-git-send-email-kathirav@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "regulator_sync_state() support" from Saravana Kannan <saravanak@google...
Mark Brown [Mon, 20 Jul 2020 15:31:55 +0000 (16:31 +0100)]
Merge series "regulator_sync_state() support" from Saravana Kannan <saravanak@google.com>:

Consider the following example:
- regulator-X is provided by device-X.
- regulator-X is a supplier to device-A, device-B and device-C.
- device-A is off/inactive from boot.
- device-B and device-C are left on/active by the bootloader
- regulator-X is left on boot by the bootloader at 2000 mV to supply
  device-B and device-C.

Example boot sequence 1:
1. device-X is probed successfully.
2. device-A is probed by driver-A
   a. driver-A gets regulator-X
   b. driver-A votes on regulator-X
   c. driver-A initializes device-A
   d. driver-A votes off regulator-X
   e. regulator-X is turned off.
3. System crashes or device-B and device-C become unreliable because
   regulator-X was turned off without following the proper quiescing
   steps for device-B and device-C.

Example boot sequence 2:
1. device-X is probed successfully.
2. device-B is probed by driver-B
   a. driver-B gets regulator-X
   b. driver-B votes on regulator-X
   c. driver-B lowers device-B performance point.
   d. driver-B lowers voltage vote to 1000 mV.
   e. regulator-X voltage is lowered to 1000 mV.
3. System crashes or device-C becomes unreliable because regulator-X
   voltage was lowered to 1000 mV when device-C still needed it at 2000 mV

This patch series makes sure these examples are handled correctly and
system crash or device instability is avoided and the system remains
usable.

More details provided in the commit texts.

v2->v3:
Patch 2/4 - No functional change. Simple refactor.
Patch 3/4
- Was Patch 2/2 in v2.
- Rewrote commit text to hopefully address all previous points.
- Renamed variable/functions. Hope it's clearer.
- Added more comments.
- Added logging
- Fixed timeout functionality.
- Handle exclusive consumers properly
- Handle coupled regulators properly
Patch 4/4 - Prevents voltage from going too low during boot.

v1->v2:
Patch 1/2
- New patch
Patch 2/2
- This was the only patch in v1
- Made the late_initcall_sync timeout a commandline param
- If timeout is set, we also give up waiting for all consumers after
  the timeout expires.
- Made every regulator driver add sync_state() support

Saravana Kannan (4):
  driver core: Add dev_set_drv_sync_state()
  regulator: core: Add destroy_regulator()
  regulator: core: Add basic enable/disable support for sync_state()
    callbacks
  regulator: core: Add voltage support for sync_state() callbacks

 drivers/regulator/core.c         | 200 ++++++++++++++++++++++++++++---
 include/linux/device.h           |  12 ++
 include/linux/regulator/driver.h |   2 +
 3 files changed, 198 insertions(+), 16 deletions(-)

--
2.28.0.rc0.105.gf9edc3c819-goog

4 years agoregulator: gpio: Honor regulator-boot-on property
Chen-Yu Tsai [Mon, 20 Jul 2020 13:28:09 +0000 (21:28 +0800)]
regulator: gpio: Honor regulator-boot-on property

When requesting the enable GPIO, the driver should do so with the
correct output level matching some expected state. This is especially
important if the regulator is a critical one, such as a supply for
the boot CPU. This is currently done by checking for the enable-at-boot
property, but this is not documented in the device tree binding, nor
does it match the common regulator properties.

Honor the common regulator-boot-on property by checking the boot_on
constraint setting within the DT probe path. This is the same as what
is done in the fixed regulator driver.

Also add a comment stating that the enable-at-boot property should not
be used.

Fixes: 006694d099e8 ("regulator: gpio-regulator: Allow use of GPIO controlled regulators though DT")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200720132809.26908-1-wens@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: core: Add destroy_regulator()
Saravana Kannan [Thu, 16 Jul 2020 04:20:51 +0000 (21:20 -0700)]
regulator: core: Add destroy_regulator()

Part of the regulator_get() code is already factored out into
create_regulator(). This patch factors out some of the regulator_put()
code into destroy_regulator() so that create_regulator() has a
corresponding unwind function. Subsequent patches will use this
function.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20200716042053.1927676-3-saravanak@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Correct kernel-doc inconsistency
Colton Lewis [Wed, 15 Jul 2020 19:15:00 +0000 (19:15 +0000)]
regulator: Correct kernel-doc inconsistency

Silence documentation build warning by correcting kernel-doc comments.

./include/linux/regulator/machine.h:196: warning: Function parameter or member 'max_uV_step' not described in 'regulation_constraints'
./include/linux/regulator/driver.h:206: warning: Function parameter or member 'resume' not described in 'regulator_ops'

Signed-off-by: Colton Lewis <colton.w.lewis@protonmail.com>
Link: https://lore.kernel.org/r/20200715191438.29312-1-colton.w.lewis@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Add labibb regulator binding
Nisha Kumari [Mon, 22 Jun 2020 12:41:08 +0000 (18:11 +0530)]
regulator: Add labibb regulator binding

Adding the devicetree binding for labibb regulator.

 [sumits: cleanup as per review comments and update to yaml]

Signed-off-by: Nisha Kumari <nishakumari@codeaurora.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200622124110.20971-3-sumit.semwal@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: qcom: Add labibb driver
Nisha Kumari [Mon, 22 Jun 2020 12:41:10 +0000 (18:11 +0530)]
regulator: qcom: Add labibb driver

Qualcomm platforms have LAB(LCD AMOLED Boost)/IBB(Inverting Buck Boost)
regulators, labibb for short, which are used as power supply for
LCD Mode displays.

This patch adds labibb regulator driver for pmi8998 PMIC, found on
SDM845 platforms.

  [sumits: reworked the driver design as per upstream review]

Signed-off-by: Nisha Kumari <nishakumari@codeaurora.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://lore.kernel.org/r/20200622124110.20971-5-sumit.semwal@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Allow regulators to verify enabled during enable()
Sumit Semwal [Mon, 22 Jun 2020 12:41:07 +0000 (18:11 +0530)]
regulator: Allow regulators to verify enabled during enable()

Some regulators might need to verify that they have indeed been enabled
after the enable() call is made and enable_time delay has passed.

This is implemented by repeatedly checking is_enabled() upto
poll_enabled_time, waiting for the already calculated enable delay in
each iteration.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://lore.kernel.org/r/20200622124110.20971-2-sumit.semwal@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: cros-ec: Constify cros_ec_regulator_voltage_ops
Rikard Falkeborn [Sat, 11 Jul 2020 11:44:09 +0000 (13:44 +0200)]
regulator: cros-ec: Constify cros_ec_regulator_voltage_ops

It is never modified, so make it const to allow the compiler to put it
in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Pi-Hsun Shih <pihsun@chromium.org>
Link: https://lore.kernel.org/r/20200711114409.9911-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: devres: Standardise on function documentation headers
Lee Jones [Wed, 8 Jul 2020 12:48:32 +0000 (13:48 +0100)]
regulator: devres: Standardise on function documentation headers

Line up descriptions, start description with a lower-case character and
omit old definitions such as quoting the old argument "consumer".

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200708124832.3441649-4-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: of_regulator: Add missing colon for rdev kerneldoc argument
Lee Jones [Wed, 8 Jul 2020 12:48:31 +0000 (13:48 +0100)]
regulator: of_regulator: Add missing colon for rdev kerneldoc argument

Kerneldoc validation gets confused if syntax isn't "@.*: ".

Adding the missing colons squashes the following W=1 warnings:

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Rajendra Nayak <rnayak@ti.com>
Link: https://lore.kernel.org/r/20200708124832.3441649-3-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: devres: Fix issues with kerneldoc headers
Lee Jones [Wed, 8 Jul 2020 12:48:30 +0000 (13:48 +0100)]
regulator: devres: Fix issues with kerneldoc headers

Provide descriptions for some missing function args and
rename others to match the names used.

Fixes the following W=1 warning(s):

 drivers/regulator/devres.c:187: warning: Function parameter or member 'dev' not described in 'devm_regulator_register'
 drivers/regulator/devres.c:226: warning: Function parameter or member 'dev' not described in 'devm_regulator_unregister'
 drivers/regulator/devres.c:226: warning: Function parameter or member 'rdev' not described in 'devm_regulator_unregister'
 drivers/regulator/devres.c:226: warning: Excess function parameter 'regulator' description in 'devm_regulator_unregister'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200708124832.3441649-2-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: fan53880: Add support for COMPILE_TEST
Christoph Fritz [Tue, 7 Jul 2020 10:57:31 +0000 (12:57 +0200)]
regulator: fan53880: Add support for COMPILE_TEST

This patch adds support for COMPILE_TEST while fixing a warning when
no support for device tree is there.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Link: https://lore.kernel.org/r/1c437154873ace65ff738a0ebca511308f1cecc1.camel@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "Add pca9450 driver" from Robin Gong <yibin.gong@nxp.com>:
Mark Brown [Mon, 6 Jul 2020 14:42:33 +0000 (15:42 +0100)]
Merge series "Add pca9450 driver" from Robin Gong <yibin.gong@nxp.com>:

Add pca9450 driver for i.mx8mn-evk board. PCA9450A/B/C supported now.
Please refer to below link for PCA9450 datasheet:
https://www.nxp.com/docs/en/data-sheet/PCA9450DS.pdf

v2:
  1. rebase with the latest code to use linear_ranges helper instead.
  2. address Frieder's comments, such as dulipcated buck4 description,
     debug info added etc.

Robin Gong (4):
  regulator: pca9450: add pca9450 pmic driver
  dt-bindings: regulator: add pca9450 regulator yaml
  arm64: dts: imx8mn-evk: add pca9450 for i.mx8mn-evk board
  arm64: configs: add pca9450 pmic driver

 .../bindings/regulator/nxp,pca9450-regulator.yaml  | 190 +++++
 arch/arm64/boot/dts/freescale/imx8mn-evk.dts       |  96 +++
 arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi      |   6 +
 arch/arm64/configs/defconfig                       |   1 +
 drivers/regulator/Kconfig                          |   8 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/pca9450-regulator.c              | 859 +++++++++++++++++++++
 include/linux/regulator/pca9450.h                  | 219 ++++++
 8 files changed, 1380 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
 create mode 100644 drivers/regulator/pca9450-regulator.c
 create mode 100644 include/linux/regulator/pca9450.h

--
2.7.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

4 years agoregulator: fan53880: Add missing .owner field in regulator_desc
Axel Lin [Mon, 6 Jul 2020 08:09:44 +0000 (16:09 +0800)]
regulator: fan53880: Add missing .owner field in regulator_desc

Add missing .owner field in regulator_desc, which is used for refcounting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200706080944.663750-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodt-bindings: regulator: add pca9450 regulator yaml
Robin Gong [Fri, 3 Jul 2020 16:19:36 +0000 (00:19 +0800)]
dt-bindings: regulator: add pca9450 regulator yaml

Add device binding doc for pca9450 pmic driver.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1593793178-9737-3-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: pca9450: add pca9450 pmic driver
Robin Gong [Fri, 3 Jul 2020 16:19:35 +0000 (00:19 +0800)]
regulator: pca9450: add pca9450 pmic driver

Add NXP pca9450 pmic driver.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Link: https://lore.kernel.org/r/1593793178-9737-2-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodt-bindings: regulator: Document bindings for fan53880
Christoph Fritz [Thu, 2 Jul 2020 21:08:46 +0000 (23:08 +0200)]
dt-bindings: regulator: Document bindings for fan53880

Add device tree binding information for fan53880 regulator driver.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Link: https://lore.kernel.org/r/20200702210846.31659-3-chf.fritz@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: fan53880: Add initial support
Christoph Fritz [Thu, 2 Jul 2020 21:08:45 +0000 (23:08 +0200)]
regulator: fan53880: Add initial support

This patch adds support for ON Semiconductor FAN53880 regulator.

The FAN53880 is an I2C porgrammable power management IC (PMIC)
that contains a BUCK (step-down converter), four LDOs (low dropouts)
and one BOOST (step-up converter).  It is designed for mobile power
applications.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Link: https://lore.kernel.org/r/20200702210846.31659-2-chf.fritz@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "regulator: mt6397: Implement of_map_mode regulator_desc function" from...
Mark Brown [Thu, 2 Jul 2020 15:45:49 +0000 (16:45 +0100)]
Merge series "regulator: mt6397: Implement of_map_mode regulator_desc function" from Anand K Mistry <amistry@google.com>:

This patchset adds support for being able to change regulator modes for
the mt6397 regulator. This is needed to allow the voltage scaling
support in the MT8173 SoC to be used on the elm (Acer Chromebook R13)
and hana (several Lenovo Chromebooks) devices.

Without a of_map_mode implementation, the regulator-allowed-modes
devicetree field is skipped, and attempting to change the regulator mode
results in an error:
[    1.439165] vpca15: mode operation not allowed

Changes in v2:
- Introduce constants in dt-bindings
- Improve conditional readability

Anand K Mistry (4):
  regulator: mt6397: Move buck modes into header file
  dt-bindings: regulator: mt6397: Document valid modes
  regulator: mt6397: Implement of_map_mode
  arm64: dts: mediatek: Update allowed mt6397 regulator modes for elm
    boards

 .../bindings/regulator/mt6397-regulator.txt     |  3 +++
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi    |  4 +++-
 drivers/regulator/mt6397-regulator.c            | 17 ++++++++++++++---
 .../regulator/mediatek,mt6397-regulator.h       | 15 +++++++++++++++
 4 files changed, 35 insertions(+), 4 deletions(-)
 create mode 100644 include/dt-bindings/regulator/mediatek,mt6397-regulator.h

--
2.27.0.212.ge8ba1cc988-goog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

4 years agoMerge series "regulator: da9211: support changing modes" from Anand K Mistry <amistry...
Mark Brown [Thu, 2 Jul 2020 15:45:48 +0000 (16:45 +0100)]
Merge series "regulator: da9211: support changing modes" from Anand K Mistry <amistry@google.com>:

This patchset adds support for being able to change regulator modes for
the da9211 regulator. This is needed to allow the voltage scaling
support in the MT8173 SoC to be used in the elm (Acer Chromebook R13)
and hana (several Lenovo Chromebooks) devices.

Anand K Mistry (4):
  regulator: da9211: Move buck modes into header file
  dt-bindings: regulator: da9211: Document allowed modes
  regulator: da9211: Implement of_map_mode
  arm64: dts: mediatek: Update allowed regulator modes for elm boards

 .../devicetree/bindings/regulator/da9211.txt  |  4 +++
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi  |  4 ++-
 drivers/regulator/da9211-regulator.c          | 30 +++++++++++++++----
 .../regulator/dlg,da9211-regulator.h          | 16 ++++++++++
 4 files changed, 47 insertions(+), 7 deletions(-)
 create mode 100644 include/dt-bindings/regulator/dlg,da9211-regulator.h

--
2.27.0.212.ge8ba1cc988-goog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

4 years agoMerge series "regulator: add support for SY8827N regulator" from Jisheng Zhang <Jishe...
Mark Brown [Thu, 2 Jul 2020 15:45:47 +0000 (16:45 +0100)]
Merge series "regulator: add support for SY8827N regulator" from Jisheng Zhang <Jisheng.Zhang@synaptics.com>:

The SY8827N from Silergy Corp is a single output DC/DC converter. The
voltage can be controlled via I2C.

Jisheng Zhang (2):
  dt-bindings: regulator: add document bindings for sy8827n
  regulator: add support for SY8827N regulator

 .../bindings/regulator/silergy,sy8827n.yaml   |  45 +++++
 drivers/regulator/Kconfig                     |   7 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/sy8827n.c                   | 185 ++++++++++++++++++
 4 files changed, 238 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/silergy,sy8827n.yaml
 create mode 100644 drivers/regulator/sy8827n.c

--
2.27.0

4 years agoregulator: mp886x: use .probe_new
Jisheng Zhang [Thu, 2 Jul 2020 02:02:00 +0000 (10:02 +0800)]
regulator: mp886x: use .probe_new

Use the new .probe_new for mp886x. It does not use the const
struct i2c_device_id * argument, so convert it to utilise the
simplified i2c driver registration.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200702100200.1a4c65d1@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: fix null pointer check on regmap
Colin Ian King [Thu, 2 Jul 2020 11:56:59 +0000 (12:56 +0100)]
regulator: fix null pointer check on regmap

The null pointer check on regmap that checks for a dev_get_regmap failure
is currently returning -ENOENT if the regmap succeeded. Fix this by adding
in the missing ! operator.

Fixes: 4fe66d5a62fb ("regulator: Add support for QCOM PMIC VBUS booster")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Dereference after null check")
Link: https://lore.kernel.org/r/20200702115659.38208-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: da9211: Document allowed modes
Anand K Mistry [Thu, 2 Jul 2020 03:15:23 +0000 (13:15 +1000)]
regulator: da9211: Document allowed modes

This patch adds a description of how operating modes may be specified.

Signed-off-by: Anand K Mistry <amistry@google.com>
Link: https://lore.kernel.org/r/20200702131350.2.I6131e251d13f60d8c5347bb4faa9dc2364c87848@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: da9211: Implement of_map_mode
Anand K Mistry [Thu, 2 Jul 2020 03:15:24 +0000 (13:15 +1000)]
regulator: da9211: Implement of_map_mode

Implementing of_map_mode is necessary to be able to specify operating
modes in the devicetree using 'regulator-allowed-modes', and to change
regulator modes.

Signed-off-by: Anand K Mistry <amistry@google.com>
Link: https://lore.kernel.org/r/20200702131350.3.I6a0bc18fcdb2fe13e838a31e6d034d0e095368bc@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: da9211: Move buck modes into header file
Anand K Mistry [Thu, 2 Jul 2020 03:15:22 +0000 (13:15 +1000)]
regulator: da9211: Move buck modes into header file

This will allow device trees to make use of these constants.

Signed-off-by: Anand K Mistry <amistry@google.com>
Link: https://lore.kernel.org/r/20200702131350.1.I96e67ab7b4568287eb939e8a572cbc03e87f1aa0@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: add document bindings for sy8827n
Jisheng Zhang [Thu, 2 Jul 2020 09:13:35 +0000 (17:13 +0800)]
regulator: add document bindings for sy8827n

Add device tree binding information for sy8827n regulator driver.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200702171335.59f5e79b@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: add support for SY8827N regulator
Jisheng Zhang [Thu, 2 Jul 2020 09:14:38 +0000 (17:14 +0800)]
regulator: add support for SY8827N regulator

The SY8827N from Silergy Corp is a single output DC/DC converter. The
voltage can be controlled via I2C.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200702171438.20edc523@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: mt6397: Document valid modes
Anand K Mistry [Thu, 2 Jul 2020 06:23:18 +0000 (16:23 +1000)]
regulator: mt6397: Document valid modes

Document valid mode values for BUCK regulators.

Signed-off-by: Anand K Mistry <amistry@google.com>
Link: https://lore.kernel.org/r/20200702162231.v2.2.I0a814b246cfe47f8dd1e25553ee881cbcfd0d8eb@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: mt6397: Implement of_map_mode
Anand K Mistry [Thu, 2 Jul 2020 06:23:19 +0000 (16:23 +1000)]
regulator: mt6397: Implement of_map_mode

Implementing of_map_mode is necessary to be able to specify operating
modes in the devicetree using 'regulator-allowed-modes', and to change
regulator modes.

Signed-off-by: Anand K Mistry <amistry@google.com>
Link: https://lore.kernel.org/r/20200702162231.v2.3.I7acfb591bfacf3b1b04a3d388385098bfcc9fecd@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: mt6397: Move buck modes into header file
Anand K Mistry [Thu, 2 Jul 2020 06:23:17 +0000 (16:23 +1000)]
regulator: mt6397: Move buck modes into header file

This will allow device trees to make use of these constants.

Signed-off-by: Anand K Mistry <amistry@google.com>
Link: https://lore.kernel.org/r/20200702162231.v2.1.Icf69e2041b1af4548347018186c3ba6310f53e66@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "Introduce PMIC based USB type C detection" from Wesley Cheng <wcheng...
Mark Brown [Wed, 1 Jul 2020 20:53:29 +0000 (21:53 +0100)]
Merge series "Introduce PMIC based USB type C detection" from Wesley Cheng <wcheng@codeaurora.org>:

Changes in v4:
 - Modified qcom,pmic-typec binding to include the SS mux and the DRD remote
   endpoint nodes underneath port@1, which is assigned to the SSUSB path
   according to usb-connector
 - Added usb-connector reference to the typec dt-binding
 - Added tags to the usb type c and vbus nodes
 - Removed "qcom" tags from type c and vbus nodes
 - Modified Kconfig module name, and removed module alias from the typec driver

Changes in v3:
 - Fix driver reference to match driver name in Kconfig for
   qcom_usb_vbus-regulator.c
 - Utilize regulator bitmap helpers for enable, disable and is enabled calls in
   qcom_usb_vbus-regulator.c
 - Use of_get_regulator_init_data() to initialize regulator init data, and to
   set constraints in qcom_usb_vbus-regulator.c
 - Remove the need for a local device structure in the vbus regulator driver

Changes in v2:
 - Use devm_kzalloc() in qcom_pmic_typec_probe()
 - Add checks to make sure return value of typec_find_port_power_role() is
   valid
 - Added a VBUS output regulator driver, which will be used by the PMIC USB
   type c driver to enable/disable the source
 - Added logic to control vbus source from the PMIC type c driver when
   UFP/DFP is detected
 - Added dt-binding for this new regulator driver
 - Fixed Kconfig typec notation to match others
 - Leave type C block disabled until enabled by a platform DTS

Add the required drivers for implementing type C orientation and role
detection using the Qualcomm PMIC.  Currently, PMICs such as the PM8150B
have an integrated type C block, which can be utilized for this.  This
series adds the dt-binding, PMIC type C driver, and DTS nodes.

The PMIC type C driver will register itself as a type C port w/ a
registered type C switch for orientation, and will fetch a USB role switch
handle for the role notifications.  It will also have the ability to enable
the VBUS output to any connected devices based on if the device is behaving
as a UFP or DFP.

Wesley Cheng (6):
  usb: typec: Add QCOM PMIC typec detection driver
  dt-bindings: usb: Add Qualcomm PMIC type C controller dt-binding
  arm64: boot: dts: qcom: pm8150b: Add node for USB type C block
  regulator: Add support for QCOM PMIC VBUS booster
  dt-bindings: regulator: Add dt-binding for QCOM PMIC VBUS output
    regulator
  arm64: boot: dts: qcom: pm8150b: Add DTS node for PMIC VBUS booster

 .../regulator/qcom,usb-vbus-regulator.yaml    |  41 +++
 .../bindings/usb/qcom,pmic-typec.yaml         | 113 +++++++
 arch/arm64/boot/dts/qcom/pm8150b.dtsi         |  13 +
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts       |   4 +
 drivers/regulator/Kconfig                     |  10 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/qcom_usb_vbus-regulator.c   |  97 ++++++
 drivers/usb/typec/Kconfig                     |  12 +
 drivers/usb/typec/Makefile                    |   1 +
 drivers/usb/typec/qcom-pmic-typec.c           | 275 ++++++++++++++++++
 10 files changed, 567 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml
 create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
 create mode 100644 drivers/regulator/qcom_usb_vbus-regulator.c
 create mode 100644 drivers/usb/typec/qcom-pmic-typec.c

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

4 years agoMerge series "regulator/qcom: Constify static structs" from Rikard Falkeborn <rikard...
Mark Brown [Wed, 1 Jul 2020 20:53:28 +0000 (21:53 +0100)]
Merge series "regulator/qcom: Constify static structs" from Rikard Falkeborn <rikard.falkeborn@gmail.com>:

Constify some static structs to allow the compiler to put them in
read-only memory.

Rikard Falkeborn (2):
  regulator: qcom_rpm: Constify struct regulator_ops
  regulator: qcom_spmi: Constify struct regulator_ops

 drivers/regulator/qcom_rpm-regulator.c  |  6 +++---
 drivers/regulator/qcom_spmi-regulator.c | 24 ++++++++++++------------
 2 files changed, 15 insertions(+), 15 deletions(-)

--
2.27.0

4 years agoMerge series "Add frequency / voltage scaling support for IPQ6018 SoC" from Kathirava...
Mark Brown [Wed, 1 Jul 2020 20:53:27 +0000 (21:53 +0100)]
Merge series "Add frequency / voltage scaling support for IPQ6018 SoC" from Kathiravan T <kathirav@codeaurora.org>:

IPQ6018 SoC uses the PMIC MP5496. SMPA2 and LDOA2 regulator of MP5496
controls the APSS and SDCC voltage scaling respectively. Add support
for the same.

changes since V1:
- Moved YAML conversion to the last as per Mark's comments

Kathiravan T (6):
  dt-bindings: soc: qcom: Add IPQ6018 compatible
  soc: qcom: smd-rpm: Add IPQ6018 compatible
  dt-bindings: regulator: add MP5496 regulator compatible
  regulator: qcom_smd: Add MP5496 regulators
  dt-bindings: soc: qcom: convert the SMD-RPM document to YAML schema
  dt-bindings: regulator: convert QCOM SMD-RPM regulator document to
    YAML schema

 .../bindings/regulator/qcom,smd-rpm-regulator.txt  | 320 ---------------------
 .../bindings/regulator/qcom,smd-rpm-regulator.yaml | 106 +++++++
 .../devicetree/bindings/soc/qcom/qcom,smd-rpm.txt  |  62 ----
 .../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml |  92 ++++++
 drivers/regulator/qcom_smd-regulator.c             |  34 +++
 drivers/soc/qcom/smd-rpm.c                         |   1 +
 6 files changed, 233 insertions(+), 382 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
 delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

4 years agoregulator: lp87565: enable voltage regardless of ENx pin
Luca Ceresoli [Mon, 22 Jun 2020 20:43:26 +0000 (22:43 +0200)]
regulator: lp87565: enable voltage regardless of ENx pin

This driver enables outputs by setting bit EN_BUCKn in the BUCKn_CTRL1
register. However, if bit EN_PIN_CTRLn in the same register is set, the
output is actually enabled only if EN_BUCKn is set AND an enable pin is
active. Since the driver does not touch EN_PIN_CTRLn, the choice is left to
the hardware, which in turn gets this bit from OTP memory, and in absence
of OTP data it uses a default value that is documented in the datasheet for
LP8752x, but not for LP8756x.

Thus the driver doesn't really "know" whether it is actually enabling the
output or not.

In order to make sure activation is always driver-controlled, just clear
the EN_PIN_CTRLn bit. Now all activation solely depend on the EN_BUCKn bit.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Link: https://lore.kernel.org/r/20200622204329.11147-2-luca@lucaceresoli.net
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: add MP5496 regulator compatible
Kathiravan T [Tue, 23 Jun 2020 05:17:49 +0000 (10:47 +0530)]
regulator: add MP5496 regulator compatible

IPQ6018 uses the PMIC MP5496. Add the binding for the same.

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
Link: https://lore.kernel.org/r/1592889472-6843-4-git-send-email-kathirav@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: qcom_smd: Add MP5496 regulators
Kathiravan T [Tue, 23 Jun 2020 05:17:50 +0000 (10:47 +0530)]
regulator: qcom_smd: Add MP5496 regulators

IPQ6018 SoC uses the PMIC MP5496. SMPA2 and LDOA2 regulator controls the
APSS and SDCC voltage scaling respectively. Add support for the same.

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
Link: https://lore.kernel.org/r/1592889472-6843-5-git-send-email-kathirav@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: qcom_spmi: Constify struct regulator_ops
Rikard Falkeborn [Mon, 29 Jun 2020 19:46:32 +0000 (21:46 +0200)]
regulator: qcom_spmi: Constify struct regulator_ops

These are never modified, so make them const to allow the compiler to
put them in read-only memory.

Before:
   text    data     bss     dec     hex filename
  20362    2592     152   23106    5a42 drivers/regulator/qcom_spmi-regulator.o

After:
   text    data     bss     dec     hex filename
  21814    1140     152   23106    5a42 drivers/regulator/qcom_spmi-regulator.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200629194632.8147-3-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: qcom_rpm: Constify struct regulator_ops
Rikard Falkeborn [Mon, 29 Jun 2020 19:46:31 +0000 (21:46 +0200)]
regulator: qcom_rpm: Constify struct regulator_ops

These are never modified, so make them const to allow the compiler to
put them in read-only memory.

Before:
   text    data     bss     dec     hex filename
  17485     500       8   17993    4649 drivers/regulator/qcom_rpm-regulator.o

After:
   text    data     bss     dec     hex filename
  17881     104       8   17993    4649 drivers/regulator/qcom_rpm-regulator.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200629194632.8147-2-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Add dt-binding for QCOM PMIC VBUS output regulator
Wesley Cheng [Fri, 26 Jun 2020 18:55:15 +0000 (11:55 -0700)]
regulator: Add dt-binding for QCOM PMIC VBUS output regulator

This describes how to enable the Qualcomm PMIC VBUS booster used for
providing power to connected USB peripherals when the USB role is host
mode.  The driver itself will register the vbus_usb regulator, so that
external drivers can utilize the enable/disable regulator APIs.

Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/20200626185516.18018-6-wcheng@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Add support for QCOM PMIC VBUS booster
Wesley Cheng [Fri, 26 Jun 2020 18:55:14 +0000 (11:55 -0700)]
regulator: Add support for QCOM PMIC VBUS booster

Some Qualcomm PMICs have the capability to source the VBUS output to
connected peripherals.  This driver will register a regulator to the
regulator list to enable or disable this source by an external driver.

Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/20200626185516.18018-5-wcheng@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost'
Lee Jones [Fri, 26 Jun 2020 06:57:38 +0000 (07:57 +0100)]
regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost'

This was an upstreaming error.  Remove it as it's not to be used.

Fixes the following W=1 kernel build warning:

 drivers/regulator/qcom_smd-regulator.c:477:36: warning: ‘pmi8994_boost’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Link: https://lore.kernel.org/r/20200626065738.93412-10-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: wm8400-regulator: Repair dodgy kerneldoc header formatting
Lee Jones [Fri, 26 Jun 2020 06:57:37 +0000 (07:57 +0100)]
regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting

W=1 kernel builds report a lack of descriptions for various
function arguments.  In reality they are documented, but the
formatting was not as expected '@.*:'.  Instead, some weird
arg identifiers were used.

This change fixes the following warnings:

 drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'dev' not described in 'wm8400_register_regulator'
 drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'reg' not described in 'wm8400_register_regulator'
 drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'initdata' not described in 'wm8400_register_regulator'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: patches@opensource.cirrus.com
Link: https://lore.kernel.org/r/20200626065738.93412-9-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check
Lee Jones [Fri, 26 Jun 2020 06:57:36 +0000 (07:57 +0100)]
regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check

'rid' is declared as unsigned int, so there is little point checking for <0.

Removing these checks fixes the following W=1 warnings:

 drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_enable’:
 drivers/regulator/tps65218-regulator.c:131:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 131 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 | ^
 drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_disable’:
 drivers/regulator/tps65218-regulator.c:144:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 144 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 | ^

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: linux-omap@vger.kernel.org
Link: https://lore.kernel.org/r/20200626065738.93412-8-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: tps65217-regulator: Use the returned value of tps65217_reg_read()
Lee Jones [Fri, 26 Jun 2020 06:57:35 +0000 (07:57 +0100)]
regulator: tps65217-regulator: Use the returned value of tps65217_reg_read()

Until now the aforementioned return value has been ignored.
Previous and current calls to tps65217_reg_read() return
instantly when the value is not 0, so let's do that.

Fixes the following W=1 warning:

 drivers/regulator/tps65217-regulator.c: In function ‘tps65217_regulator_probe’:
 drivers/regulator/tps65217-regulator.c:227:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 227 | int i, ret;
 | ^~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Russ Dill <Russ.Dill@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: AnilKumar Ch <anilkumar@ti.com>
Cc: linux-omap@vger.kernel.org
Link: https://lore.kernel.org/r/20200626065738.93412-7-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check
Lee Jones [Fri, 26 Jun 2020 06:57:34 +0000 (07:57 +0100)]
regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check

'rid' is declared as unsigned int, so there is little point checking for <0.

Removing these checks fixes the following W=1 warnings:

 drivers/regulator/tps65217-regulator.c: In function ‘tps65217_pmic_set_suspend_enable’:
 drivers/regulator/tps65217-regulator.c:127:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 127 | if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
 | ^
 drivers/regulator/tps65217-regulator.c: In function ‘tps65217_pmic_set_suspend_disable’:
 drivers/regulator/tps65217-regulator.c:140:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
 140 | if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
 | ^

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Russ Dill <Russ.Dill@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: AnilKumar Ch <anilkumar@ti.com>
Cc: linux-omap@vger.kernel.org
Link: https://lore.kernel.org/r/20200626065738.93412-6-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg'
Lee Jones [Fri, 26 Jun 2020 06:57:33 +0000 (07:57 +0100)]
regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg'

In kerneldoc format, data structures have to start with 'struct'
else the kerneldoc tooling/parsers/validators get confused.

Fixes the following W=1 kernel build warning:

 drivers/regulator/stpmic1_regulator.c:25: warning: cannot understand function prototype: 'struct stpmic1_regulator_cfg '

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Pascal Paillet <p.paillet@st.com>
Link: https://lore.kernel.org/r/20200626065738.93412-5-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: pwm-regulator: Demote kerneldoc header to standard comment
Lee Jones [Fri, 26 Jun 2020 06:57:32 +0000 (07:57 +0100)]
regulator: pwm-regulator: Demote kerneldoc header to standard comment

This particular comment doesn't have anything to do with documenting
functions or data structures.  Instead it is used as a section header.

Fixes W=1 warning:

 drivers/regulator/pwm-regulator.c:55: warning: Function parameter or member 'rdev' not described in 'pwm_regulator_init_state'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200626065738.93412-4-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting
Lee Jones [Fri, 26 Jun 2020 06:57:31 +0000 (07:57 +0100)]
regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting

W=1 kernel builds report a lack of descriptions for various
enum properties and function arguments.  In reality they are
documented, but the formatting was not as expected '@.*:'.
Instead, some weird arg identifiers were used or none at all.

This change fixes the following warnings:

 drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'VRM' not described in enum 'rpmh_regulator_type'
 drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'XOB' not described in enum 'rpmh_regulator_type'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'vreg' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'dev' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'node' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_id' not described in 'rpmh_regulator_init_vreg'
 drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_rpmh_data' not described in 'rpmh_regulator_init_vreg'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Link: https://lore.kernel.org/r/20200626065738.93412-3-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: max8998: Staticify internal function max8998_get_current_limit()
Lee Jones [Fri, 26 Jun 2020 06:57:30 +0000 (07:57 +0100)]
regulator: max8998: Staticify internal function max8998_get_current_limit()

max8998_get_current_limit() is only used via the .get_current_limit,
so it doesn't need to be publicly supported, or to have its own
external prototype.  Instead, we'll make it static.

Fixes the following W=1 warning:

 drivers/regulator/max8998.c:418:5: warning: no previous prototype for ‘max8998_get_current_limit’ [-Wmissing-prototypes]
 418 | int max8998_get_current_limit(struct regulator_dev *rdev)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20200626065738.93412-2-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: max14577-regulator: Demote kerneldoc header to standard comment
Lee Jones [Thu, 25 Jun 2020 16:36:14 +0000 (17:36 +0100)]
regulator: max14577-regulator: Demote kerneldoc header to standard comment

Nothing about this comment identifies it as a kerneldoc header.
It's missing all of it's function argument descriptions and the
correct function header.

Fixes the following W=1 warning(s):

 drivers/regulator/max14577-regulator.c:166: warning: Function parameter or member 'max14577' not described in 'max14577_get_regma
 drivers/regulator/max14577-regulator.c:166: warning: Function parameter or member 'reg_id' not described in 'max14577_get_regmap'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-11-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: cpcap-regulator: Demote kerneldoc header to standard comment
Lee Jones [Thu, 25 Jun 2020 16:36:12 +0000 (17:36 +0100)]
regulator: cpcap-regulator: Demote kerneldoc header to standard comment

Nothing about this comment identifies it as a kerneldoc header.
They're missing all of their struct's property descriptions and
the correct 'struct *' header.

Fixes the following W=1 warning(s):

 drivers/regulator/cpcap-regulator.c:99: warning: cannot understand function prototype: 'struct cpcap_regulator '
 drivers/regulator/cpcap-regulator.c:337: warning: cannot understand function prototype: 'const struct cpcap_regulator omap4_regulators[] = '

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-9-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore'
Lee Jones [Thu, 25 Jun 2020 16:36:11 +0000 (17:36 +0100)]
regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore'

It's okay to not check the return value that you're not conserned
about, however it is not okay to assign a variable and not check or
use the result.

Fixes W=1 warnings(s):

 drivers/regulator/cpcap-regulator.c:172:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable]
 172 | int error, ignore;
 | ^~~~~~
 drivers/regulator/cpcap-regulator.c: In function ‘cpcap_regulator_disable’:
 drivers/regulator/cpcap-regulator.c:196:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable]
 196 | int error, ignore;
 | ^~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-8-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: wm8350-regulator: Repair odd formatting in documentation
Lee Jones [Thu, 25 Jun 2020 16:36:10 +0000 (17:36 +0100)]
regulator: wm8350-regulator: Repair odd formatting in documentation

Kerneldoc expects function arguments to be in the format '@.*:'.  If
this format is not followed the kerneldoc tooling/parsers/validators
get confused.

Fixes the following W=1 warning(s):

 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'wm8350' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'lednum' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'dcdc' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'isink' not described in 'wm8350_register_led'
 drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'pdata' not described in 'wm8350_register_led'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-7-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: ab8500: Remove unused embedded struct expand_register
Lee Jones [Thu, 25 Jun 2020 16:36:09 +0000 (17:36 +0100)]
regulator: ab8500: Remove unused embedded struct expand_register

Used primarily for the AB8540 which lost support in early 2018.
It is now deemed safe to remove this legacy data structure.

Also fixes W=1 issue:

  drivers/regulator/ab8500.c:88: warning: Function parameter or member 'expand_register' not described in 'ab8500_regulator_info'

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-6-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase()
Lee Jones [Thu, 25 Jun 2020 16:36:08 +0000 (17:36 +0100)]
regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase()

There isn't any code present within the current kernel to
override this 'weak' function.  Besides returning '0', which
is never checked anyway, the whole function appears to be
superfluous.

Consequently fixes W=1 warning:

 drivers/regulator/dbx500-prcmu.c:113:27: warning: no previous prototype for ‘dbx500_regulator_testcase’ [-Wmissing-prototypes]
 113 | int __attribute__((weak)) dbx500_regulator_testcase(
 | ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-5-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: consumer: Supply missing prototypes for 3 core functions
Lee Jones [Thu, 25 Jun 2020 16:36:05 +0000 (17:36 +0100)]
regulator: consumer: Supply missing prototypes for 3 core functions

regulator_suspend_enable(), regulator_suspend_disable() and
regulator_set_suspend_voltage() are all exported members of the
API, but are all missing prototypes.

Fixes the following W=1 warning(s):

 drivers/regulator/core.c:3805:5: warning: no previous prototype for ‘regulator_suspend_enable’ [-Wmissing-prototypes]
 3805 | int regulator_suspend_enable(struct regulator_dev *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~
 drivers/regulator/core.c:3812:5: warning: no previous prototype for ‘regulator_suspend_disable’ [-Wmissing-prototypes]
 3812 | int regulator_suspend_disable(struct regulator_dev *rdev,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/regulator/core.c:3851:5: warning: no previous prototype for ‘regulator_set_suspend_voltage’ [-Wmissing-prototypes]
 3851 | int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV,
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200625163614.4001403-2-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: pfuze100: add condition check for 'ramp_delay = 0'
Robin Gong [Tue, 23 Jun 2020 14:01:10 +0000 (22:01 +0800)]
regulator: pfuze100: add condition check for 'ramp_delay = 0'

Checking for 'ramp_delay = 0' to avoid Coverity warning report.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Link: https://lore.kernel.org/r/1592920870-12693-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: max8997: Constify struct regulator_ops
Rikard Falkeborn [Wed, 17 Jun 2020 22:32:47 +0000 (00:32 +0200)]
regulator: max8997: Constify struct regulator_ops

These are not modified so make them const to allow the compiler to put
them in read-only memory.

Before:
   text    data     bss     dec     hex filename
  13114    8596       0   21710    54ce drivers/regulator/max8997-regulator.o

After:
   text    data     bss     dec     hex filename
  14038    7672       0   21710    54ce drivers/regulator/max8997-regulator.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200617223247.25566-6-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: max8907: Constify static structs
Rikard Falkeborn [Wed, 17 Jun 2020 22:32:46 +0000 (00:32 +0200)]
regulator: max8907: Constify static structs

These are not modified so make them const to allow the compiler to put
them in read-only memory.

Before:
   text    data     bss     dec     hex filename
   2753    7328       0   10081    2761 drivers/regulator/max8907-regulator.o

After:
   text    data     bss     dec     hex filename
   9405     684       0   10089    2769 drivers/regulator/max8907-regulator.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200617223247.25566-5-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: ltc3676: Constify ltc3676_regulators
Rikard Falkeborn [Wed, 17 Jun 2020 22:32:45 +0000 (00:32 +0200)]
regulator: ltc3676: Constify ltc3676_regulators

ltc3676_regulators is not modified and can be made const to allow the
compiler to put it in read-only memory.

Before:
   text    data     bss     dec     hex filename
   4361    2064       8    6433    1921 drivers/regulator/ltc3676.o

After:
   text    data     bss     dec     hex filename
   6121     304       8    6433    1921 drivers/regulator/ltc3676.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200617223247.25566-4-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: cpcap: Constify cpcap_regulator_ops
Rikard Falkeborn [Wed, 17 Jun 2020 22:32:44 +0000 (00:32 +0200)]
regulator: cpcap: Constify cpcap_regulator_ops

cpcap_regulator_ops is not modified and can be made const to allow the
compiler to put it in read-only memory.

Before:
   text    data     bss     dec     hex filename
  14472     236       0   14708    3974 drivers/regulator/cpcap-regulator.o

After:
   text    data     bss     dec     hex filename
  14604     104       0   14708    3974 drivers/regulator/cpcap-regulator.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200617223247.25566-3-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: anatop: Constify anatop_core_rops
Rikard Falkeborn [Wed, 17 Jun 2020 22:32:43 +0000 (00:32 +0200)]
regulator: anatop: Constify anatop_core_rops

anatop_core_rops is not modified and can therefore be made const which
allows the compiler to put it in read-only memory.

Before:
   text    data     bss     dec     hex filename
   4502     412       0    4914    1332 drivers/regulator/anatop-regulator.o

After:
   text    data     bss     dec     hex filename
   4634     280       0    4914    1332 drivers/regulator/anatop-regulator.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200617223247.25566-2-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge series "Add support for voltage regulator on ChromeOS EC." from Pi-Hsun Shih...
Mark Brown [Mon, 15 Jun 2020 22:06:31 +0000 (23:06 +0100)]
Merge series "Add support for voltage regulator on ChromeOS EC." from Pi-Hsun Shih <pihsun@chromium.org>:

Add support for controlling voltage regulator that is connected and
controlled by ChromeOS EC. Kernel controls these regulators through
newly added EC host commands.

Changes from v5:
* Move new host command to a separate patch.
* Use devm_regulator_register.
* Address review comments.

Changes from v4:
* Change compatible name from regulator-cros-ec to cros-ec-regulator.

Changes from v3:
* Fix dt bindings file name.
* Remove check around CONFIG_OF in driver.
* Add new host commands to cros_ec_trace.
* Address review comments.

Changes from v2:
* Add 'depends on OF' to Kconfig.
* Add Kconfig description about compiling as module.

Changes from v1:
* Change compatible string to google,regulator-cros-ec.
* Use reg property in device tree.
* Change license for dt binding according to checkpatch.pl.
* Address comments on code styles.

Pi-Hsun Shih (3):
  dt-bindings: regulator: Add DT binding for cros-ec-regulator
  platform/chrome: cros_ec: Add command for regulator control.
  regulator: Add driver for cros-ec-regulator

 .../regulator/google,cros-ec-regulator.yaml   |  51 ++++
 drivers/platform/chrome/cros_ec_trace.c       |   5 +
 drivers/regulator/Kconfig                     |  10 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/cros-ec-regulator.c         | 257 ++++++++++++++++++
 .../linux/platform_data/cros_ec_commands.h    |  82 ++++++
 6 files changed, 406 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml
 create mode 100644 drivers/regulator/cros-ec-regulator.c

base-commit: b791d1bdf9212d944d749a5c7ff6febdba241771
--
2.27.0.290.gba653c62da-goog

4 years agoregulator: Fix trivial spelling
Kieran Bingham [Tue, 9 Jun 2020 12:46:02 +0000 (13:46 +0100)]
regulator: Fix trivial spelling

The word 'descriptor' is misspelled throughout the tree.

Fix it up accordingly:
    decriptors -> descriptors

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20200609124610.3445662-10-kieran.bingham+renesas@ideasonboard.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: gpio: Fix trivial spelling
Kieran Bingham [Tue, 9 Jun 2020 12:46:09 +0000 (13:46 +0100)]
regulator: gpio: Fix trivial spelling

decriptor -> descriptor.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Link: https://lore.kernel.org/r/20200609124610.3445662-17-kieran.bingham+renesas@ideasonboard.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoregulator: Add driver for cros-ec-regulator
Pi-Hsun Shih [Fri, 12 Jun 2020 04:05:20 +0000 (12:05 +0800)]
regulator: Add driver for cros-ec-regulator

Add driver for cros-ec-regulator, representing a voltage regulator that
is connected and controlled by ChromeOS EC, and is controlled by kernel
with EC host commands.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200612040526.192878-4-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoplatform/chrome: cros_ec: Add command for regulator control.
Pi-Hsun Shih [Fri, 12 Jun 2020 04:05:19 +0000 (12:05 +0800)]
platform/chrome: cros_ec: Add command for regulator control.

Add host commands for voltage regulator control through ChromeOS EC.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200612040526.192878-3-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agodt-bindings: regulator: Add DT binding for cros-ec-regulator
Pi-Hsun Shih [Fri, 12 Jun 2020 04:05:18 +0000 (12:05 +0800)]
dt-bindings: regulator: Add DT binding for cros-ec-regulator

Add DT binding documentation for cros-ec-regulator, a voltage regulator
controlled by ChromeOS EC.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200612040526.192878-2-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoMerge existing fixes from regulator/for-5.8
Mark Brown [Mon, 15 Jun 2020 15:15:58 +0000 (16:15 +0100)]
Merge existing fixes from regulator/for-5.8

4 years agoregualtor: pfuze100: correct sw1a/sw2 on pfuze3000
Robin Gong [Sun, 14 Jun 2020 21:54:08 +0000 (05:54 +0800)]
regualtor: pfuze100: correct sw1a/sw2 on pfuze3000

PFUZE100_SWB_REG is not proper for sw1a/sw2, because enable_mask/enable_reg
is not correct. On PFUZE3000, sw1a/sw2 should be the same as sw1a/sw2 on
pfuze100 except that voltages are not linear, so add new PFUZE3000_SW_REG
and pfuze3000_sw_regulator_ops which like the non-linear PFUZE100_SW_REG
and pfuze100_sw_regulator_ops.

Fixes: 1dced996ee70 ("regulator: pfuze100: update voltage setting for pfuze3000 sw1a")
Reported-by: Christophe Meynard <Christophe.Meynard@ign.fr>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Link: https://lore.kernel.org/r/1592171648-8752-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 years agoLinux 5.8-rc1
Linus Torvalds [Sun, 14 Jun 2020 19:45:04 +0000 (12:45 -0700)]
Linux 5.8-rc1

4 years agoMerge tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux
Linus Torvalds [Sun, 14 Jun 2020 18:39:31 +0000 (11:39 -0700)]
Merge tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux

Pull SafeSetID update from Micah Morton:
 "Add additional LSM hooks for SafeSetID

  SafeSetID is capable of making allow/deny decisions for set*uid calls
  on a system, and we want to add similar functionality for set*gid
  calls.

  The work to do that is not yet complete, so probably won't make it in
  for v5.8, but we are looking to get this simple patch in for v5.8
  since we have it ready.

  We are planning on the rest of the work for extending the SafeSetID
  LSM being merged during the v5.9 merge window"

* tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux:
  security: Add LSM hooks to set*gid syscalls

4 years agosecurity: Add LSM hooks to set*gid syscalls
Thomas Cedeno [Tue, 9 Jun 2020 17:22:13 +0000 (10:22 -0700)]
security: Add LSM hooks to set*gid syscalls

The SafeSetID LSM uses the security_task_fix_setuid hook to filter
set*uid() syscalls according to its configured security policy. In
preparation for adding analagous support in the LSM for set*gid()
syscalls, we add the requisite hook here. Tested by putting print
statements in the security_task_fix_setgid hook and seeing them get hit
during kernel boot.

Signed-off-by: Thomas Cedeno <thomascedeno@google.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
4 years agoMerge tag 'for-5.8-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Linus Torvalds [Sun, 14 Jun 2020 16:47:25 +0000 (09:47 -0700)]
Merge tag 'for-5.8-part2-tag' of git://git./linux/kernel/git/kdave/linux

Pull btrfs updates from David Sterba:
 "This reverts the direct io port to iomap infrastructure of btrfs
  merged in the first pull request. We found problems in invalidate page
  that don't seem to be fixable as regressions or without changing iomap
  code that would not affect other filesystems.

  There are four reverts in total, but three of them are followup
  cleanups needed to revert a43a67a2d715 cleanly. The result is the
  buffer head based implementation of direct io.

  Reverts are not great, but under current circumstances I don't see
  better options"

* tag 'for-5.8-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  Revert "btrfs: switch to iomap_dio_rw() for dio"
  Revert "fs: remove dio_end_io()"
  Revert "btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK"
  Revert "btrfs: split btrfs_direct_IO to read and write part"

4 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Linus Torvalds [Sat, 13 Jun 2020 23:27:13 +0000 (16:27 -0700)]
Merge git://git./linux/kernel/git/netdev/net

Pull networking fixes from David Miller:

 1) Fix cfg80211 deadlock, from Johannes Berg.

 2) RXRPC fails to send norigications, from David Howells.

 3) MPTCP RM_ADDR parsing has an off by one pointer error, fix from
    Geliang Tang.

 4) Fix crash when using MSG_PEEK with sockmap, from Anny Hu.

 5) The ucc_geth driver needs __netdev_watchdog_up exported, from
    Valentin Longchamp.

 6) Fix hashtable memory leak in dccp, from Wang Hai.

 7) Fix how nexthops are marked as FDB nexthops, from David Ahern.

 8) Fix mptcp races between shutdown and recvmsg, from Paolo Abeni.

 9) Fix crashes in tipc_disc_rcv(), from Tuong Lien.

10) Fix link speed reporting in iavf driver, from Brett Creeley.

11) When a channel is used for XSK and then reused again later for XSK,
    we forget to clear out the relevant data structures in mlx5 which
    causes all kinds of problems. Fix from Maxim Mikityanskiy.

12) Fix memory leak in genetlink, from Cong Wang.

13) Disallow sockmap attachments to UDP sockets, it simply won't work.
    From Lorenz Bauer.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits)
  net: ethernet: ti: ale: fix allmulti for nu type ale
  net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
  net: atm: Remove the error message according to the atomic context
  bpf: Undo internal BPF_PROBE_MEM in BPF insns dump
  libbpf: Support pre-initializing .bss global variables
  tools/bpftool: Fix skeleton codegen
  bpf: Fix memlock accounting for sock_hash
  bpf: sockmap: Don't attach programs to UDP sockets
  bpf: tcp: Recv() should return 0 when the peer socket is closed
  ibmvnic: Flush existing work items before device removal
  genetlink: clean up family attributes allocations
  net: ipa: header pad field only valid for AP->modem endpoint
  net: ipa: program upper nibbles of sequencer type
  net: ipa: fix modem LAN RX endpoint id
  net: ipa: program metadata mask differently
  ionic: add pcie_print_link_status
  rxrpc: Fix race between incoming ACK parser and retransmitter
  net/mlx5: E-Switch, Fix some error pointer dereferences
  net/mlx5: Don't fail driver on failure to create debugfs
  net/mlx5e: CT: Fix ipv6 nat header rewrite actions
  ...

4 years agoRevert "btrfs: switch to iomap_dio_rw() for dio"
David Sterba [Tue, 9 Jun 2020 17:56:06 +0000 (19:56 +0200)]
Revert "btrfs: switch to iomap_dio_rw() for dio"

This reverts commit a43a67a2d715540c1368b9501a22b0373b5874c0.

This patch reverts the main part of switching direct io implementation
to iomap infrastructure. There's a problem in invalidate page that
couldn't be solved as regression in this development cycle.

The problem occurs when buffered and direct io are mixed, and the ranges
overlap. Although this is not recommended, filesystems implement
measures or fallbacks to make it somehow work. In this case, fallback to
buffered IO would be an option for btrfs (this already happens when
direct io is done on compressed data), but the change would be needed in
the iomap code, bringing new semantics to other filesystems.

Another problem arises when again the buffered and direct ios are mixed,
invalidation fails, then -EIO is set on the mapping and fsync will fail,
though there's no real error.

There have been discussions how to fix that, but revert seems to be the
least intrusive option.

Link: https://lore.kernel.org/linux-btrfs/20200528192103.xm45qoxqmkw7i5yl@fiona/
Signed-off-by: David Sterba <dsterba@suse.com>
4 years agonet: ethernet: ti: ale: fix allmulti for nu type ale
Grygorii Strashko [Sat, 13 Jun 2020 14:54:14 +0000 (17:54 +0300)]
net: ethernet: ti: ale: fix allmulti for nu type ale

On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow
unregistered mcast packets to pass.

This happens, because ALE VLAN entries on these SoCs do not contain port
masks for reg/unreg mcast packets, but instead store indexes of
ALE_VLAN_MASK_MUXx_REG registers which intended for store port masks for
reg/unreg mcast packets.
This path was missed by commit 9d1f6447274f ("net: ethernet: ti: ale: fix
seeing unreg mcast packets with promisc and allmulti disabled").

Hence, fix it by taking into account ALE type in cpsw_ale_set_allmulti().

Fixes: 9d1f6447274f ("net: ethernet: ti: ale: fix seeing unreg mcast packets with promisc and allmulti disabled")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
Grygorii Strashko [Sat, 13 Jun 2020 14:52:59 +0000 (17:52 +0300)]
net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

The ALE parameters structure is created on stack, so it has to be reset
before passing to cpsw_ale_create() to avoid garbage values.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
David S. Miller [Sat, 13 Jun 2020 22:28:08 +0000 (15:28 -0700)]
Merge git://git./pub/scm/linux/kernel/git/bpf/bpf

Alexei Starovoitov says:

====================
pull-request: bpf 2020-06-12

The following pull-request contains BPF updates for your *net* tree.

We've added 26 non-merge commits during the last 10 day(s) which contain
a total of 27 files changed, 348 insertions(+), 93 deletions(-).

The main changes are:

1) sock_hash accounting fix, from Andrey.

2) libbpf fix and probe_mem sanitizing, from Andrii.

3) sock_hash fixes, from Jakub.

4) devmap_val fix, from Jesper.

5) load_bytes_relative fix, from YiFei.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: atm: Remove the error message according to the atomic context
Liao Pingfang [Sat, 13 Jun 2020 06:03:26 +0000 (14:03 +0800)]
net: atm: Remove the error message according to the atomic context

Looking into the context (atomic!) and the error message should be dropped.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge tag '5.8-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 13 Jun 2020 20:43:56 +0000 (13:43 -0700)]
Merge tag '5.8-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull more cifs updates from Steve French:
 "12 cifs/smb3 fixes, 2 for stable.

   - add support for idsfromsid on create and chgrp/chown allowing
     ability to save owner information more naturally for some workloads

   - improve query info (getattr) when SMB3.1.1 posix extensions are
     negotiated by using new query info level"

* tag '5.8-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  smb3: Add debug message for new file creation with idsfromsid mount option
  cifs: fix chown and chgrp when idsfromsid mount option enabled
  smb3: allow uid and gid owners to be set on create with idsfromsid mount option
  smb311: Add tracepoints for new compound posix query info
  smb311: add support for using info level for posix extensions query
  smb311: Add support for lookup with posix extensions query info
  smb311: Add support for SMB311 query info (non-compounded)
  SMB311: Add support for query info using posix extensions (level 100)
  smb3: add indatalen that can be a non-zero value to calculation of credit charge in smb2 ioctl
  smb3: fix typo in mount options displayed in /proc/mounts
  cifs: Add get_security_type_str function to return sec type.
  smb3: extend fscache mount volume coherency check

4 years agobinderfs: add gitignore for generated sample program
Linus Torvalds [Sat, 13 Jun 2020 20:41:24 +0000 (13:41 -0700)]
binderfs: add gitignore for generated sample program

Let's keep "git status" happy and quiet.

Fixes: 9762dc1432e1 ("samples: add binderfs sample program
Fixes: fca5e94921d5 ("samples: binderfs: really compile this sample and fix build issues")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 years agodoc: don't use deprecated "---help---" markers in target docs
Linus Torvalds [Sat, 13 Jun 2020 20:32:40 +0000 (13:32 -0700)]
doc: don't use deprecated "---help---" markers in target docs

I'm not convinced the script makes useful automaed help lines anyway,
but since we're trying to deprecate the use of "---help---" in Kconfig
files, let's fix the doc example code too.

See commit a7f7f6248d97 ("treewide: replace '---help---' in Kconfig
files with 'help'")

Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 years agoMerge tag 'kbuild-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Linus Torvalds [Sat, 13 Jun 2020 20:29:16 +0000 (13:29 -0700)]
Merge tag 'kbuild-v5.8-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

 - fix build rules in binderfs sample

 - fix build errors when Kbuild recurses to the top Makefile

 - covert '---help---' in Kconfig to 'help'

* tag 'kbuild-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  treewide: replace '---help---' in Kconfig files with 'help'
  kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
  samples: binderfs: really compile this sample and fix build issues

4 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 13 Jun 2020 20:17:49 +0000 (13:17 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "This is the set of changes collected since just before the merge
  window opened. It's mostly minor fixes in drivers.

  The one non-driver set is the three optical disk (sr) changes where
  two are error path fixes and one is a helper conversion.

  The big driver change is the hpsa compat_alloc_userspace rework by Al
  so he can kill the remaining user. This has been tested and acked by
  the maintainer"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits)
  scsi: acornscsi: Fix an error handling path in acornscsi_probe()
  scsi: storvsc: Remove memset before memory freeing in storvsc_suspend()
  scsi: cxlflash: Remove an unnecessary NULL check
  scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
  scsi: sr: Fix sr_probe() missing deallocate of device minor
  scsi: sr: Fix sr_probe() missing mutex_destroy
  scsi: st: Convert convert get_user_pages() --> pin_user_pages()
  scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_cdb()
  scsi: target: Fix NULL pointer dereference
  scsi: target: Initialize LUN in transport_init_se_cmd()
  scsi: target: Factor out a new helper, target_cmd_init_cdb()
  scsi: hpsa: hpsa_ioctl(): Tidy up a bit
  scsi: hpsa: Get rid of compat_alloc_user_space()
  scsi: hpsa: Don't bother with vmalloc for BIG_IOCTL_Command_struct
  scsi: hpsa: Lift {BIG_,}IOCTL_Command_struct copy{in,out} into hpsa_ioctl()
  scsi: ufs: Remove redundant urgent_bkop_lvl initialization
  scsi: ufs: Don't update urgent bkops level when toggling auto bkops
  scsi: qedf: Remove redundant initialization of variable rc
  scsi: mpt3sas: Fix memset() in non-RDPQ mode
  scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj
  ...

4 years agoMerge branch 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Linus Torvalds [Sat, 13 Jun 2020 20:12:38 +0000 (13:12 -0700)]
Merge branch 'i2c/for-5.8' of git://git./linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "I2C has quite some patches for you this time. I hope it is the move to
  per-driver-maintainers which is now showing results. We will see.

  The big news is two new drivers (Nuvoton NPCM and Qualcomm CCI),
  larger refactoring of the Designware, Tegra, and PXA drivers, the
  Cadence driver supports being a slave now, and there is support to
  instanciate SPD eeproms for well-known cases (which will be
  user-visible because the i801 driver supports it), and some
  devm_platform_ioremap_resource() conversions which blow up the
  diffstat.

  Note that I applied the Nuvoton driver quite late, so some minor fixup
  patches arrived during the merge window. I chose to apply them right
  away because they were trivial"

* 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (109 commits)
  i2c: Drop stray comma in MODULE_AUTHOR statements
  i2c: npcm7xx: npcm_i2caddr[] can be static
  MAINTAINERS: npcm7xx: Add maintainer for Nuvoton NPCM BMC
  i2c: npcm7xx: Fix a couple of error codes in probe
  i2c: icy: Fix build with CONFIG_AMIGA_PCMCIA=n
  i2c: npcm7xx: Remove unnecessary parentheses
  i2c: npcm7xx: Add support for slave mode for Nuvoton
  i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver
  dt-bindings: i2c: npcm7xx: add NPCM I2C controller
  i2c: pxa: don't error out if there's no pinctrl
  i2c: add 'single-master' property to generic bindings
  i2c: designware: Add Baikal-T1 System I2C support
  i2c: designware: Move reg-space remapping into a dedicated function
  i2c: designware: Retrieve quirk flags as early as possible
  i2c: designware: Convert driver to using regmap API
  i2c: designware: Discard Cherry Trail model flag
  i2c: designware: Add Baytrail sem config DW I2C platform dependency
  i2c: designware: slave: Set DW I2C core module dependency
  i2c: designware: Use `-y` to build multi-object modules
  dt-bindings: i2c: dw: Add Baikal-T1 SoC I2C controller
  ...

4 years agoMerge tag 'media/v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 13 Jun 2020 20:09:38 +0000 (13:09 -0700)]
Merge tag 'media/v5.8-2' of git://git./linux/kernel/git/mchehab/linux-media

Pull more media updates from Mauro Carvalho Chehab:

 - a set of atomisp patches. They remove several abstraction layers, and
   fixes clang and gcc warnings (that were hidden via some macros that
   were disabling 4 or 5 types of warnings there). There are also some
   important fixes and sensor auto-detection on newer BIOSes via ACPI
   _DCM tables.

 - some fixes

* tag 'media/v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (95 commits)
  media: rkvdec: Fix H264 scaling list order
  media: v4l2-ctrls: Unset correct HEVC loop filter flag
  media: videobuf2-dma-contig: fix bad kfree in vb2_dma_contig_clear_max_seg_size
  media: v4l2-subdev.rst: correct information about v4l2 events
  media: s5p-mfc: Properly handle dma_parms for the allocated devices
  media: medium: cec: Make MEDIA_CEC_SUPPORT default to n if !MEDIA_SUPPORT
  media: cedrus: Implement runtime PM
  media: cedrus: Program output format during each run
  media: atomisp: improve ACPI/DMI detection logs
  media: Revert "media: atomisp: add Asus Transform T101HA ACPI vars"
  media: Revert "media: atomisp: Add some ACPI detection info"
  media: atomisp: improve sensor detection code to use _DSM table
  media: atomisp: get rid of an iomem abstraction layer
  media: atomisp: get rid of a string_support.h abstraction layer
  media: atomisp: use strscpy() instead of less secure variants
  media: atomisp: set DFS to MAX if sensor doesn't report fps
  media: atomisp: use different dfs failed messages
  media: atomisp: change the detection of ISP2401 at runtime
  media: atomisp: use macros from intel-family.h
  media: atomisp: don't set hpll_freq twice with different values
  ...

4 years agoMerge tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
Linus Torvalds [Sat, 13 Jun 2020 20:04:36 +0000 (13:04 -0700)]
Merge tag 'libnvdimm-for-5.8' of git://git./linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm updates from Dan Williams:
 "Small collection of cleanups to rework usage of ->queuedata and the
  GUID api"

* tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  nvdimm/pmem: stop using ->queuedata
  nvdimm/btt: stop using ->queuedata
  nvdimm/blk: stop using ->queuedata
  libnvdimm: Replace guid_copy() with import_guid() where it makes sense

4 years agowatch_queue: add gitignore for generated sample program
Linus Torvalds [Sat, 13 Jun 2020 20:00:54 +0000 (13:00 -0700)]
watch_queue: add gitignore for generated sample program

Let's keep "git status" happy and quiet.

Fixes: f5b5a164f9a1 ("Add sample notification program")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>