platform/kernel/linux-rpi.git
3 years agomfd: ab8500-core: Use DEVICE_ATTR_RO/RW macro
Zhen Lei [Wed, 2 Jun 2021 11:43:39 +0000 (19:43 +0800)]
mfd: ab8500-core: Use DEVICE_ATTR_RO/RW macro

Use DEVICE_ATTR_RO/RW macro helper instead of plain DEVICE_ATTR, which
makes the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: intel_soc_pmic_bxtwc: Use DEVICE_ATTR_ADMIN_RW macro
Zhen Lei [Wed, 2 Jun 2021 11:43:38 +0000 (19:43 +0800)]
mfd: intel_soc_pmic_bxtwc: Use DEVICE_ATTR_ADMIN_RW macro

Use DEVICE_ATTR_ADMIN_RW macro helper instead of plain DEVICE_ATTR, which
makes the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: janz-cmodio: Use DEVICE_ATTR_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:37 +0000 (19:43 +0800)]
mfd: janz-cmodio: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: kempld-core: Use DEVICE_ATTR_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:36 +0000 (19:43 +0800)]
mfd: kempld-core: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: pcf50633: Use DEVICE_ATTR_ADMIN_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:35 +0000 (19:43 +0800)]
mfd: pcf50633: Use DEVICE_ATTR_ADMIN_RO macro

Use DEVICE_ATTR_ADMIN_RO macro helper instead of plain DEVICE_ATTR, which
makes the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sm501: Use DEVICE_ATTR_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:34 +0000 (19:43 +0800)]
mfd: sm501: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: timberdale: Use DEVICE_ATTR_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:33 +0000 (19:43 +0800)]
mfd: timberdale: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: ucb1x00-assabet: Use DEVICE_ATTR_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:32 +0000 (19:43 +0800)]
mfd: ucb1x00-assabet: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: wm831x: Use DEVICE_ATTR_RO macro
Zhen Lei [Wed, 2 Jun 2021 11:43:31 +0000 (19:43 +0800)]
mfd: wm831x: Use DEVICE_ATTR_RO macro

Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: wm831x: Use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_IRQ() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:00:09 +0000 (15:00 +0800)]
mfd: wm831x: Use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_IRQ() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agodt-bindings: mfd: stm32-timers: Remove #address/size cells from required properties
Alexandre Torgue [Thu, 15 Apr 2021 10:10:28 +0000 (12:10 +0200)]
dt-bindings: mfd: stm32-timers: Remove #address/size cells from required properties

address-cells and size-cells can't be declared as "required" properties
as they are not needed if subnodes don't have a "reg" entry.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sun6i-prcm: Use DEFINE_RES_MEM() to simplify code
Zhen Lei [Tue, 1 Jun 2021 06:34:01 +0000 (14:34 +0800)]
mfd: sun6i-prcm: Use DEFINE_RES_MEM() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: asic3: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
Zhen Lei [Tue, 1 Jun 2021 06:36:48 +0000 (14:36 +0800)]
mfd: asic3: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: 88pm805: Use DEFINE_RES_IRQ_NAMED() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:04:25 +0000 (15:04 +0800)]
mfd: 88pm805: Use DEFINE_RES_IRQ_NAMED() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:06:30 +0000 (15:06 +0800)]
mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: tps80031: Use DEFINE_RES_IRQ() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:21:32 +0000 (15:21 +0800)]
mfd: tps80031: Use DEFINE_RES_IRQ() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: da9055: Use DEFINE_RES_IRQ_NAMED() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:28:30 +0000 (15:28 +0800)]
mfd: da9055: Use DEFINE_RES_IRQ_NAMED() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: as3722: Use DEFINE_RES_IRQ_NAMED() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:31:42 +0000 (15:31 +0800)]
mfd: as3722: Use DEFINE_RES_IRQ_NAMED() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: t7l66xb: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
Zhen Lei [Tue, 1 Jun 2021 07:47:06 +0000 (15:47 +0800)]
mfd: t7l66xb: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: cros_ec_dev: Load lightbar module only present
Gwendal Grignou [Wed, 26 May 2021 03:45:00 +0000 (20:45 -0700)]
mfd: cros_ec_dev: Load lightbar module only present

The pixel lightbar is only present on chromebook pixel (link), pixel 2
and pixel C. For the latter two, the EC reports its presence.
Instead of always loading the lightbar driver on all chromebook, only
load it when reported by the EC or Link device.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Remove unused platform data members
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:11 +0000 (08:47 -0400)]
mfd: sec: Remove unused platform data members

The Samsung PMIC drivers for early chipsets like S5M8767 stored quite a
lot in platform data (struct sec_platform_data).  The s5m8767 regulator
driver currently references only some of its fields.  Newer regulator
drivers (e.g. s2mps11) use even less platform data fields.

Clean up the structure to reduce memory footprint and source code size.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Enable wakeup from suspend via devicetree property
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:10 +0000 (08:47 -0400)]
mfd: sec: Enable wakeup from suspend via devicetree property

Set device wakeup capability from devicetree property (done by drivers
core), instead of always setting it to 0 (because value in platform data
is not assigned).

This should not have visible effect on actual resuming from suspend
because the child device - S5M RTC driver - is responsible for waking
up and sets device wakeup unconditionally.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Remove unused irq_base in platform data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:09 +0000 (08:47 -0400)]
mfd: sec: Remove unused irq_base in platform data

The 'irq_base' field of platform data structure is not assigned,
therefore its default value of 0 has no impact and can be safely
dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Remove unused device_type in platform data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:08 +0000 (08:47 -0400)]
mfd: sec: Remove unused device_type in platform data

The 'device_type' field of platform data structure is not used and can
be safely dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Remove unused cfg_pmic_irq in platform data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:07 +0000 (08:47 -0400)]
mfd: sec: Remove unused cfg_pmic_irq in platform data

The 'cfg_pmic_irq' field of platform data structure is not used and can
be safely dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Drop support for board files and require devicetree
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:06 +0000 (08:47 -0400)]
mfd: sec: Drop support for board files and require devicetree

The Samsung PMIC drivers since long time are used only on devicetree
platforms (Samsung Exynos) and there are no users with board files.

Drop the support for board files entirely and depend on OF for matching.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: sec: Simplify getting of_device_id match data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:03 +0000 (08:47 -0400)]
mfd: sec: Simplify getting of_device_id match data

Use of_device_get_match_data() to make the code slightly smaller.  There
is also no need to wrap it in a check for CONFIG_OF, because dev.of_node
will be set only with OF support.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: da9062: Simplify getting of_device_id match data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:02 +0000 (08:47 -0400)]
mfd: da9062: Simplify getting of_device_id match data

Use of_device_get_match_data() to make the code slightly smaller.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: da9052: Simplify getting of_device_id match data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:01 +0000 (08:47 -0400)]
mfd: da9052: Simplify getting of_device_id match data

Use of_device_get_match_data() to make the code slightly smaller.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: max8998: Simplify getting of_device_id match data
Krzysztof Kozlowski [Wed, 26 May 2021 12:47:00 +0000 (08:47 -0400)]
mfd: max8998: Simplify getting of_device_id match data

Use of_device_get_match_data() to make the code slightly smaller.  There
is also no need to wrap it in a check for CONFIG_OF, because dev.of_node
will be set only with OF support.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: max8997: Simplify getting of_device_id match data
Krzysztof Kozlowski [Wed, 26 May 2021 12:46:59 +0000 (08:46 -0400)]
mfd: max8997: Simplify getting of_device_id match data

Use of_device_get_match_data() to make the code slightly smaller.  There
is also no need to wrap it in a check for CONFIG_OF, because dev.of_node
will be set only with OF support.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: qcom-spmi-pmic: Add support for four variants
satya priya [Tue, 25 May 2021 10:11:06 +0000 (15:41 +0530)]
mfd: qcom-spmi-pmic: Add support for four variants

Add support for pm8350c, pmk8350, pm7325 and pmr735a PMICS.

Signed-off-by: satya priya <skakit@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: pm8008: Add driver for QCOM PM8008 PMIC
Guru Das Srinagesh [Tue, 25 May 2021 18:02:40 +0000 (11:02 -0700)]
mfd: pm8008: Add driver for QCOM PM8008 PMIC

Qualcomm Technologies, Inc. PM8008 is a dedicated camera PMIC that
integrates all the necessary power management, housekeeping, and
interface support functions into a single IC. Its key features include
overtemperature protection, low-dropout linear regulators, GPIOs, and an
I2C interface.

Add an MFD driver to support it.

Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agodt-bindings: mfd: pm8008: Add bindings
Guru Das Srinagesh [Tue, 25 May 2021 18:02:39 +0000 (11:02 -0700)]
dt-bindings: mfd: pm8008: Add bindings

Add bindings for the Qualcomm Technologies, Inc. PM8008 MFD driver.

Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agodt-bindings: mfd: pm8008: Add IRQ listing
Guru Das Srinagesh [Tue, 25 May 2021 18:02:38 +0000 (11:02 -0700)]
dt-bindings: mfd: pm8008: Add IRQ listing

Add a header file listing all of the IRQs that Qualcomm Technologies,
Inc. PM8008 supports. The constants defined in this file may be used in
the client device tree node to specify interrupts.

Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: da9063: Propagate errno when I2C mode fails
Wolfram Sang [Tue, 25 May 2021 13:42:43 +0000 (15:42 +0200)]
mfd: da9063: Propagate errno when I2C mode fails

Don't hardocde EIO but use the obtained value.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Mark Jonas <mark.jonas@de.bosch.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: bd71828: Fix .n_voltages settings
Axel Lin [Sun, 23 May 2021 07:10:45 +0000 (15:10 +0800)]
mfd: bd71828: Fix .n_voltages settings

Current .n_voltages settings do not cover the latest 2 valid selectors,
so it fails to set voltage for the hightest voltage support.
The latest linear range has step_uV = 0, so it does not matter if we
count the .n_voltages to maximum selector + 1 or the first selector of
latest linear range + 1.
To simplify calculating the n_voltages, let's just set the
.n_voltages to maximum selector + 1.

Fixes: 522498f8cb8c ("regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: hisilicon: Use the correct HiSilicon copyright
Hao Fang [Sat, 22 May 2021 10:25:15 +0000 (18:25 +0800)]
mfd: hisilicon: Use the correct HiSilicon copyright

s/Hisilicon/HiSilicon/

It should use capital S, according to the official website
https://www.hisilicon.com/en.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: cpcap: Fix cpcap dmamask not set warnings
Tony Lindgren [Sat, 22 May 2021 05:10:01 +0000 (08:10 +0300)]
mfd: cpcap: Fix cpcap dmamask not set warnings

We have started to get a bunch of pointless dmamask not set warnings
that makes the output of dmesg -l err,warn hard to read with many
extra warnings:

cpcap-regulator cpcap-regulator.0: DMA mask not set
cpcap_adc cpcap_adc.0: DMA mask not set
cpcap_battery cpcap_battery.0: DMA mask not set
cpcap-charger cpcap-charger.0: DMA mask not set
cpcap-pwrbutton cpcap-pwrbutton.0: DMA mask not set
cpcap-led cpcap-led.0: DMA mask not set
cpcap-led cpcap-led.1: DMA mask not set
cpcap-led cpcap-led.2: DMA mask not set
cpcap-led cpcap-led.3: DMA mask not set
cpcap-led cpcap-led.4: DMA mask not set
cpcap-rtc cpcap-rtc.0: DMA mask not set
cpcap-usb-phy cpcap-usb-phy.0: DMA mask not set

This seems to have started with commit 4d8bde883bfb ("OF: Don't set
default coherent DMA mask"). We have the parent SPI controller use
DMA, while CPCAP driver and it's children do not. For audio, the
DMA is handled over I2S bus with the McBSP driver.

Cc: Carl Philipp Klemm <philipp@uvos.xyz>
Cc: Ivan Jelincic <parazyd@dyne.org>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Sicelo A. Mhlongo <absicsz@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: arizona: Allow building arizona MFD-core as module
Hans de Goede [Fri, 21 May 2021 13:50:23 +0000 (15:50 +0200)]
mfd: arizona: Allow building arizona MFD-core as module

There is no reason why the arizona core,irq and codec model specific
regmap bits cannot be build as a module. All they do is export symbols
which are used by the arizona-spi/i2c and arizona-codec modules, which
themselves can be built as module.

Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
can be built as a module.

This is especially useful on x86 platforms with a WM5102 codec, this
allows the arizona MFD driver necessary for the WM5102 codec to be
enabled in generic distro-kernels without growing the base kernel-image
size.

Note this also adds an explicit "depends on MFD_ARIZONA" to all the
arizona codec Kconfig options. The codec drivers use functions from mfd
arizona-core. These new depends are necessary to disallow the codec
drivers being builtin when the arizona-core is build as a module,
otherwise we end up with missing symbol errors when building vmlinuz.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: db8500-prcmu: Add devicetree bindings
Linus Walleij [Tue, 18 May 2021 14:51:32 +0000 (16:51 +0200)]
mfd: db8500-prcmu: Add devicetree bindings

This driver was merged in the early days of device tree
on Arm in 2012 and somehow we failed to provide bindings
for it. Fix it up with some YAML bindings.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: si476x-i2c: Fix incorrectly documented function names
Lee Jones [Wed, 31 Mar 2021 08:15:36 +0000 (09:15 +0100)]
mfd: si476x-i2c: Fix incorrectly documented function names

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/si476x-i2c.c:360: warning: expecting prototype for si476x_drain_rds_fifo(). Prototype was for si476x_core_drain_rds_fifo() instead
 drivers/mfd/si476x-i2c.c:467: warning: expecting prototype for si476x_get_status(). Prototype was for si476x_core_get_status() instead
 drivers/mfd/si476x-i2c.c:484: warning: expecting prototype for si476x_get_and_signal_status(). Prototype was for si476x_core_get_and_signal_status() instead
 drivers/mfd/si476x-i2c.c:555: warning: expecting prototype for si476x_firmware_version_to_revision(). Prototype was for si476x_core_fwver_to_revision() instead
 drivers/mfd/si476x-i2c.c:619: warning: expecting prototype for si476x_get_revision_info(). Prototype was for si476x_core_get_revision_info() instead

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: si476x-cmd: Fix a bunch of incorrectly documented function names
Lee Jones [Wed, 31 Mar 2021 08:14:31 +0000 (09:14 +0100)]
mfd: si476x-cmd: Fix a bunch of incorrectly documented function names

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/si476x-cmd.c:406: warning: expecting prototype for si476x_cmd_func_info(). Prototype was for si476x_core_cmd_func_info() instead
 drivers/mfd/si476x-cmd.c:437: warning: expecting prototype for si476x_cmd_set_property(). Prototype was for si476x_core_cmd_set_property() instead
 drivers/mfd/si476x-cmd.c:463: warning: expecting prototype for si476x_cmd_get_property(). Prototype was for si476x_core_cmd_get_property() instead
 drivers/mfd/si476x-cmd.c:525: warning: expecting prototype for si476x_cmd_dig_audio_pin_cfg(). Prototype was for si476x_core_cmd_dig_audio_pin_cfg() instead
 drivers/mfd/si476x-cmd.c:574: warning: expecting prototype for si476x_cmd_zif_pin_cfg(). Prototype was for si476x_core_cmd_zif_pin_cfg() instead
 drivers/mfd/si476x-cmd.c:631: warning: expecting prototype for si476x_cmd_ic_link_gpo_ctl_pin_cfg(). Prototype was for si476x_core_cmd_ic_link_gpo_ctl_pin_cfg() instead
 drivers/mfd/si476x-cmd.c:662: warning: expecting prototype for si476x_cmd_ana_audio_pin_cfg(). Prototype was for si476x_core_cmd_ana_audio_pin_cfg() instead
 drivers/mfd/si476x-cmd.c:697: warning: expecting prototype for si476x_cmd_intb_pin_cfg(). Prototype was for si476x_core_cmd_intb_pin_cfg_a10() instead
 drivers/mfd/si476x-cmd.c:742: warning: expecting prototype for si476x_cmd_am_rsq_status(). Prototype was for si476x_core_cmd_am_rsq_status() instead
 drivers/mfd/si476x-cmd.c:874: warning: expecting prototype for si476x_cmd_fm_seek_start(). Prototype was for si476x_core_cmd_fm_seek_start() instead
 drivers/mfd/si476x-cmd.c:905: warning: expecting prototype for si476x_cmd_fm_rds_status(). Prototype was for si476x_core_cmd_fm_rds_status() instead
 drivers/mfd/si476x-cmd.c:1050: warning: expecting prototype for si476x_cmd_am_seek_start(). Prototype was for si476x_core_cmd_am_seek_start() instead

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: omap-usb-tll: File headers are not good candidates for kernel-doc
Lee Jones [Wed, 31 Mar 2021 08:12:02 +0000 (09:12 +0100)]
mfd: omap-usb-tll: File headers are not good candidates for kernel-doc

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/omap-usb-tll.c:24: warning: expecting prototype for omap(). Prototype was for USBTLL_DRIVER_NAME() instead

Cc: Tony Lindgren <tony@atomide.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: omap-usb-host: File headers are not good candidates for kernel-doc
Lee Jones [Wed, 31 Mar 2021 08:11:21 +0000 (09:11 +0100)]
mfd: omap-usb-host: File headers are not good candidates for kernel-doc

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/omap-usb-host.c:26: warning: expecting prototype for omap(). Prototype was for USBHS_DRIVER_NAME() instead

Cc: Tony Lindgren <tony@atomide.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: db8500-prcmu: Fix multiple incorrectly documented function names
Lee Jones [Wed, 31 Mar 2021 08:11:00 +0000 (09:11 +0100)]
mfd: db8500-prcmu: Fix multiple incorrectly documented function names

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/db8500-prcmu.c:624: warning: expecting prototype for prcmu_get_current_mode(). Prototype was for prcmu_get_xp70_current_state() instead
 drivers/mfd/db8500-prcmu.c:908: warning: expecting prototype for db8500_set_ape_opp(). Prototype was for db8500_prcmu_set_ape_opp() instead
 drivers/mfd/db8500-prcmu.c:2303: warning: expecting prototype for db8500_prcmu_reset_modem(). Prototype was for db8500_prcmu_modem_reset() instead

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
Cc: Sundar Iyer <sundar.iyer@stericsson.com>
Cc: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: twl-core: Fix incorrect function name twl_regcache_bypass()
Lee Jones [Wed, 31 Mar 2021 08:10:18 +0000 (09:10 +0100)]
mfd: twl-core: Fix incorrect function name twl_regcache_bypass()

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/twl-core.c:496: warning: expecting prototype for twl_regcache_bypass(). Prototype was for twl_set_regcache_bypass() instead

Cc: Tony Lindgren <tony@atomide.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Kai Svahn <kai.svahn@nokia.com>
Cc: syed khasim <x0khasim@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: wm831x-core: Fix incorrect function name wm831x_reg_unlock()
Lee Jones [Wed, 31 Mar 2021 08:09:46 +0000 (09:09 +0100)]
mfd: wm831x-core: Fix incorrect function name wm831x_reg_unlock()

Fixes the following W=1 kernel build warning(s):

 drivers/mfd/wm831x-core.c:121: warning: expecting prototype for wm831x_reg_unlock(). Prototype was for wm831x_reg_lock() instead

Cc: Lee Jones <lee.jones@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: patches@opensource.cirrus.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agoRevert "MAINTAINERS: Add entry for Intel MAX 10 mfd driver"
Lee Jones [Fri, 21 May 2021 07:14:59 +0000 (08:14 +0100)]
Revert "MAINTAINERS: Add entry for Intel MAX 10 mfd driver"

This reverts commit 58d91f1c1701de9420acc43a2f4f8004af85c363.

This is a duplicate.

Reported-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: ioc3: Directly include linux/irqdomain.h
Marc Zyngier [Thu, 20 May 2021 16:37:15 +0000 (17:37 +0100)]
mfd: ioc3: Directly include linux/irqdomain.h

This driver include linux/irqdomain.h via a bizarre set of
indirection, which we are about to break.

Directly include the required file.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: axp20x: Allow AXP 806 chips without interrupt lines
Andre Przywara [Wed, 19 May 2021 10:41:37 +0000 (11:41 +0100)]
mfd: axp20x: Allow AXP 806 chips without interrupt lines

Currently the AXP chip requires to have its IRQ line connected to some
interrupt controller, and will fail probing when this is not the case.

On a new Allwinner SoC (H616) there is no NMI pin anymore, and at
least one board does not connect the AXP's IRQ pin to anything else,
so the interrupt functionality of the AXP chip is simply not available.

Check whether the interrupt line number returned by the platform code is
valid, before trying to register the irqchip. If not, we skip this
registration, to avoid the driver to bail out completely.
Also we need to skip the power key functionality, as this relies on
a valid IRQ as well.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Merge different sub-devices I2C read/write
Gene Chen [Mon, 17 May 2021 17:33:14 +0000 (01:33 +0800)]
mfd: mt6360: Merge different sub-devices I2C read/write

Merge different sub-devices I2C read/write functions into one Regmap,
because PMIC and LDO part need CRC bits for access protection.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Merge header file into driver and remove unuse register define
Gene Chen [Mon, 17 May 2021 17:33:13 +0000 (01:33 +0800)]
mfd: mt6360: Merge header file into driver and remove unuse register define

Merge header file into driver and remove unuse register define

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Fix flow which is used to check ic exist
Gene Chen [Mon, 17 May 2021 17:33:12 +0000 (01:33 +0800)]
mfd: mt6360: Fix flow which is used to check ic exist

Fix flow which is used to check ic exist.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Remove handle_post_irq callback function
Gene Chen [Mon, 17 May 2021 17:33:11 +0000 (01:33 +0800)]
mfd: mt6360: Remove handle_post_irq callback function

Remove handle_post_irq which is used to retrigger IRQ.
Set IRQ level low trigger in dtsi to keep IRQ always be handled.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Rename mt6360_pmu by mt6360
Gene Chen [Mon, 17 May 2021 17:33:10 +0000 (01:33 +0800)]
mfd: mt6360: Rename mt6360_pmu by mt6360

Rename mt6360_pmu by mt6360, because of including
not only PMU part, but also entire MT6360 IC

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Rename mt6360_pmu_data by mt6360_ddata
Gene Chen [Mon, 17 May 2021 17:33:09 +0000 (01:33 +0800)]
mfd: mt6360: Rename mt6360_pmu_data by mt6360_ddata

Rename mt6360_pmu_data by mt6360_ddata because of including
not only PMU part, but also entire MT6360 IC.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Combine mt6360 pmic/ldo resources into mt6360 regulator resources
Gene Chen [Mon, 17 May 2021 17:33:08 +0000 (01:33 +0800)]
mfd: mt6360: Combine mt6360 pmic/ldo resources into mt6360 regulator resources

Combine mt6360 pmic/ldo resources into mt6360 regulator resources
to simplify the similar resources object.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Indicate sub-dev compatible name by using "-"
Gene Chen [Mon, 17 May 2021 17:33:07 +0000 (01:33 +0800)]
mfd: mt6360: Indicate sub-dev compatible name by using "-"

Indicate sub-dev compatible name by using "-".

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Remove redundant brackets around raw numbers
Gene Chen [Mon, 17 May 2021 17:33:06 +0000 (01:33 +0800)]
mfd: mt6360: Remove redundant brackets around raw numbers

Remove redundant brackets around raw numbers.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6360: Rearrange include file
Gene Chen [Mon, 17 May 2021 17:33:05 +0000 (01:33 +0800)]
mfd: mt6360: Rearrange include file

Rearrange include file without sorting by alphabet.

Signed-off-by: Gene Chen <gene_chen@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: rt4831: Adds DT binding document for Richtek RT4831
ChiYuan Huang [Mon, 17 May 2021 14:36:00 +0000 (22:36 +0800)]
mfd: rt4831: Adds DT binding document for Richtek RT4831

Adds DT binding document for Richtek RT4831.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: rt4831: Adds support for Richtek RT4831
ChiYuan Huang [Mon, 17 May 2021 14:35:58 +0000 (22:35 +0800)]
mfd: rt4831: Adds support for Richtek RT4831

This adds support Richtek RT4831 core. It includes four channel WLED driver
and Display Bias Voltage outputs.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agobacklight: rt4831: Adds DT binding document for Richtek RT4831 backlight
ChiYuan Huang [Mon, 17 May 2021 14:35:59 +0000 (22:35 +0800)]
backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

Adds DT binding document for Richtek RT4831 backlight.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: rn5t618: Fix IRQ trigger by changing it to level mode
Andreas Kemnade [Sat, 15 May 2021 20:55:18 +0000 (22:55 +0200)]
mfd: rn5t618: Fix IRQ trigger by changing it to level mode

During more massive generation of interrupts, the IRQ got stuck,
and the subdevices did not see any new interrupts. That happens
especially at wonky USB supply in combination with ADC reads.
To fix that trigger the IRQ at level low instead of falling edge.

Fixes: 0c81604516af ("mfd: rn5t618: Add IRQ support")
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: max8907: Move to use request_irq by IRQF_NO_AUTOEN flag
Tian Tao [Thu, 13 May 2021 12:32:25 +0000 (20:32 +0800)]
mfd: max8907: Move to use request_irq by IRQF_NO_AUTOEN flag

This change is just to simplify the code, no actual functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: google,cros-ec: add DT bindings for a baseboard's switch device
Ikjoon Jang [Wed, 12 May 2021 10:08:31 +0000 (18:08 +0800)]
mfd: google,cros-ec: add DT bindings for a baseboard's switch device

This is for ChromeOS tablets which have a 'cros_cbas' switch device
in the "Whiskers" base board. This device can be instantiated only by
device tree on ARM platforms. ChromeOS EC doesn't provide a way to
probe the device.

Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: lp87565: Handle optional reset pin
Luca Ceresoli [Fri, 26 Feb 2021 14:28:52 +0000 (15:28 +0100)]
mfd: lp87565: Handle optional reset pin

Optionally handle the NRST pin (active low reset) in order to start from a
known state during boot and to shut down the chip when rebooting.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
Zou Wei [Wed, 12 May 2021 06:33:46 +0000 (14:33 +0800)]
mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE

This patch adds/modifies MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: syscon: Free the allocated name field of struct regmap_config
Limeng [Wed, 7 Apr 2021 05:25:25 +0000 (13:25 +0800)]
mfd: syscon: Free the allocated name field of struct regmap_config

The commit 529a1101212a("mfd: syscon: Don't free allocated name
for regmap_config") doesn't free the allocated name field of struct
regmap_config, but introduce a memory leak. There is another
commit 94cc89eb8fa5("regmap: debugfs: Fix handling of name string
for debugfs init delays") fixing this debugfs init issue from root
cause. With this fixing, the name field in struct regmap_debugfs_node
is removed. When initialize debugfs for syscon driver, the name
field of struct regmap_config is not used anymore. So, the allocated
name field of struct regmap_config is need to be freed directly after
regmap initialization to avoid memory leak.

Cc: stable@vger.kernel.org
Fixes: 529a1101212a("mfd: syscon: Don't free allocated name for regmap_config")
Signed-off-by: Meng Li <Meng.Li@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: Remove software node conditionally and locate at right place
Andy Shevchenko [Mon, 10 May 2021 14:15:52 +0000 (17:15 +0300)]
mfd: Remove software node conditionally and locate at right place

Currently the software node is removed in error case and at ->remove()
stage unconditionally, that ruins the symmetry. Besides, in some cases,
when mfd_add_device() fails, the device_remove_software_node() call
may lead to NULL pointer dereference:

  BUG: kernel NULL pointer dereference, address: 00000000
  ...
  EIP: strlen+0x12/0x20
  ...
  kernfs_name_hash+0x13/0x70
  kernfs_find_ns+0x32/0xc0
  kernfs_remove_by_name_ns+0x2a/0x90
  sysfs_remove_link+0x16/0x30
  software_node_notify.cold+0x34/0x6b
  device_remove_software_node+0x5a/0x90
  mfd_add_device.cold+0x30a/0x427

Fix all these by guarding device_remove_software_node() with a conditional
and locating it at the right place.

Fixes: 42e59982917a ("mfd: core: Add support for software nodes")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: wcd934x: Add additional interrupts required for MBHC support
Srinivas Kandagatla [Mon, 10 May 2021 09:12:39 +0000 (10:12 +0100)]
mfd: wcd934x: Add additional interrupts required for MBHC support

WCD934x supports Multi Button Headset control which enable headset detection
along with headset button detection.

This patch adds interrupts required for MBHC functionality.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: wcd934x: Add macro for adding new interrupts
Srinivas Kandagatla [Mon, 10 May 2021 09:12:38 +0000 (10:12 +0100)]
mfd: wcd934x: Add macro for adding new interrupts

Currently only two interrupts supported is added in wcd934x interrupt controller,
however if we are adding more interrupts the file will become too much unreadable.

So add a macro to make adding new interrupts easy and also convert existing
slim and soundwire interrupts to use it.
This is in preparation to enable Multi Button Headset Control support on this
codec.

WCD934x supports Multi Button Headset control which enable headset detection
along with headset button detection.

This patch adds interrupts required for MBHC functionality.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: si476x-cmd: Fix two typos of 'returned'
Jian Dong [Fri, 7 May 2021 09:21:35 +0000 (17:21 +0800)]
mfd: si476x-cmd: Fix two typos of 'returned'

Fix two typos retured --> returned

Signed-off-by: Jian Dong <dongjian@yulong.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6397: Add PMIC keys for MT6358
Mattijs Korpershoek [Thu, 6 May 2021 09:41:15 +0000 (11:41 +0200)]
mfd: mt6397: Add PMIC keys for MT6358

 Add compatible strings and interrupts for pmic keys
which serves as child device of MFD.

MT6358 has two interrupts per key: one for press, another one for
release (_R)

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6397: Use named IRQs instead of index (keys)
Mattijs Korpershoek [Thu, 6 May 2021 09:41:14 +0000 (11:41 +0200)]
mfd: mt6397: Use named IRQs instead of index (keys)

Some pmics of the mt6397 family (such as MT6358), have two IRQs per
physical key: one for press event, another for release event.

The mtk-pmic-keys driver assumes that each key only has one
IRQ. The key index and the RES_IRQ resource index have a 1/1 mapping.

This won't work for MT6358, as we have multiple resources (2) for one key.

To prepare mtk-pmic-keys to support MT6358, retrieve IRQs by name
instead of by index.

Note: The keys_resources are not part of the device-tree bindings so
this won't break any DT schemas.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6397: Add MT6358 register definitions for power key
Mattijs Korpershoek [Thu, 6 May 2021 09:41:13 +0000 (11:41 +0200)]
mfd: mt6397: Add MT6358 register definitions for power key

To support power/home key detection, add definitions for
two more MT6358 PMIC registers:

- TOPSTATUS: homekey and powerkey debounce status
- TOP_RST_MISC: controls homekey,powerkey long press reset time

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mp2629: Select MFD_CORE to fix build error
Randy Dunlap [Tue, 4 May 2021 02:32:18 +0000 (19:32 -0700)]
mfd: mp2629: Select MFD_CORE to fix build error

MFD_MP2629 should select MFD_CORE to a prevent build error:

ERROR: modpost: "devm_mfd_add_devices" [drivers/mfd/mp2629.ko] undefined!

Fixes: 06081646450e ("mfd: mp2629: Add support for mps battery charger")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: intel-lpss: Add Intel Alder Lake-M PCI IDs
Andy Shevchenko [Wed, 14 Apr 2021 14:29:43 +0000 (17:29 +0300)]
mfd: intel-lpss: Add Intel Alder Lake-M PCI IDs

Add Intel Alder Lake-M LPSS PCI IDs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agoMerge tags 'tb-mfd-asoc-v5.14-1', 'tb-mfd-gpio-regulator-v5.14' and 'tb-mfd-regulator...
Lee Jones [Wed, 2 Jun 2021 09:48:48 +0000 (10:48 +0100)]
Merge tags 'tb-mfd-asoc-v5.14-1', 'tb-mfd-gpio-regulator-v5.14' and 'tb-mfd-regulator-rtc-v5.14' into ibs-for-mfd-merged

Immutable branch between MFD and ASoC due for the v5.14 merge window

Immutable branch between MFD, GPIO and Regulator due for the v5.14 merge window

Immutable branch between MFD, Regulator and RTC due for the v5.14 merge window

3 years agoASoC: rk817: fix a warning in rk817_probe()
Chris Morgan [Tue, 1 Jun 2021 21:44:24 +0000 (16:44 -0500)]
ASoC: rk817: fix a warning in rk817_probe()

The return value of snd_soc_component_write() is stored but not
evaluated and this results in a warning when W=1 is set. Stop storing
the return value to be consistent with all other calls of
snd_soc_component_write() and to remove the warning.

Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support")

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agoregulator: mt6359: Add support for MT6359P regulator
Hsin-Hsiung Wang [Wed, 26 May 2021 06:52:06 +0000 (14:52 +0800)]
regulator: mt6359: Add support for MT6359P regulator

The MT6359P is a eco version for MT6359 regulator.
We add support based on MT6359 regulator driver.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agoregulator: mt6359: Add support for MT6359 regulator
Wen Su [Wed, 26 May 2021 06:52:05 +0000 (14:52 +0800)]
regulator: mt6359: Add support for MT6359 regulator

The MT6359 is a regulator found on boards based on MediaTek MT6779 and
probably other SoCs. It is a so called pmic and connects as a slave to
SoC using SPI, wrapped inside the pmic-wrapper.

Signed-off-by: Wen Su <wen.su@mediatek.com>
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: Add support for the MediaTek MT6359 PMIC
Hsin-Hsiung Wang [Wed, 26 May 2021 06:52:04 +0000 (14:52 +0800)]
mfd: Add support for the MediaTek MT6359 PMIC

This adds support for the MediaTek MT6359 PMIC. This is a
multifunction device with the following sub modules:

- Codec
- Interrupt
- Regulator
- RTC

It is interfaced to the host controller using SPI interface
by a proprietary hardware called PMIC wrapper or pwrap.
MT6359 MFD is a child device of the pwrap.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agodt-bindings: regulator: Add document for MT6359 regulator
Hsin-Hsiung Wang [Wed, 26 May 2021 06:52:03 +0000 (14:52 +0800)]
dt-bindings: regulator: Add document for MT6359 regulator

add dt-binding document for MediaTek MT6359 PMIC

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agodt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC
Hsin-Hsiung Wang [Wed, 26 May 2021 06:52:02 +0000 (14:52 +0800)]
dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC

This adds compatible for the MediaTek MT6359 PMIC.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agortc: mt6397: refine RTC_TC_MTH
Hsin-Hsiung Wang [Wed, 26 May 2021 06:52:01 +0000 (14:52 +0800)]
rtc: mt6397: refine RTC_TC_MTH

This patch adds RTC_TC_MTH_MASK to support new chips.

Signed-off-by: Yuchen Huang <yuchen.huang@mediatek.com>
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: mt6358: Refine interrupt code
Hsin-Hsiung Wang [Wed, 26 May 2021 06:52:00 +0000 (14:52 +0800)]
mfd: mt6358: Refine interrupt code

This patch refines the interrupt related code to support new chips.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agodt-bindings: Add Rockchip rk817 audio CODEC support
Chris Morgan [Wed, 19 May 2021 20:37:53 +0000 (15:37 -0500)]
dt-bindings: Add Rockchip rk817 audio CODEC support

Create dt-binding documentation to document rk817 codec.
New property name of rockchip,mic-in-differential added to control if
the microphone is in differential mode or not.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agoASoC: Add Rockchip rk817 audio CODEC support
Chris Morgan [Wed, 19 May 2021 20:37:52 +0000 (15:37 -0500)]
ASoC: Add Rockchip rk817 audio CODEC support

Add support for the Rockchip rk817 audio codec integrated into the
rk817 PMIC. This is based on the sources provided by Rockchip from
their BSP kernel.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: Add Rockchip rk817 audio CODEC support
Chris Morgan [Wed, 19 May 2021 20:37:51 +0000 (15:37 -0500)]
mfd: Add Rockchip rk817 audio CODEC support

Add rk817 codec support cell to rk808 mfd driver.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: lp87565: Move LP87565_regulator_id to .c file
Luca Ceresoli [Fri, 19 Feb 2021 22:39:10 +0000 (23:39 +0100)]
mfd: lp87565: Move LP87565_regulator_id to .c file

This enum is used only internally to the regulator driver for buck indexes.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agomfd: lp87565: Fix typo in define names
Luca Ceresoli [Fri, 19 Feb 2021 22:39:08 +0000 (23:39 +0100)]
mfd: lp87565: Fix typo in define names

"GOIO" should be "GPIO" here.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3 years agoLinux 5.13-rc1
Linus Torvalds [Sun, 9 May 2021 21:17:44 +0000 (14:17 -0700)]
Linux 5.13-rc1

3 years agofbmem: fix horribly incorrect placement of __maybe_unused
Linus Torvalds [Sun, 9 May 2021 21:03:33 +0000 (14:03 -0700)]
fbmem: fix horribly incorrect placement of __maybe_unused

Commit b9d79e4ca4ff ("fbmem: Mark proc_fb_seq_ops as __maybe_unused")
places the '__maybe_unused' in an entirely incorrect location between
the "struct" keyword and the structure name.

It's a wonder that gcc accepts that silently, but clang quite reasonably
warns about it:

    drivers/video/fbdev/core/fbmem.c:736:21: warning: attribute declaration must precede definition [-Wignored-attributes]
    static const struct __maybe_unused seq_operations proc_fb_seq_ops = {
                        ^

Fix it.

Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 years agoMerge tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm
Linus Torvalds [Sun, 9 May 2021 20:42:39 +0000 (13:42 -0700)]
Merge tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Bit later than usual, I queued them all up on Friday then promptly
  forgot to write the pull request email. This is mainly amdgpu fixes,
  with some radeon/msm/fbdev and one i915 gvt fix thrown in.

  amdgpu:
   - MPO hang workaround
   - Fix for concurrent VM flushes on vega/navi
   - dcefclk is not adjustable on navi1x and newer
   - MST HPD debugfs fix
   - Suspend/resumes fixes
   - Register VGA clients late in case driver fails to load
   - Fix GEM leak in user framebuffer create
   - Add support for polaris12 with 32 bit memory interface
   - Fix duplicate cursor issue when using overlay
   - Fix corruption with tiled surfaces on VCN3
   - Add BO size and stride check to fix BO size verification

  radeon:
   - Fix off-by-one in power state parsing
   - Fix possible memory leak in power state parsing

  msm:
   - NULL ptr dereference fix

  fbdev:
   - procfs disabled warning fix

  i915:
   - gvt: Fix a possible division by zero in vgpu display rate
     calculation"

* tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm:
  drm/amdgpu: Use device specific BO size & stride check.
  drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode.
  drm/amd/pm: initialize variable
  drm/radeon: Avoid power table parsing memory leaks
  drm/radeon: Fix off-by-one power_state index heap overwrite
  drm/amd/display: Fix two cursor duplication when using overlay
  drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC
  fbmem: Mark proc_fb_seq_ops as __maybe_unused
  drm/msm/dpu: Delete bonkers code
  drm/i915/gvt: Prevent divided by zero when calculating refresh rate
  amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create
  drm/amdgpu: Register VGA clients after init can no longer fail
  drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown
  drm/amdgpu: fix r initial values
  drm/amd/display: fix wrong statement in mst hpd debugfs
  amdgpu/pm: set pp_dpm_dcefclk to readonly on NAVI10 and newer gpus
  amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID
  drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2
  drm/amd/display: Reject non-zero src_y and src_x for video planes

3 years agoMerge tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 9 May 2021 20:25:14 +0000 (13:25 -0700)]
Merge tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block

Pull block fix from Jens Axboe:
 "Turns out the bio max size change still has issues, so let's get it
  reverted for 5.13-rc1. We'll shake out the issues there and defer it
  to 5.14 instead"

* tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block:
  Revert "bio: limit bio max size"

3 years agoMerge tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sun, 9 May 2021 20:19:29 +0000 (13:19 -0700)]
Merge tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "Three small SMB3 chmultichannel related changesets (also for stable)
  from the SMB3 test event this week.

  The other fixes are still in review/testing"

* tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6:
  smb3: if max_channels set to more than one channel request multichannel
  smb3: do not attempt multichannel to server which does not support it
  smb3: when mounting with multichannel include it in requested capabilities

3 years agoMerge tag 'sched-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 9 May 2021 20:14:34 +0000 (13:14 -0700)]
Merge tag 'sched-urgent-2021-05-09' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Thomas Gleixner:
 "A set of scheduler updates:

   - Prevent PSI state corruption when schedule() races with cgroup
     move.

     A recent commit combined two PSI callbacks to reduce the number of
     cgroup tree updates, but missed that schedule() can drop rq::lock
     for load balancing, which opens the race window for
     cgroup_move_task() which then observes half updated state.

     The fix is to solely use task::ps_flags instead of looking at the
     potentially mismatching scheduler state

   - Prevent an out-of-bounds access in uclamp caused bu a rounding
     division which can lead to an off-by-one error exceeding the
     buckets array size.

   - Prevent unfairness caused by missing load decay when a task is
     attached to a cfs runqueue.

     The old load of the task was attached to the runqueue and never
     removed. Fix it by enforcing the load update through the hierarchy
     for unthrottled run queue instances.

   - A documentation fix fot the 'sched_verbose' command line option"

* tag 'sched-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/fair: Fix unfairness caused by missing load decay
  sched: Fix out-of-bound access in uclamp
  psi: Fix psi state corruption when schedule() races with cgroup move
  sched,doc: sched_debug_verbose cmdline should be sched_verbose

3 years agoMerge tag 'locking-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 9 May 2021 20:07:03 +0000 (13:07 -0700)]
Merge tag 'locking-urgent-2021-05-09' of git://git./linux/kernel/git/tip/tip

Pull locking fixes from Thomas Gleixner:
 "A set of locking related fixes and updates:

   - Two fixes for the futex syscall related to the timeout handling.

     FUTEX_LOCK_PI does not support the FUTEX_CLOCK_REALTIME bit and
     because it's not set the time namespace adjustment for clock
     MONOTONIC is applied wrongly.

     FUTEX_WAIT cannot support the FUTEX_CLOCK_REALTIME bit because its
     always a relative timeout.

   - Cleanups in the futex syscall entry points which became obvious
     when the two timeout handling bugs were fixed.

   - Cleanup of queued_write_lock_slowpath() as suggested by Linus

   - Fixup of the smp_call_function_single_async() prototype"

* tag 'locking-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Make syscall entry points less convoluted
  futex: Get rid of the val2 conditional dance
  futex: Do not apply time namespace adjustment on FUTEX_LOCK_PI
  Revert 337f13046ff0 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op")
  locking/qrwlock: Cleanup queued_write_lock_slowpath()
  smp: Fix smp_call_function_single_async prototype