linux-block.git
12 months agomfd: tmio: Sanitize comments
Wolfram Sang [Tue, 13 Feb 2024 22:02:24 +0000 (23:02 +0100)]
mfd: tmio: Sanitize comments

Reformat the comments to utilize the maximum line length and use single
line comments where appropriate. Remove superfluous comments, too.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240213220221.2380-13-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: tmio: Update include files
Wolfram Sang [Tue, 13 Feb 2024 22:02:23 +0000 (23:02 +0100)]
mfd: tmio: Update include files

Remove meanwhile unneeded includes, only add types.h for dma_addr_t.
Also, remove an obsolete forward declaration while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240213220221.2380-12-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agommc: tmio/sdhi: Fix includes
Wolfram Sang [Tue, 13 Feb 2024 22:02:22 +0000 (23:02 +0100)]
mmc: tmio/sdhi: Fix includes

TMIO uses an of_* function, and SDHI uses pm_runtime functions. Add the
includes directly, so we can clean up another header properly. Sort the
pagemap include while we are here.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402070323.JpYfFtkQ-lkp@intel.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240213220221.2380-11-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: tmio: Remove obsolete io accessors
Wolfram Sang [Tue, 13 Feb 2024 22:02:21 +0000 (23:02 +0100)]
mfd: tmio: Remove obsolete io accessors

Since commit 568494db6809 ("mtd: remove tmio_nand driver") and commit
aceae7848624 ("fbdev: remove tmiofb driver"), these accessors have no
users anymore. Remove them.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240213220221.2380-10-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: tmio: Remove obsolete platform_data
Wolfram Sang [Tue, 13 Feb 2024 22:02:20 +0000 (23:02 +0100)]
mfd: tmio: Remove obsolete platform_data

With commit 8971bb812e3c ("mfd: remove toshiba tmio drivers"), all users
of platform data for NAND and framebuffers are gone. So, remove
definitions from the header, too.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240213220221.2380-9-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agowatchdog: bd96801_wdt: Add missing include for FIELD_*()
Matti Vaittinen [Mon, 1 Jul 2024 07:56:49 +0000 (10:56 +0300)]
watchdog: bd96801_wdt: Add missing include for FIELD_*()

The FIELD_PREP() and FIELD_GET() macros are defined in the
linux/bitfield.h. Include this header to avoid missing the macro
definitions.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406300817.hcJ9VtLf-lkp@intel.com/
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/ZoJhQVF-U6sSJ_Sg@fedora
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: syscon: Add APM poweroff mailbox
Krzysztof Kozlowski [Thu, 27 Jun 2024 10:32:23 +0000 (12:32 +0200)]
dt-bindings: mfd: syscon: Add APM poweroff mailbox

Add compatible for an already used syscon poweroff/mailbox block in APM.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240627-dt-bindings-mfd-syscon-split-v4-7-dc6699a9f3e4@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: syscon: Split and enforce documenting MFD children
Krzysztof Kozlowski [Thu, 27 Jun 2024 10:32:22 +0000 (12:32 +0200)]
dt-bindings: mfd: syscon: Split and enforce documenting MFD children

Simple syscon nodes can be documented in common syscon.yaml, however
devices with simple-mfd compatible, thus with some children, should have
their own schema listing these children.  Such listing makes the binding
specific, allows better validation (so the incorrect child would not
appear in the simple-mfd node) and actually enforces repeated rule for
simple-mfd devices:

  "simple-mfd" is only for simple devices, where the children do not
  depend on the parent.

Currently the syscon+simple-mfd binding is quite broad and allows
any child or property, thus above rule cannot be enforced.

Split the syscon.yaml binding into:
1. Common syscon properties, used potentially by many bindings.
2. Simple syscon devices (NO simple-mfd!).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240627-dt-bindings-mfd-syscon-split-v4-6-dc6699a9f3e4@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: rk817: Merge support for RK809
Cristian Ciocaltea [Fri, 21 Jun 2024 21:57:19 +0000 (00:57 +0300)]
dt-bindings: mfd: rk817: Merge support for RK809

The Rockchip RK809 PMIC is compatible with RK817 and provides the same
capabilities, except for the battery charger manager.

There are also minor regulator related differences: BOOST and OTG_SWITCH
are specific to RK817, while DCDC_REG5, SWITCH_REG1 and SWITCH_REG2 are
provided RK809.

The current binding for RK809 doesn't document the audio codec
properties, although it has been already in use by several boards:
rk3566-quartz64-b, k3566-roc-pc, rk3568-evb1-v10, rk3568-lubancat-2,
rk3568-odroid-m1, rk3568-rock-3a.

Therefore dtbs_check fails for all of them:

  DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb
  rk3568-rock-3a.dtb: pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks', 'clock-names', 'clocks', 'codec' do not match any of the regexes: 'pinctrl-[0-9]+'
    from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml#

Additionally, the example in rockchip,rk809 binding is not able to
actually test the schema since it uses a wrong compatible
'rockchip,rk808' instead of the expected 'rockchip,rk809'.

Instead of duplicating even more content, merge the RK809 support into
the more inclusive RK817 schema and drop the now obsolete rockchip,rk809
related file.

Fixes: 6c38ca03406e ("dt-bindings: mfd: rk808: Convert bindings to yaml")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-2-c0db420d3639@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: rk817: Fixup clocks and reference dai-common
Cristian Ciocaltea [Fri, 21 Jun 2024 21:57:18 +0000 (00:57 +0300)]
dt-bindings: mfd: rk817: Fixup clocks and reference dai-common

Ensure 'clocks' property does not allow more than one item and add the
missing reference to dai-common schema.

While at it, move 'clocks*' and '#sound-dai-cells' properties to keep
the list ordered alphabetically.

Additionally, drop all useless/redundant descriptions.

Fixes: 6c38ca03406e ("dt-bindings: mfd: rk808: Convert bindings to yaml")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240622-rk809-fixes-v2-1-c0db420d3639@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: syscon: Add TI's opp table compatible
Bryan Brattlof [Fri, 21 Jun 2024 16:39:39 +0000 (11:39 -0500)]
dt-bindings: mfd: syscon: Add TI's opp table compatible

The JTAG_USER_ID_USERCODE efuse address, which is located inside the
WKUP_CTRL_MMR0 range holds information to identify the speed grades of
various components on TI's K3 SoCs. Add a compatible to allow the
cpufreq driver to obtain the data to limit the maximum frequency for the
CPUs under Linux control.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240621-ti-opp-updates-v3-3-d857be6dac8b@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: omap-usb-tll: Use struct_size to allocate tll
Javier Carrasco [Wed, 26 Jun 2024 19:37:03 +0000 (21:37 +0200)]
mfd: omap-usb-tll: Use struct_size to allocate tll

Commit 16c2004d9e4d ("mfd: omap-usb-tll: Allocate driver data at once")
changed the memory allocation of 'tll' to consolidate it into a single
allocation, introducing an incorrect size calculation.

In particular, the allocation for the array of pointers was converted
into a single-pointer allocation.

The memory allocation used to occur in two steps:

tll = devm_kzalloc(dev, sizeof(struct usbtll_omap), GFP_KERNEL);
tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch,
                           GFP_KERNEL);

And it turned that into the following allocation:

tll = devm_kzalloc(dev, sizeof(*tll) + sizeof(tll->ch_clk[nch]),
                   GFP_KERNEL);

sizeof(tll->ch_clk[nch]) returns the size of a single pointer instead of
the expected nch pointers.

This bug went unnoticed because the allocation size was small enough to
fit within the minimum size of a memory allocation for this particular
case [1].

The complete allocation can still be done at once with the struct_size
macro, which comes in handy for structures with a trailing flexible
array.

Fix the memory allocation to obtain the original size again.

Link: https://lore.kernel.org/all/202406261121.2FFD65647@keescook/
Fixes: 16c2004d9e4d ("mfd: omap-usb-tll: Allocate driver data at once")
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Fixes: commit 16c2004d9e4d ("mfd: omap-usb-tll: Allocate driver data at once")
Link: https://lore.kernel.org/r/20240626-omap-usb-tll-counted_by-v2-1-4bedf20d1b51@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: Explain lack of child dependency in simple-mfd
Krzysztof Kozlowski [Sun, 23 Jun 2024 13:46:00 +0000 (15:46 +0200)]
dt-bindings: mfd: Explain lack of child dependency in simple-mfd

Common mistake of usage of 'simple-mfd' compatible is a dependency of
children on resources acquired and managed by the parent, e.g. clocks.
Extend the simple-mfd documentation to cover this case.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240623134600.115098-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: Dual licensing for st,stpmic1 bindings
Etienne Carriere [Mon, 17 Jun 2024 09:20:16 +0000 (11:20 +0200)]
dt-bindings: mfd: Dual licensing for st,stpmic1 bindings

Change include/dt-bindings/mfd/st,stpmic1.h license model from GPLv2.0
only to dual GPLv2.0 or BSD-2-Clause. I have every legitimacy to request
this change on behalf of STMicroelectronics. This change clarifies that
this DT binding header file can be shared with software components as
bootloaders and OSes that are not published under GPLv2 terms.

In CC are all the contributors to this header file.

Cc: Pascal Paillet <p.paillet@st.com>
Cc: Lee Jones <lee@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240617092016.2958046-1-etienne.carriere@foss.st.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by
Javier Carrasco [Thu, 20 Jun 2024 21:22:33 +0000 (23:22 +0200)]
mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by

Use the __counted_by compiler attribute for the "struct clk *ch_clk[]"
flexible array member to improve the results of array bound sanitizers.

The comments for the variables are no longer needed as it is now clear
what is what.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240620-omap-usb-tll-counted_by-v1-1-77797834bb9a@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode()
Yang Li [Tue, 18 Jun 2024 01:18:54 +0000 (09:18 +0800)]
mfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode()

Abaci Robot reports:

  drivers/mfd/tps6594-core.c:516:2-3: Unneeded semicolon

Let's remove it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9346
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240618011854.109426-1-yang.lee@linux.alibaba.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: lm3533: Move to new GPIO descriptor-based APIs
Andy Shevchenko [Wed, 5 Jun 2024 19:14:16 +0000 (22:14 +0300)]
mfd: lm3533: Move to new GPIO descriptor-based APIs

Legacy GPIO APIs are subject to remove. Convert the driver to new APIs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240605191458.2536819-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: tps65912: Use devm helper functions to simplify probe
Andrew Davis [Thu, 13 Jun 2024 17:54:30 +0000 (12:54 -0500)]
mfd: tps65912: Use devm helper functions to simplify probe

This simplifies probe and also allows us to remove the remove
callbacks from the core and interface drivers. Do that here.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240613175430.57698-1-afd@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: madera: Simplify with spi_get_device_match_data()
Krzysztof Kozlowski [Thu, 6 Jun 2024 14:24:57 +0000 (16:24 +0200)]
mfd: madera: Simplify with spi_get_device_match_data()

Use spi_get_device_match_data() helper to simplify a bit the driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240606142457.130553-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: arizona: Simplify with spi_get_device_match_data()
Krzysztof Kozlowski [Thu, 6 Jun 2024 14:24:56 +0000 (16:24 +0200)]
mfd: arizona: Simplify with spi_get_device_match_data()

Use spi_get_device_match_data() helper to simplify a bit the driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240606142457.130553-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning (again)
Krzysztof Kozlowski [Thu, 6 Jun 2024 14:36:48 +0000 (16:36 +0200)]
mfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning (again)

'type' is an enum, thus cast of pointer on 64-bit compile test with
clang and W=1 causes:

  wm8994-core.c:625:17: error: cast to smaller integer type 'enum wm8994_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Year ago this was solved, although LKML discussion suggested warning is
not suitable for kernel.  Nothing changed in this regard for a year, so
assume the warning will stay and we want to have warnings-free builds.

Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240606143648.152668-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again)
Krzysztof Kozlowski [Thu, 6 Jun 2024 14:36:47 +0000 (16:36 +0200)]
mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again)

'type' is an enum, thus cast of pointer on 64-bit compile test with
clang and W=1 causes:

  mxs-lradc.c:140:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Year ago this was solved, although LKML discussion suggested warning is
not suitable for kernel.  Nothing changed in this regard for a year, so
assume the warning will stay and we want to have warnings-free builds.

Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240606143648.152668-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again)
Krzysztof Kozlowski [Thu, 6 Jun 2024 14:36:46 +0000 (16:36 +0200)]
mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again)

'type' is an enum, thus cast of pointer on 64-bit compile test with
clang and W=1 causes:

  max14577.c:400:23: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Year ago this was solved, although LKML discussion suggested warning is
not suitable for kernel.  Nothing changed in this regard for a year, so
assume the warning will stay and we want to have warnings-free builds.

Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240606143648.152668-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: Add missing MODULE_DESCRIPTION() macros
Jeff Johnson [Mon, 10 Jun 2024 02:21:28 +0000 (19:21 -0700)]
mfd: Add missing MODULE_DESCRIPTION() macros

On x86, make allmodconfig && make W=1 C=1 reports:

 WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/arizona.o
 WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/pcf50633-gpio.o
 WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/timberdale.o
 WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/ssbi.o
 WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/rt4831.o
 WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/intel_soc_pmic_bxtwc.o

Add the missing invocation of the MODULE_DESCRIPTION() macro to all
files which have a MODULE_LICENSE().

This includes mfd-core.c and vexpress-sysreg.c which, although they
did not produce a warning with the x86 allmodconfig configuration, may
cause this warning with other configurations.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Acked-by: Andy Shevchenko <andy@kernel.org> # for Intel Broxton PMIC
Link: https://lore.kernel.org/r/20240609-md-drivers-mfd-v1-1-47cdd0b394e9@quicinc.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: qcom-pm8008: Add missing MODULE_DESCRIPTION() macro
Jeff Johnson [Tue, 4 Jun 2024 00:05:44 +0000 (17:05 -0700)]
mfd: qcom-pm8008: Add missing MODULE_DESCRIPTION() macro

make allmodconfig && make W=1 C=1 reports:

  WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mfd/qcom-pm8008.o

Add the missing invocation of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240603-md-drivers-mfd-qcom-v1-1-88e48013eccc@quicinc.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: syscon: Add more simple compatibles
Rob Herring (Arm) [Mon, 3 Jun 2024 13:12:27 +0000 (08:12 -0500)]
dt-bindings: mfd: syscon: Add more simple compatibles

Add another batch of various "simple" syscon compatibles which were
undocumented or still documented with old text bindings. Remove the old
text binding docs for the ones which were documented.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> # mtd
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240603131230.136196-2-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: intel-lpss: Rename SPI intel_lpss_platform_info structs
Ilpo Järvinen [Fri, 31 May 2024 14:25:05 +0000 (17:25 +0300)]
mfd: intel-lpss: Rename SPI intel_lpss_platform_info structs

The driver has intel_lpss_platform_info structs for I2C, SPI, and UART.
The I2C and UART structs are named with "i2c" and "uart" in the variable
name, whereas SPI ones do not mention "spi".

Rename the SPI related info structs to include "spi" in their names for
consistency and to make it obvious in the device ID list what kind of
device the line relates to.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240531142505.1888-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: core: Make use of device_set_node()
Andy Shevchenko [Thu, 30 May 2024 11:51:47 +0000 (14:51 +0300)]
mfd: core: Make use of device_set_node()

Use device_set_node() instead of assigning pdev->dev.of_node
directly because it also sets the firmware node.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20240530115147.1112498-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: mt6397-core: Add support for AUXADCs on MT6357/58/59 PMICs
AngeloGioacchino Del Regno [Thu, 30 May 2024 09:34:09 +0000 (11:34 +0200)]
mfd: mt6397-core: Add support for AUXADCs on MT6357/58/59 PMICs

Add the relevant AUXADC driver entries to the MFD cells of the
MT6357, MT6358, MT6359 PMICs to support their Auxiliary ADCs.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240530093410.112716-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: qcom,spmi-pmic: Document PMC8380
Konrad Dybcio [Wed, 29 May 2024 11:17:17 +0000 (13:17 +0200)]
dt-bindings: mfd: qcom,spmi-pmic: Document PMC8380

These are just some more PMICs adjacent to X1 SoCs. Document them.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240529-topic-x1e_pmic-v1-1-9de0506179eb@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: rsmu: Split core code into separate module
Arnd Bergmann [Wed, 29 May 2024 09:48:47 +0000 (11:48 +0200)]
mfd: rsmu: Split core code into separate module

Linking a file into two modules can have unintended side-effects
and produces a W=1 warning:

scripts/Makefile.build:236: drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi

Make this one a separate module instead.

Fixes: a1867f85e06e ("mfd: Add Renesas Synchronization Management Unit (SMU) support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240529094856.1869543-1-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: cros_ec: Register hardware monitoring subdevice
Thomas Weißschuh [Wed, 29 May 2024 06:27:13 +0000 (08:27 +0200)]
mfd: cros_ec: Register hardware monitoring subdevice

Add ChromeOS EC-based hardware monitoring as EC subdevice.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-3-5cdf0c5db50a@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: cros_ec: Register charge control subdevice
Thomas Weißschuh [Tue, 28 May 2024 20:04:12 +0000 (22:04 +0200)]
mfd: cros_ec: Register charge control subdevice

Add ChromeOS EC-based charge control as EC subdevice.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240528-cros_ec-charge-control-v2-3-81fb27e1cff4@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: qcom-spmi-pmic: Document SMB2360 PMIC
Abel Vesa [Mon, 27 May 2024 07:02:03 +0000 (10:02 +0300)]
dt-bindings: mfd: qcom-spmi-pmic: Document SMB2360 PMIC

Add bindings for SMB2360 PMIC. This PMIC is found in boards like
X1 Elite CRD and QCP.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240527-smb2360-bindings-mfd-qcom-spmi-pmic-v1-1-31a2c051529c@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: intel_soc_pmic_crc: Use PWM_LOOKUP_WITH_MODULE() for the PWM lookup
Hans de Goede [Mon, 27 May 2024 11:49:50 +0000 (13:49 +0200)]
mfd: intel_soc_pmic_crc: Use PWM_LOOKUP_WITH_MODULE() for the PWM lookup

The primary use of the CRC PMIC's PWM is for LCD panel backlight
control by the i915 driver.

Due to its complexity the probe() function of the i915 driver does not
support -EPROBE_DEFER handling. So far the pwm-crc driver must be built
into the kernel to ensure that the pwm_get() done by the i915 driver
succeeds at once (rather then returning -EPROBE_DEFER).

But the PWM core can load the module from pwm_get() if a module-name is
provided in the pwm_lookup associated with the consumer device.

Switch to using PWM_LOOKUP_WITH_MODULE() for the lookup added for
the Intel integrated GPU, so that the PWM core can load the module from
pwm_get() as needed allowing the pwm-crc driver to be safely built as
module.

This has been successfully tested on an Asus T100TAM with pwm-crc
build as a module.

Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11081
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240527114950.326659-1-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: mediatek,mt8195-scpsys: Add mediatek,mt8365-scpsys
Krzysztof Kozlowski [Sat, 18 May 2024 21:11:56 +0000 (23:11 +0200)]
dt-bindings: mfd: mediatek,mt8195-scpsys: Add mediatek,mt8365-scpsys

Add a new mediatek,mt8365-scpsys compatible, for the SCPSYS syscon block
having power controller.  Previously the DTS was re-using SYSCFG
compatible, but that does not seem right, because SYSCFG does not have
children.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240518211159.142920-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: mediatek,mt8195-scpsys: Add support for MT8188
AngeloGioacchino Del Regno [Mon, 27 May 2024 09:39:04 +0000 (11:39 +0200)]
dt-bindings: mfd: mediatek,mt8195-scpsys: Add support for MT8188

Add a compatible string for the scpsys block found in the MediaTek
MT8188 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240527093908.97574-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: syscon: Add ti,am625-dss-oldi-io-ctrl compatible
Aradhya Bhatia [Sun, 12 May 2024 14:38:24 +0000 (20:08 +0530)]
dt-bindings: mfd: syscon: Add ti,am625-dss-oldi-io-ctrl compatible

Add TI DSS OLDI-IO control registers compatible for AM625 DSS. This is a
region of 10 32bit registers found in the TI AM625 CTRL_MMR0 register
space[0]. They are used to control the characteristics of the OLDI
DATA/CLK IO as needed by the OLDI TXes controller node.

[0]: https://www.ti.com/lit/pdf/spruiv7

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240512143824.1862290-1-a-bhatia1@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Uwe Kleine-König [Fri, 10 May 2024 21:10:11 +0000 (23:10 +0200)]
mfd: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240510211011.2273978-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: menelaus: Remove unused linux/gpio.h
Andy Shevchenko [Wed, 8 May 2024 11:40:33 +0000 (14:40 +0300)]
mfd: menelaus: Remove unused linux/gpio.h

linux/gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240508114033.952578-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: omap-usb-host: Remove unused linux/gpio.h
Andy Shevchenko [Wed, 8 May 2024 11:43:21 +0000 (14:43 +0300)]
mfd: omap-usb-host: Remove unused linux/gpio.h

linux/gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240508114321.964374-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: idt8a340_reg: Start comments with '/*'
Simon Horman [Tue, 7 May 2024 16:53:56 +0000 (17:53 +0100)]
mfd: idt8a340_reg: Start comments with '/*'

Several comments in idt8a340_reg.h start with '/**', which denotes the
start of a Kernel doc, but are otherwise not Kernel docs.

Resolve this conflict by starting these comments with '/*' instead.

Flagged by ./scripts/kernel-doc -none

Signed-off-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240507-clockmatrix-kernel-doc-v2-1-3138d74192dd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoMerge branch 'ib-mfd-soc-samsung-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:07:34 +0000 (17:07 +0100)]
Merge branch 'ib-mfd-soc-samsung-6.11' into ibs-for-mfd-merged

12 months agoMerge branch 'ib-mfd-regulator-watchdog-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:07:26 +0000 (17:07 +0100)]
Merge branch 'ib-mfd-regulator-watchdog-6.11' into ibs-for-mfd-merged

12 months agoMerge branch 'ib-mfd-regulator-pm8008-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:07:21 +0000 (17:07 +0100)]
Merge branch 'ib-mfd-regulator-pm8008-6.11' into ibs-for-mfd-merged

12 months agoMerge branch 'ib-mfd-leds-platform-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:07:01 +0000 (17:07 +0100)]
Merge branch 'ib-mfd-leds-platform-6.11' into ibs-for-mfd-merged

12 months agoMerge branch 'ib-mfd-input-regulator-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:06:42 +0000 (17:06 +0100)]
Merge branch 'ib-mfd-input-regulator-6.11' into ibs-for-mfd-merged

12 months agoMerge branch 'ib-mfd-firmware-input-sound-soc-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:06:36 +0000 (17:06 +0100)]
Merge branch 'ib-mfd-firmware-input-sound-soc-6.11' into ibs-for-mfd-merged

12 months agoMerge branch 'ib-mfd-dt-soc-6.11' into ibs-for-mfd-merged
Lee Jones [Thu, 4 Jul 2024 16:06:22 +0000 (17:06 +0100)]
Merge branch 'ib-mfd-dt-soc-6.11' into ibs-for-mfd-merged

12 months agoMAINTAINERS: Add myself for Marvell 88PM886 PMIC
Karel Balej [Fri, 31 May 2024 17:35:00 +0000 (19:35 +0200)]
MAINTAINERS: Add myself for Marvell 88PM886 PMIC

Add an entry to MAINTAINERS for the Marvell 88PM886 PMIC MFD, onkey and
regulator drivers.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20240531175109.15599-6-balejk@matfyz.cz
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoinput: Add onkey driver for Marvell 88PM886 PMIC
Karel Balej [Fri, 31 May 2024 17:34:59 +0000 (19:34 +0200)]
input: Add onkey driver for Marvell 88PM886 PMIC

Marvell 88PM886 PMIC provides onkey among other things. Add client
driver to handle it. The driver currently only provides a basic support
omitting additional functions found in the vendor version, such as long
onkey and GPIO integration.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20240531175109.15599-5-balejk@matfyz.cz
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoregulator: Add regulators driver for Marvell 88PM886 PMIC
Karel Balej [Fri, 31 May 2024 17:34:58 +0000 (19:34 +0200)]
regulator: Add regulators driver for Marvell 88PM886 PMIC

Support the LDO and buck regulators of the Marvell 88PM886 PMIC.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240531175109.15599-4-balejk@matfyz.cz
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: Add driver for Marvell 88PM886 PMIC
Karel Balej [Fri, 31 May 2024 17:34:57 +0000 (19:34 +0200)]
mfd: Add driver for Marvell 88PM886 PMIC

Marvell 88PM886 is a PMIC which provides various functions such as
onkey, battery, charger and regulators. It is found for instance in the
samsung,coreprimevelte smartphone with which this was tested. Implement
basic support to allow for the use of regulators and onkey.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20240531175109.15599-3-balejk@matfyz.cz
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: Add entry for Marvell 88PM886 PMIC
Karel Balej [Fri, 31 May 2024 17:34:56 +0000 (19:34 +0200)]
dt-bindings: mfd: Add entry for Marvell 88PM886 PMIC

Marvell 88PM886 is a PMIC with several subdevices such as onkey,
regulators or battery and charger. It comes in at least two revisions,
A0 and A1 -- only A1 is described here at the moment.

Signed-off-by: Karel Balej <balejk@matfyz.cz>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240531175109.15599-2-balejk@matfyz.cz
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoASoC: cs40l50: Support I2S streaming to CS40L50
James Ogletree [Thu, 20 Jun 2024 16:17:45 +0000 (16:17 +0000)]
ASoC: cs40l50: Support I2S streaming to CS40L50

Introduce support for Cirrus Logic Device CS40L50: a
haptic driver with waveform memory, integrated DSP,
and closed-loop algorithms.

The ASoC driver enables I2S streaming to the device.

Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240620161745.2312359-6-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoInput: cs40l50 - Add support for the CS40L50 haptic driver
James Ogletree [Thu, 20 Jun 2024 16:17:44 +0000 (16:17 +0000)]
Input: cs40l50 - Add support for the CS40L50 haptic driver

Introduce support for Cirrus Logic Device CS40L50: a
haptic driver with waveform memory, integrated DSP,
and closed-loop algorithms.

The input driver provides the interface for control of
haptic effects through the device.

Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20240620161745.2312359-5-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: cs40l50: Add support for CS40L50 core driver
James Ogletree [Thu, 20 Jun 2024 16:17:43 +0000 (16:17 +0000)]
mfd: cs40l50: Add support for CS40L50 core driver

Introduce support for Cirrus Logic Device CS40L50: a
haptic driver with waveform memory, integrated DSP,
and closed-loop algorithms.

The MFD component registers and initializes the device.

Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20240620161745.2312359-4-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: input: cirrus,cs40l50: Add initial DT binding
James Ogletree [Thu, 20 Jun 2024 16:17:42 +0000 (16:17 +0000)]
dt-bindings: input: cirrus,cs40l50: Add initial DT binding

CS40L50 is a haptic driver with waveform memory,
integrated DSP, and closed-loop algorithms.

Add a YAML DT binding document for this device.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20240620161745.2312359-3-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agofirmware: cs_dsp: Add write sequence interface
James Ogletree [Thu, 20 Jun 2024 16:17:41 +0000 (16:17 +0000)]
firmware: cs_dsp: Add write sequence interface

A write sequence is a sequence of register addresses
and values executed by some Cirrus DSPs following
certain power state transitions.

Add support for Cirrus drivers to update or add to a
write sequence present in firmware.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20240620161745.2312359-2-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoMAINTAINERS: Add ROHM BD96801 'scalable PMIC' entries
Matti Vaittinen [Thu, 27 Jun 2024 07:44:16 +0000 (10:44 +0300)]
MAINTAINERS: Add ROHM BD96801 'scalable PMIC' entries

Add maintainer entries for ROHM BD96801 a.k.a 'scalable PMIC'
drivers to be reviewed by ROHM people.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/5ff9616567983611ea0b07a91403ea848451a339.1719473802.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agowatchdog: ROHM BD96801 PMIC WDG driver
Matti Vaittinen [Thu, 27 Jun 2024 07:43:55 +0000 (10:43 +0300)]
watchdog: ROHM BD96801 PMIC WDG driver

Introduce driver for WDG block on ROHM BD96801 scalable PMIC.

This driver only supports watchdog with I2C feeding and delayed
response detection. Whether the watchdog toggles PRSTB pin or
just causes an interrupt can be configured via device-tree.

The BD96801 PMIC HW supports also window watchdog (too early
feeding detection) and Q&A mode. These are not supported by
this driver.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/bb3a49d606e793a61b0c033170ff2a9f30f3c2a5.1719473802.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoregulator: bd96801: ROHM BD96801 PMIC regulators
Matti Vaittinen [Thu, 27 Jun 2024 07:43:40 +0000 (10:43 +0300)]
regulator: bd96801: ROHM BD96801 PMIC regulators

The ROHM BD96801 "Scalable PMIC" is an automotive grade PMIC which can
scale to different applications by allowing chaining of PMICs. The PMIC
also supports various protection features which can be configured either
to fire IRQs - or to shut down power outputs when failure is detected.

The driver implements basic voltage control and sending error
notifications.

NOTE:
The driver does not support doing configuration which require the PMIC
to be in STBY state. The omitted feature set includes setting safety
limit values, changing LDO voltages and controlling enable state for
some regulators.
Also, the ERRB IRQ is not handled.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/50cf02b046df218a21a0f9c4820531d821fc20d4.1719473802.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: support ROHM BD96801 PMIC core
Matti Vaittinen [Thu, 27 Jun 2024 07:43:27 +0000 (10:43 +0300)]
mfd: support ROHM BD96801 PMIC core

The ROHM BD96801 PMIC is highly customizable automotive grade PMIC
which integrates regulator and watchdog funtionalities.

Provide INTB IRQ and register accesses for regulator/watchdog drivers.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/c5260e2dd222e3c64cdf410802bba195637ccb93.1719473802.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: bd96801 PMIC core
Matti Vaittinen [Thu, 27 Jun 2024 07:43:12 +0000 (10:43 +0300)]
dt-bindings: mfd: bd96801 PMIC core

ROHM BD96801 is a highly configurable automotive grade PMIC. Introduce
DT bindings for the BD96801 core.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/9fa3f30dede2b85871a89b20fe1eb13549418489.1719473802.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: ROHM BD96801 PMIC regulators
Matti Vaittinen [Thu, 27 Jun 2024 07:42:56 +0000 (10:42 +0300)]
dt-bindings: ROHM BD96801 PMIC regulators

ROHM BD96801 is a highly configurable automotive grade PMIC. Introduce
DT bindings for the BD96801 regulators.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/53a05b77833cb3f06ecada906411c2f46eecea64.1719473802.git.mazziesaccount@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: soc: ti: am654-serdes-ctrl: Move to dedicated schema
Krzysztof Kozlowski [Wed, 26 Jun 2024 10:09:14 +0000 (12:09 +0200)]
dt-bindings: soc: ti: am654-serdes-ctrl: Move to dedicated schema

ti,am654-serdes-ctrl is not a simple syscon device - it has children -
thus it should be fully documented in its own binding.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-5-3409903bb99b@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: soc: microchip: sparx5-cpu-syscon: Move to dedicated schema
Krzysztof Kozlowski [Wed, 26 Jun 2024 10:09:13 +0000 (12:09 +0200)]
dt-bindings: soc: microchip: sparx5-cpu-syscon: Move to dedicated schema

microchip,sparx5-cpu-syscon is not a simple syscon device - it has
children and implements simple-mfd compatible - thus it should be fully
documented in its own binding.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-4-3409903bb99b@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: soc: intel: lgm-syscon: Move to dedicated schema
Krzysztof Kozlowski [Wed, 26 Jun 2024 10:09:12 +0000 (12:09 +0200)]
dt-bindings: soc: intel: lgm-syscon: Move to dedicated schema

intel,lgm-syscon is not a simple syscon device - it has children - thus
it should be fully documented in its own binding.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-3-3409903bb99b@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon
Krzysztof Kozlowski [Wed, 26 Jun 2024 10:09:11 +0000 (12:09 +0200)]
dt-bindings: soc: sprd: sc9863a-glbregs: Document SC9863A syscon

Document sprd,sc9863a-glbregs compatible already used in DTS and other
bindings example.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-2-3409903bb99b@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agodt-bindings: mfd: syscon: Drop hwlocks
Krzysztof Kozlowski [Wed, 26 Jun 2024 10:09:10 +0000 (12:09 +0200)]
dt-bindings: mfd: syscon: Drop hwlocks

Apparently there is no in-tree DTS syscon node having hwlocks, so drop
the property to simplify the binding.

Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240626-dt-bindings-mfd-syscon-split-v3-1-3409903bb99b@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agosoc: samsung: exynos-pmu: update to use of_syscon_register_regmap()
Peter Griffin [Fri, 21 Jun 2024 11:55:44 +0000 (12:55 +0100)]
soc: samsung: exynos-pmu: update to use of_syscon_register_regmap()

For SoCs like gs101 that need a special regmap, register this with
of_syscon_register_regmap api, so it can be returned by
syscon_regmap_lookup_by_phandle() and friends.

For SoCs that don't require a custom regmap, revert back to syscon
creating the mmio regmap rather than duplicating the logic here.

exynos_get_pmu_regmap_by_phandle() api is also updated to retrieve
the regmap via syscon. The exynos_get_pmu_regmap_by_phandle() api
is kept around until fw_devlink support for syscon property is added
for the pinctrl-samsung driver that also runs at postcore_initcall
level.

All other exynos client drivers can revert back to
syscon_regmap_lookup_by_phandle().

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Will McVicker <willmcvicker@google.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240621115544.1655458-3-peter.griffin@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: syscon: Add of_syscon_register_regmap() API
Peter Griffin [Fri, 21 Jun 2024 11:55:43 +0000 (12:55 +0100)]
mfd: syscon: Add of_syscon_register_regmap() API

The of_syscon_register_regmap() API allows an externally created regmap
to be registered with syscon. This regmap can then be returned to client
drivers using the syscon_regmap_lookup_by_phandle() APIs.

The API is used by platforms where mmio access to the syscon registers is
not possible, and a underlying soc driver like exynos-pmu provides a SoC
specific regmap that can issue a SMC or hypervisor call to write the
register.

This approach keeps the SoC complexities out of syscon, but allows common
drivers such as  syscon-poweroff, syscon-reboot and friends that are used
by many SoCs already to be re-used.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Will McVicker <willmcvicker@google.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240621115544.1655458-2-peter.griffin@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agomfd: cros_ec: Register LED subdevice
Thomas Weißschuh [Thu, 13 Jun 2024 14:48:40 +0000 (16:48 +0200)]
mfd: cros_ec: Register LED subdevice

Add ChromeOS EC-based LED control as EC subdevice.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-5-500b50f41e0f@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoleds: Add ChromeOS EC driver
Thomas Weißschuh [Thu, 13 Jun 2024 14:48:39 +0000 (16:48 +0200)]
leds: Add ChromeOS EC driver

The ChromeOS Embedded Controller exposes an LED control command.
Expose its functionality through the leds subsystem.

The LEDs are exposed as multicolor devices.
A hardware trigger, which is active by default, is provided to let the
EC itself take over control over the LED.

The driver is designed to be probed via the cros_ec mfd device.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-4-500b50f41e0f@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoleds: core: Unexport led_colors[] array
Thomas Weißschuh [Thu, 13 Jun 2024 14:48:38 +0000 (16:48 +0200)]
leds: core: Unexport led_colors[] array

There are no external users left, make the array static.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-3-500b50f41e0f@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoleds: multicolor: Use led_get_color_name() function
Thomas Weißschuh [Thu, 13 Jun 2024 14:48:37 +0000 (16:48 +0200)]
leds: multicolor: Use led_get_color_name() function

led_get_color_name() is a safer alternative to led_colors.

led-class-multicolor.c is the only external user of led_colors and its
removal allows unexporting the array.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-2-500b50f41e0f@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
12 months agoleds: core: Introduce led_get_color_name() function
Thomas Weißschuh [Thu, 13 Jun 2024 14:48:36 +0000 (16:48 +0200)]
leds: core: Introduce led_get_color_name() function

This is similar to the existing led_colors[] array but is safer to use and
usable by everyone.

Getting string representations of color ids is useful for drivers
which are handling color IDs anyways, for example for the multicolor API.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240613-cros_ec-led-v3-1-500b50f41e0f@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: cros_ec: Register keyboard backlight subdevice
Thomas Weißschuh [Sun, 26 May 2024 18:17:18 +0000 (20:17 +0200)]
mfd: cros_ec: Register keyboard backlight subdevice

Load cros_kbd_led_backlight when the EC reports EC_FEATURE_PWM_KEYB.
This makes cros_kbd_led_backlight work on machines without specific
ACPI or OF support for the keyboard backlight.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-4-ee577415a521@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agoplatform/chrome: cros_kbd_led_backlight: allow binding through MFD
Thomas Weißschuh [Sun, 26 May 2024 18:17:17 +0000 (20:17 +0200)]
platform/chrome: cros_kbd_led_backlight: allow binding through MFD

The ChromeOS EC used in Framework laptops supports the standard CrOS EC
keyboard backlight protocol.
However the firmware on these laptops doesn't implement the ACPI ID
GOOG0002 that is recognized by cros_kbd_led_backlight and they also
don't use device tree.

Prepare the existing cros_kbd_led_backlight driver to be probed through
the CrOS EC MFD device which works without ACPI or OF support.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-3-ee577415a521@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agoleds: class: Add flag to avoid automatic renaming of LED devices
Thomas Weißschuh [Sun, 26 May 2024 18:17:16 +0000 (20:17 +0200)]
leds: class: Add flag to avoid automatic renaming of LED devices

Add a mechanism for drivers to opt-out of the automatic device renaming
on conflicts.
Those drivers will provide their own conflict resolution.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-2-ee577415a521@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agoleds: class: Warn about name collisions earlier
Thomas Weißschuh [Sun, 26 May 2024 18:17:15 +0000 (20:17 +0200)]
leds: class: Warn about name collisions earlier

Other warnings refer to the name after renaming, which is clearer when
that name is mentioned first.

It is also clearer where "ret" comes from.

While at it, also add the necessary newline to the message and fix the
parameter alignment.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-1-ee577415a521@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agoregulator: add pm8008 pmic regulator driver
Johan Hovold [Sat, 8 Jun 2024 15:55:25 +0000 (17:55 +0200)]
regulator: add pm8008 pmic regulator driver

The Qualcomm PM8008 is an I2C-controlled PMIC containing seven LDO
regulators.

The driver is based on a driver submitted by Satya Priya, but it has
been cleaned up and reworked to match the new devicetree binding which
no longer describes each regulator as a separate device.

This avoids describing internal details like register offsets in the
devicetree and allows for extending the implementation with features
like over-current protection without having to update the binding.

Specifically note that the regulator interrupts are shared between all
regulators.

Note that the secondary regmap is looked up by name and that if the
driver ever needs to be generalised to support regulators provided by
the primary regmap (I2C address) such information could be added to the
device-id table.

This also fixes the original implementation, which looked up regulators
by 'regulator-name' property rather than devicetree node name and which
prevented the regulators from being named to match board schematics.

Link: https://lore.kernel.org/r/1655200111-18357-8-git-send-email-quic_c_skakit@quicinc.com
Cc: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-12-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Rework to match new DT binding
Johan Hovold [Sat, 8 Jun 2024 15:55:24 +0000 (17:55 +0200)]
mfd: pm8008: Rework to match new DT binding

Rework the pm8008 driver to match the new devicetree binding which no
longer describes internal details like interrupts and register offsets
(including which of the two consecutive I2C addresses the registers
belong to).

Instead make the interrupt controller implementation internal and pass
interrupts to the subdrivers using MFD cell resources.

Note that subdrivers may either get their resources, like register block
offsets, from the parent MFD or this can be included in the subdrivers
directly.

In the current implementation, the temperature alarm driver is generic
enough to just get its base address and alarm interrupt from the parent
driver, which already uses this information to implement the interrupt
controller.

The regulator driver, however, needs additional information like parent
supplies and regulator characteristics so in that case it is easier to
just augment its table with the regulator register base addresses.

Similarly, the current GPIO driver already holds the number of pins and
that lookup table can therefore also be extended with register offsets.

Note that subdrivers can now access the two regmaps by name, even if the
primary regmap is registered last so that it is returned by default when
no name is provided in lookups.

Finally, note that the temperature alarm and GPIO subdrivers need some
minor rework before they can be used with non-SPMI devices like the
PM8008. The temperature alarm MFD cell name specifically uses a "qpnp"
rather than "spmi" prefix to prevent binding until the driver has been
updated.

Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-11-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agodt-bindings: mfd: pm8008: Rework binding
Johan Hovold [Sat, 8 Jun 2024 15:55:23 +0000 (17:55 +0200)]
dt-bindings: mfd: pm8008: Rework binding

Rework the pm8008 binding, which is currently unused, by dropping
internal details like register offsets and interrupts and by adding the
missing regulator and temperature alarm properties.

Note that child nodes are still used for pinctrl and regulator
configuration.

Also note that the pinctrl state definition will be extended later and
could eventually also be shared with other PMICs (e.g. by breaking out
bits of qcom,pmic-gpio.yaml).

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-10-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agodt-bindings: mfd: pm8008: Drop redundant descriptions
Johan Hovold [Sat, 8 Jun 2024 15:55:22 +0000 (17:55 +0200)]
dt-bindings: mfd: pm8008: Drop redundant descriptions

In preparation for reworking the binding, drop the redundant
descriptions of the standard 'reg' and 'interrupts' properties.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-9-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Drop unused driver data
Johan Hovold [Sat, 8 Jun 2024 15:55:21 +0000 (17:55 +0200)]
mfd: pm8008: Drop unused driver data

The i2c client driver data pointer has never been used so drop the
unnecessary assignment.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-8-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Rename irq chip
Johan Hovold [Sat, 8 Jun 2024 15:55:20 +0000 (17:55 +0200)]
mfd: pm8008: Rename irq chip

Drop the redundant "irq" suffix from the irq chip name.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-7-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Use lower case hex notation
Johan Hovold [Sat, 8 Jun 2024 15:55:19 +0000 (17:55 +0200)]
mfd: pm8008: Use lower case hex notation

Use lower case hex notation for consistency.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-6-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Mark regmap structures as const
Johan Hovold [Sat, 8 Jun 2024 15:55:18 +0000 (17:55 +0200)]
mfd: pm8008: Mark regmap structures as const

The regmap irq chip structures can be const so mark them as such.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-5-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Deassert reset on probe
Johan Hovold [Sat, 8 Jun 2024 15:55:17 +0000 (17:55 +0200)]
mfd: pm8008: Deassert reset on probe

Request and deassert any (optional) reset gpio during probe in case it
has been left asserted by the boot firmware.

Note the reset line is not asserted to avoid reverting to the default
I2C address in case the firmware has configured an alternate address.

Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-4-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agomfd: pm8008: Fix regmap irq chip initialisation
Johan Hovold [Sat, 8 Jun 2024 15:55:16 +0000 (17:55 +0200)]
mfd: pm8008: Fix regmap irq chip initialisation

The regmap irq array is potentially shared between multiple PMICs and
should only contain static data.

Use a custom macro to initialise also the type fields and drop the
unnecessary updates on each probe.

Fixes: 6b149f3310a4 ("mfd: pm8008: Add driver for QCOM PM8008 PMIC")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-3-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agodt-bindings: mfd: pm8008: Add reset gpio
Johan Hovold [Sat, 8 Jun 2024 15:55:15 +0000 (17:55 +0200)]
dt-bindings: mfd: pm8008: Add reset gpio

Describe the optional reset gpio (which may not be wired up).

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240608155526.12996-2-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
13 months agoLinux 6.10-rc1 v6.10-rc1
Linus Torvalds [Sun, 26 May 2024 22:20:12 +0000 (15:20 -0700)]
Linux 6.10-rc1

13 months agomm: percpu: Include smp.h in alloc_tag.h
Kent Overstreet [Fri, 24 May 2024 15:42:09 +0000 (11:42 -0400)]
mm: percpu: Include smp.h in alloc_tag.h

percpu.h depends on smp.h, but doesn't include it directly because of
circular header dependency issues; percpu.h is needed in a bunch of low
level headers.

This fixes a randconfig build error on mips:

  include/linux/alloc_tag.h: In function '__alloc_tag_ref_set':
  include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id' [-Werror=implicit-function-declaration]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 24e44cc22aa3 ("mm: percpu: enable per-cpu allocation tagging")
Closes: https://lore.kernel.org/oe-kbuild-all/202405210052.DIrMXJNz-lkp@intel.com/
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 months agoMerge tag 'perf-tools-fixes-for-v6.10-1-2024-05-26' of git://git.kernel.org/pub/scm...
Linus Torvalds [Sun, 26 May 2024 16:54:26 +0000 (09:54 -0700)]
Merge tag 'perf-tools-fixes-for-v6.10-1-2024-05-26' of git://git./linux/kernel/git/perf/perf-tools

Pull perf tool fix from Arnaldo Carvalho de Melo:
 "Revert a patch causing a regression.

  This made a simple 'perf record -e cycles:pp make -j199' stop working
  on the Ampere ARM64 system Linus uses to test ARM64 kernels".

* tag 'perf-tools-fixes-for-v6.10-1-2024-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  Revert "perf parse-events: Prefer sysfs/JSON hardware events over legacy"

13 months agoRevert "perf parse-events: Prefer sysfs/JSON hardware events over legacy"
Arnaldo Carvalho de Melo [Sun, 26 May 2024 11:13:21 +0000 (08:13 -0300)]
Revert "perf parse-events: Prefer sysfs/JSON hardware events over legacy"

This reverts commit 617824a7f0f73e4de325cf8add58e55b28c12493.

This made a simple 'perf record -e cycles:pp make -j199' stop working on
the Ampere ARM64 system Linus uses to test ARM64 kernels, as discussed
at length in the threads in the Link tags below.

The fix provided by Ian wasn't acceptable and work to fix this will take
time we don't have at this point, so lets revert this and work on it on
the next devel cycle.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Cc: Ethan Adams <j.ethan.adams@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Tycho Andersen <tycho@tycho.pizza>
Cc: Yang Jihong <yangjihong@bytedance.com>
Link: https://lore.kernel.org/lkml/CAHk-=wi5Ri=yR2jBVk-4HzTzpoAWOgstr1LEvg_-OXtJvXXJOA@mail.gmail.com
Link: https://lore.kernel.org/lkml/CAHk-=wiWvtFyedDNpoV7a8Fq_FpbB+F5KmWK2xPY3QoYseOf_A@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 months agoMerge tag '6.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sun, 26 May 2024 05:33:10 +0000 (22:33 -0700)]
Merge tag '6.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - two important netfs integration fixes - including for a data
   corruption and also fixes for multiple xfstests

 - reenable swap support over SMB3

* tag '6.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Fix missing set of remote_i_size
  cifs: Fix smb3_insert_range() to move the zero_point
  cifs: update internal version number
  smb3: reenable swapfiles over SMB3 mounts

13 months agoMerge tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 25 May 2024 22:10:33 +0000 (15:10 -0700)]
Merge tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git./linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "16 hotfixes, 11 of which are cc:stable.

  A few nilfs2 fixes, the remainder are for MM: a couple of selftests
  fixes, various singletons fixing various issues in various parts"

* tag 'mm-hotfixes-stable-2024-05-25-09-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm/ksm: fix possible UAF of stable_node
  mm/memory-failure: fix handling of dissolved but not taken off from buddy pages
  mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again
  nilfs2: fix potential hang in nilfs_detach_log_writer()
  nilfs2: fix unexpected freezing of nilfs_segctor_sync()
  nilfs2: fix use-after-free of timer for log writer thread
  selftests/mm: fix build warnings on ppc64
  arm64: patching: fix handling of execmem addresses
  selftests/mm: compaction_test: fix bogus test success and reduce probability of OOM-killer invocation
  selftests/mm: compaction_test: fix incorrect write of zero to nr_hugepages
  selftests/mm: compaction_test: fix bogus test success on Aarch64
  mailmap: update email address for Satya Priya
  mm/huge_memory: don't unpoison huge_zero_folio
  kasan, fortify: properly rename memintrinsics
  lib: add version into /proc/allocinfo output
  mm/vmalloc: fix vmalloc which may return null if called with __GFP_NOFAIL

13 months agoMerge tag 'irq-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 May 2024 21:48:40 +0000 (14:48 -0700)]
Merge tag 'irq-urgent-2024-05-25' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:

 - Fix x86 IRQ vector leak caused by a CPU offlining race

 - Fix build failure in the riscv-imsic irqchip driver
   caused by an API-change semantic conflict

 - Fix use-after-free in irq_find_at_or_after()

* tag 'irq-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq/irqdesc: Prevent use-after-free in irq_find_at_or_after()
  genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline
  irqchip/riscv-imsic: Fixup riscv_ipi_set_virq_range() conflict

13 months agoMerge tag 'x86-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 May 2024 21:40:09 +0000 (14:40 -0700)]
Merge tag 'x86-urgent-2024-05-25' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

 - Fix regressions of the new x86 CPU VFM (vendor/family/model)
   enumeration/matching code

 - Fix crash kernel detection on buggy firmware with
   non-compliant ACPI MADT tables

 - Address Kconfig warning

* tag 'x86-urgent-2024-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
  crypto: x86/aes-xts - switch to new Intel CPU model defines
  x86/topology: Handle bogus ACPI tables correctly
  x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y