summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-31mfd: axp20x: Add support for AXP323Andre Przywara
The X-Powers AXP323 is a very close sibling of the AXP313A. The only difference seems to be the ability to dual-phase the first two DC/DC converter, which adds another register. Add the required boilerplate to introduce a new PMIC to the AXP MFD driver. Where possible, this just maps into the existing structs defined for the AXP313A, only deviating where needed. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20241007001408.27249-5-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: axp20x: Allow multiple regulatorsAndre Przywara
At the moment trying to register a second AXP chip makes the probe fail, as some sysfs registration fails due to a duplicate name: ... [ 3.688215] axp20x-i2c 0-0035: AXP20X driver loaded [ 3.695610] axp20x-i2c 0-0036: AXP20x variant AXP323 found [ 3.706151] sysfs: cannot create duplicate filename '/bus/platform/devices/axp20x-regulator' [ 3.714718] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc1-00026-g50bf2e2c079d-dirty #192 [ 3.724020] Hardware name: Avaota A1 (DT) [ 3.728029] Call trace: [ 3.730477] dump_backtrace+0x94/0xec [ 3.734146] show_stack+0x18/0x24 [ 3.737462] dump_stack_lvl+0x80/0xf4 [ 3.741128] dump_stack+0x18/0x24 [ 3.744444] sysfs_warn_dup+0x64/0x80 [ 3.748109] sysfs_do_create_link_sd+0xf0/0xf8 [ 3.752553] sysfs_create_link+0x20/0x40 [ 3.756476] bus_add_device+0x64/0x104 [ 3.760229] device_add+0x310/0x760 [ 3.763717] platform_device_add+0x10c/0x238 [ 3.767990] mfd_add_device+0x4ec/0x5c8 [ 3.771829] mfd_add_devices+0x88/0x11c [ 3.775666] axp20x_device_probe+0x70/0x184 [ 3.779851] axp20x_i2c_probe+0x9c/0xd8 ... This is because we use PLATFORM_DEVID_NONE for the mfd_add_devices() call, which would number the child devices in the same 0-based way, even for the second (or any other) instance. Use PLATFORM_DEVID_AUTO instead, which automatically assigns non-conflicting device numbers. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20241007001408.27249-4-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: axp20x: Ensure relationship between IDs and model namesAndre Przywara
At the moment there is an implicit relationship between the AXP model IDs and the order of the strings in the axp20x_model_names[] array. This is fragile, and makes adding IDs in the middle error prone. Make this relationship official by changing the ID type to the actual enum used, and using indexed initialisers for the string list. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20241007001408.27249-3-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31dt-bindings: mfd: x-powers,axp152: Document AXP323Andre Przywara
The X-Powers AXP323 is a PMIC used on some newer Allwinner devices. It is almost the same as the AXP313, but supports dual-phasing the first two DC/DC converters. A pure AXP313 driver wouldn't know about this, and might turn the linked DCDC2 regulator off, as it does not seem to be used. This makes the AXP323 incompatible to the AXP313a. Add the new compatible string, and treat it like the AXP313a. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241007001408.27249-2-andre.przywara@arm.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: ipaq-micro: Add missing break for the default caseAndy Shevchenko
Even default case should have a break statement to make code robust against changes (e.g., adding a case after the default one). Add missing break for the default case. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241016130023.872277-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: intel_soc_pmic_bxtwc: Deduplicate error messagesAndy Shevchenko
Move the individual error messages inside bxtwc_add_chained_irq_chip() in order to deduplicate them. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241016105201.757024-5-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: intel_soc_pmic_bxtwc: Use temporary variable for struct deviceAndy Shevchenko
Use a temporary variable for the struct device pointers to avoid dereferencing. This makes code a bit neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241016105201.757024-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: intel_soc_pmic_bxtwc: Don't use "proxy" headersAndy Shevchenko
Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241016105201.757024-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-31mfd: intel_soc_pmic_bxtwc: Switch to use ATTRIBUTE_GROUPS()Andy Shevchenko
Embrace ATTRIBUTE_GROUPS() to avoid boiler plate code. While at it, move DEVICE_ATTR_ADMIN_RW() closer to the callbacks. This should not introduce any functional changes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241016105201.757024-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-25mfd: twl-core: Add a clock subdevice for the TWL6030Andreas Kemnade
Also the TWL6030 has some clocks, so add a subdevice for that. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241014161109.2222-2-andreas@kemnade.info Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: mediatek: mt6397: Add ADC, CODEC and Regulators for MT6359Macpaul Lin
Since MT6359 PMIC has been added as one of the compatibles of "mediatek,mt6397.yaml", the sub-device node of "MT6359 PMIC AUXADC", "MT6359 Audio Codec" and "MT6359 PMIC Regulators" should also be contained in this DT Schema as well. This patch includes: - add 'adc' property and $ref for 'mediatek,mt6359-auxadc'. - add 'mt6359-regulator' to the compatibles of regulators. - add 'mt6359-codec' to the compatibles of audio-codec. Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241004030148.13366-1-macpaul.lin@mediatek.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: mediatek: mt6397: Add start-year property to RTCAngeloGioacchino Del Regno
Enable evaluating the start-year property to allow shifting the RTC's HW range. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240923100010.97470-2-angelogioacchino.delregno@collabora.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: Convert zii,rave-sp.txt to yaml formatFrank Li
Convert device binding doc zii,rave-sp.txt to yaml format. Additional change: - ref to other zii yaml files. - remove rave-sp-hwmon and rave-sp-leds. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241010-zii_yaml-v2-5-0ab730607422@nxp.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: bd96801: Add ERRB IRQMatti Vaittinen
The ROHM BD96801 "scalable PMIC" provides two physical IRQs. The ERRB handling can in many cases be omitted because it is used to inform fatal IRQs, which usually kill the power from the SOC. There may however be use-cases where the SOC has a 'back-up' emergency power source which allows some very short time of operation to try to gracefully shut down sensitive hardware. Furthermore, it is possible the processor controlling the PMIC is not powered by the PMIC. In such cases handling the ERRB IRQs may be beneficial. Add support for ERRB IRQs. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/dda4464443fba81f79d5f8d73947dbd63083cff2.1727931468.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: rk8xx-core: Check "system-power-controller" firstDragan Simic
Commit 961748bb1555 ("dt-bindings: mfd: rk8xx: Deprecate rockchip,system- power-controller") made the property "rockchip,system-power-controller" deprecated in favor of the shorter, universal form "system-power-controller". Following the updates to the board dts files, [1] make the favored property name checked first, to save a few CPU cycles. [1] https://lore.kernel.org/linux-rockchip/20241008105450.20648-1-didi.debian@cknow.org/T/#u Signed-off-by: Dragan Simic <dsimic@manjaro.org> Link: https://lore.kernel.org/r/08d4e88974c205eba124086ce156622e2e4cdc20.1728397516.git.dsimic@manjaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: twl: Add charger node also for TWL603xAndreas Kemnade
Also the TWL603X devices have a charger, so allow to specify it here. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241007150120.1416698-3-andreas@kemnade.info Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16platform/chrome: Update EC feature flagsPavan Holla
Define EC_FEATURE_UCSI_PPM to enable usage of the cros_ec_ucsi driver. Also, add any feature flags that are implemented by the EC but are missing in the kernel header. Signed-off-by: Pavan Holla <pholla@chromium.org> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org> Acked-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20240910101527.603452-3-ukaszb@chromium.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: intel_soc_pmic_bxtwc: Fix IRQ domain names duplicationAndy Shevchenko
For all of the devices regmap IRQ may try to created the folder with the same name which is impossible and fails with: debugfs: File '\_SB.IPC1.PMIC' in directory 'domains' already present! Add domain_suffix to all of the IRQ chips driver registers to solve the issue. Fixes: 39d047c0b1c8 ("mfd: add Intel Broxton Whiskey Cove PMIC driver") Fixes: 957ae5098185 ("platform/x86: Add Whiskey Cove PMIC TMU support") Fixes: 57129044f504 ("mfd: intel_soc_pmic_bxtwc: Use chained IRQs for second level IRQ chips") Depends-on: dde286ee5770 ("regmap: Allow setting IRQ domain name suffix") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241005193029.1929139-5-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devicesAndy Shevchenko
While design wise the idea of converting the driver to use the hierarchy of the IRQ chips is correct, the implementation has (inherited) flaws. This was unveiled when platform_get_irq() had started WARN() on IRQ 0 that is supposed to be a Linux IRQ number (also known as vIRQ). Rework the driver to respect IRQ domain when creating each MFD device separately, as the domain is not the same for all of them. Fixes: 57129044f504 ("mfd: intel_soc_pmic_bxtwc: Use chained IRQs for second level IRQ chips") Tested-by: Zhang Ning <zhangn1985@outlook.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241005193029.1929139-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU deviceAndy Shevchenko
While design wise the idea of converting the driver to use the hierarchy of the IRQ chips is correct, the implementation has (inherited) flaws. This was unveiled when platform_get_irq() had started WARN() on IRQ 0 that is supposed to be a Linux IRQ number (also known as vIRQ). Rework the driver to respect IRQ domain when creating each MFD device separately, as the domain is not the same for all of them. Fixes: 957ae5098185 ("platform/x86: Add Whiskey Cove PMIC TMU support") Fixes: 57129044f504 ("mfd: intel_soc_pmic_bxtwc: Use chained IRQs for second level IRQ chips") Reported-by: Zhang Ning <zhangn1985@outlook.com> Closes: https://lore.kernel.org/r/TY2PR01MB3322FEDCDC048B7D3794F922CDBA2@TY2PR01MB3322.jpnprd01.prod.outlook.com Tested-by: Zhang Ning <zhangn1985@outlook.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20241005193029.1929139-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C deviceAndy Shevchenko
While design wise the idea of converting the driver to use the hierarchy of the IRQ chips is correct, the implementation has (inherited) flaws. This was unveiled when platform_get_irq() had started WARN() on IRQ 0 that is supposed to be a Linux IRQ number (also known as vIRQ). Rework the driver to respect IRQ domain when creating each MFD device separately, as the domain is not the same for all of them. Fixes: 9c6235c86332 ("mfd: intel_soc_pmic_bxtwc: Add bxt_wcove_usbc device") Fixes: d2061f9cc32d ("usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY") Fixes: 57129044f504 ("mfd: intel_soc_pmic_bxtwc: Use chained IRQs for second level IRQ chips") Reported-by: Zhang Ning <zhangn1985@outlook.com> Closes: https://lore.kernel.org/r/TY2PR01MB3322FEDCDC048B7D3794F922CDBA2@TY2PR01MB3322.jpnprd01.prod.outlook.com Tested-by: Zhang Ning <zhangn1985@outlook.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20241005193029.1929139-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: atmel-smc: Reorganize kerneldoc parameter namesJulia Lawall
Reorganize kerneldoc parameter names to match the parameter order in the function header. Problems identified using Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20240930112121.95324-18-Julia.Lawall@inria.fr Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: syscon: Document the non simple-mfd syscon on PolarFire SoCConor Dooley
The "mss_top_scb" register region on PolarFire SoC contains many different functions, including controls for the AXI bus and other things mainly of interest to the bootloader. The interrupt register for the system controller's mailbox is also in here, which is needed by the operating system. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20241002-clambake-raider-a8cbb3a021a8@spud Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: wcd934x: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE()Masahiro Yamada
Since commit b4b818305578 ("slimbus: generate MODULE_ALIAS() from MODULE_DEVICE_TABLE()"), modpost automatically generates MODULE_ALIAS() from MODULE_DEVICE_TABLE(slim, ). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.kernel.org/r/20241002151539.43762-1-masahiroy@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: cs42l43: Fix issues in probe error pathsCharles Keepax
The error path in cs42l43_boot_work() will lead to an unbalanced regulator put, when the driver is removed. Fix this by relying on remove to power down the device. Also the boot work needs to be synchronised with driver remove, to ensure the work is not still running after the driver has been removed. Add the required cancel_work_sync(). Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20241002121311.162691-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: sec-core: Add support for the Samsung s2dos05Dzmitry Sankouski
S2DOS05 is a panel/touchscreen PMIC, often found in Samsung phones. We define regulator sub-device for which driver will be added in subsequent patch. The device also has ADC for power and current measurements. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240617-starqltechn_integration_upstream-v5-2-ea1109029ba5@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: Add support for the samsung,s2dos05Dzmitry Sankouski
Add samsung,s2dos05 MFD module binding. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240617-starqltechn_integration_upstream-v5-1-ea1109029ba5@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: max77693: Remove unused max77693_irq_source declarationsDzmitry Sankouski
Remove `enum max77693_irq_source` declaration because unused. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240617-starqltechn_integration_upstream-v5-1-125d9228d751@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: da9052-spi: Change read-mask to write-maskMarcus Folkesson
Driver has mixed up the R/W bit. The LSB bit is set on write rather than read. Change it to avoid nasty things to happen. Fixes: e9e9d3973594 ("mfd: da9052: Avoid setting read_flag_mask for da9052-i2c driver") Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/20240925-da9052-v2-1-f243e4505b07@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: bd96801: Use maple tree register cacheMark Brown
The maple tree register cache uses a more modern data structure than the rbtree cache and makes implementation decisions more suited to modern hardware, switch the bd96801 driver to it to take advantage of this newer code. No functional changes. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/20240924-mfd-bd96801-maple-v1-1-04fe33e1f009@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: cros_ec: Don't load charger with UCSIAbhishek Pandit-Subedi
When UCSI is enabled, don't load cros_usbpd_charger and cros_usbpd_logger drivers. Charger functionality is provided by the UCSI driver already and logging will need to be added. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org> Link: https://lore.kernel.org/r/20240910101527.603452-9-ukaszb@chromium.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: cros_ec: Load cros_ec_ucsi on supported ECsPavan Holla
Load cros_ec_ucsi driver if the ChromeOS EC implements UCSI Platform Policy Manager (PPM). Signed-off-by: Pavan Holla <pholla@chromium.org> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org> Link: https://lore.kernel.org/r/20240910101527.603452-8-ukaszb@chromium.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: qcom,tcsr: Add compatible for qcs615lijuang
Document the qcom,qcs615-tcsr compatible. Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240920-add_tcsr_compatible_for_qcs615-v2-1-8ce2dbc7f72c@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: qcom,tcsr: Add compatible for QCS8300Jingyi Wang
Document the qcom,qcs8300-tcsr compatible, tcsr will provide various control and status functions for their peripherals. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240911-qcs8300_tcsr_binding-v2-1-66eb5336b8d1@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix raceJinjie Ruan
As the comment said, disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ. Fixes: 72cd799544f2 ("[PATCH] I2C: add i2c driver for TPS6501x") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20240912031530.2211654-1-ruanjinjie@huawei.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16dt-bindings: mfd: qcom,tcsr: Document support for SA8255pNikunj Kela
Add compatible for tcsr representing support on SA8255p SoC. Signed-off-by: Shazad Hussain <quic_shazhuss@quicinc.com> Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240905194741.3803345-1-quic_nkela@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: palmas: Constify strings with regulator namesKrzysztof Kozlowski
The names of regulators are static const strings, so pointers can be made as pointers to const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240909134941.121847-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: atmel-flexcom/rk8xx-core: Convert comma to semicolonShen Lichuan
Replace a comma between expression statements by a semicolon. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> # for atmel-flexcom.c Link: https://lore.kernel.org/r/20240905092718.95011-1-shenlichuan@vivo.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16mfd: syscon: Use regmap max_register_is_0 as neededNishanth Menon
syscon has always set the optional max_register configuration of regmap to ensure the correct checks are in place. However, a recent commit 0ec74ad3c157 ("regmap: rework ->max_register handling") introduced explicit configuration in regmap framework for register maps that is exactly 1 register, when max_register is pointing to a valid register 0. This commit solved a previous limitation of regmap framework. Update syscon driver to consistent in regmap configuration for all sizes of syscons by using this new capability by setting max_register_is_0, when the max_register is valid and 0. Signed-off-by: Nishanth Menon <nm@ti.com> Link: https://lore.kernel.org/r/20240903184710.1552067-1-nm@ti.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-16Merge branches 'ib-dt-mfd-input-leds-power-rtc-6.13' and ↵Lee Jones
'ib-mfd-gpio-i2c-watchdog-6.13' into ibs-for-mfd-merged
2024-10-16dt-bindings: mfd: mediatek: mt6397: Convert to DT schema formatMacpaul Lin
Convert the mfd: mediatek: mt6397 binding to DT schema format. MT6323, MT6358, and MT6397 are PMIC devices with multiple function subdevices. They share a common PMIC design but have variations in subdevice combinations. Key updates in this conversion: 1. RTC: - Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema. 2. Regulators: - Align to generic name "regulators". - Update references from .txt to .yaml for mt6323, mt6358, and mt6397 regulators. - Simplify regulator name labels in device tree examples. 3. Audio Codec: - Simplify Audio Codec part with updating compatible items. - Align to generic name "audio-codec" for codec and sound subdevices. 4. Clocks: - Align to generic name "clocks" for clockbuffer subdevices. 5. LEDs: - Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema. - Update LED binding. 6. Keys: - Add detailed descriptions for power and home keys. - Add compatible: mediatek,mt6358-keys. 7. Power Controller: - Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT schema. - Add #power-domain-cells property to fix dt-binding check error. - Clarify "BBPU" as "Baseband power up". 8. Pinctrl: - Align to generic name "pinctrl" instead of "pin-controller". 9. Compatible: - Drop "mediatek,mt6357" since there is a separated DT Schema for PMIC MT6357. 10. Examples: - MT6323: Retain complete examples for this PMIC. - MT6358 and MT6397: simplify settings in regulators. - Preserve "audio-codec", "clocks", "pinctrl", "rtc", and "keys" sections as they contain typical settings for different PMICs. Additional updates: - MAINTAINERS: Add co-maintainers and reference to mfd/mediatek,mt6397.yaml for LED and power-controller drivers. - input/mediatek,pmic-keys.yaml: Update reference to mfd/mediatek,mt6397.yaml. Signed-off-by: Sen Chu <sen.chu@mediatek.com> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20241001104145.24054-3-macpaul.lin@mediatek.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-09MAINTAINERS: Add entry for Congatec Board ControllerThomas Richard
Add the Congatec Board Controller drivers and header as Maintained by myself. Acked-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241001-congatec-board-controller-v3-5-39ceceed5c47@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-09watchdog: Congatec Board Controller watchdog timer driverThomas Richard
Add watchdog timer support for the Congatec Board Controller. Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241001-congatec-board-controller-v3-4-39ceceed5c47@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-09i2c: Congatec Board Controller i2c bus driverThomas Richard
Add i2c support for the Congatec Board Controller. The Board Controller has two i2c busses, a General Purpose bus and a Power Management bus. Acked-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241001-congatec-board-controller-v3-3-39ceceed5c47@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-09gpio: Congatec Board Controller gpio driverThomas Richard
Add gpio support for the Congatec Board Controller. This Board Controller has 14 GPIO pins. The driver is probed by the Congatec Board Controller MFD driver. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20241001-congatec-board-controller-v3-2-39ceceed5c47@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-10-09mfd: Add Congatec Board Controller driverThomas Richard
Add core MFD driver for the Board Controller found on some Congatec SMARC module. This Board Controller provides functions like watchdog, GPIO, and I2C busses. This commit adds support only for the conga-SA7 module. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241001-congatec-board-controller-v3-1-39ceceed5c47@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
2024-09-29Linux 6.12-rc1v6.12-rc1Linus Torvalds
2024-09-29x86: kvm: fix build errorLinus Torvalds
The cpu_emergency_register_virt_callback() function is used unconditionally by the x86 kvm code, but it is declared (and defined) conditionally: #if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD) void cpu_emergency_register_virt_callback(cpu_emergency_virt_cb *callback); ... leading to a build error when neither KVM_INTEL nor KVM_AMD support is enabled: arch/x86/kvm/x86.c: In function ‘kvm_arch_enable_virtualization’: arch/x86/kvm/x86.c:12517:9: error: implicit declaration of function ‘cpu_emergency_register_virt_callback’ [-Wimplicit-function-declaration] 12517 | cpu_emergency_register_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kvm/x86.c: In function ‘kvm_arch_disable_virtualization’: arch/x86/kvm/x86.c:12522:9: error: implicit declaration of function ‘cpu_emergency_unregister_virt_callback’ [-Wimplicit-function-declaration] 12522 | cpu_emergency_unregister_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix the build by defining empty helper functions the same way the old cpu_emergency_disable_virtualization() function was dealt with for the same situation. Maybe we could instead have made the call sites conditional, since the callers (kvm_arch_{en,dis}able_virtualization()) have an empty weak fallback. I'll leave that to the kvm people to argue about, this at least gets the build going for that particular config. Fixes: 590b09b1d88e ("KVM: x86: Register "emergency disable" callbacks when virt is enabled") Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sean Christopherson <seanjc@google.com> Cc: Kai Huang <kai.huang@intel.com> Cc: Chao Gao <chao.gao@intel.com> Cc: Farrah Chen <farrah.chen@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-09-29Merge tag 'mailbox-v6.12' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox Pull mailbox updates from Jassi Brar: - fix kconfig dependencies (mhu-v3, omap2+) - use devie name instead of genereic imx_mu_chan as interrupt name (imx) - enable sa8255p and qcs8300 ipc controllers (qcom) - Fix timeout during suspend mode (bcm2835) - convert to use use of_property_match_string (mailbox) - enable mt8188 (mediatek) - use devm_clk_get_enabled helpers (spreadtrum) - fix device-id typo (rockchip) * tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: mailbox, remoteproc: omap2+: fix compile testing dt-bindings: mailbox: qcom-ipcc: Document QCS8300 IPCC dt-bindings: mailbox: qcom-ipcc: document the support for SA8255p dt-bindings: mailbox: mtk,adsp-mbox: Add compatible for MT8188 mailbox: Use of_property_match_string() instead of open-coding mailbox: bcm2835: Fix timeout during suspend mode mailbox: sprd: Use devm_clk_get_enabled() helpers mailbox: rockchip: fix a typo in module autoloading mailbox: imx: use device name in interrupt name mailbox: ARM_MHU_V3 should depend on ARM64
2024-09-29Merge tag 'i2c-for-6.12-rc1-additional_fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - fix DesignWare driver ENABLE-ABORT sequence, ensuring ABORT can always be sent when needed - check for PCLK in the SynQuacer controller as an optional clock, allowing ACPI to directly provide the clock rate - KEBA driver Kconfig dependency fix - fix XIIC driver power suspend sequence * tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled i2c: keba: I2C_KEBA should depend on KEBA_CP500 i2c: synquacer: Deal with optional PCLK correctly i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled