From 8325ec08d67d8f669c32137a5ab2724f0a76de77 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 3 Jul 2023 17:09:22 +0300 Subject: mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer The kernel already has a helper to print a hexdump of a small buffer via pointer extension. Use that instead of open coded variant. In long term it helps to kill pr_cont() or at least narrow down its use. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230703140923.2840-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones --- drivers/mfd/ipaq-micro.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index 6d3968458e81..cddfd2e808f2 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -131,10 +131,7 @@ static void micro_rx_msg(struct ipaq_micro *micro, u8 id, int len, u8 *data) break; default: dev_err(micro->dev, - "unknown msg %d [%d] ", id, len); - for (i = 0; i < len; ++i) - pr_cont("0x%02x ", data[i]); - pr_cont("\n"); + "unknown msg %d [%d] %*ph\n", id, len, len, data); } spin_unlock(µ->lock); } -- cgit v1.2.3 From d085c27aa62999e2fe054707ab9da2af65d22b2f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 4 Jul 2023 15:07:48 +0200 Subject: mfd: rk808: Make MFD_RK8XX tristate There is no reason for MFD_RK8XX to be bool, all drivers that depend on it, or that select it, are tristate. Fixes: c20e8c5b1203af37 ("mfd: rk808: Split into core and i2c") Signed-off-by: Geert Uytterhoeven Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Link: https://lore.kernel.org/r/d132363fc9228473e9e652b70a3761b94de32d70.1688475844.git.geert+renesas@glider.be Signed-off-by: Lee Jones --- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 85be64579fc9..8effe182266d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1220,7 +1220,7 @@ config MFD_RC5T583 different functionality of the device. config MFD_RK8XX - bool + tristate select MFD_CORE config MFD_RK8XX_I2C -- cgit v1.2.3 From 8e950a60680f3695d98fed5f7add85f493a1420e Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:33 +0800 Subject: mfd: atmel-hlcdc: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-1-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/atmel-hlcdc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c index 3c2414ba4b01..20de7f49a830 100644 --- a/drivers/mfd/atmel-hlcdc.c +++ b/drivers/mfd/atmel-hlcdc.c @@ -83,7 +83,6 @@ static int atmel_hlcdc_probe(struct platform_device *pdev) struct atmel_hlcdc_regmap *hregmap; struct device *dev = &pdev->dev; struct atmel_hlcdc *hlcdc; - struct resource *res; hregmap = devm_kzalloc(dev, sizeof(*hregmap), GFP_KERNEL); if (!hregmap) @@ -93,8 +92,7 @@ static int atmel_hlcdc_probe(struct platform_device *pdev) if (!hlcdc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hregmap->regs = devm_ioremap_resource(dev, res); + hregmap->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hregmap->regs)) return PTR_ERR(hregmap->regs); -- cgit v1.2.3 From 41b2e61ae63ee10961be52b15588e4acf073d35d Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:34 +0800 Subject: mfd: omap-usb-tll: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-2-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/omap-usb-tll.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 69cbc2097911..906353735c78 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -200,15 +200,13 @@ static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode) static int usbtll_omap_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct usbtll_omap *tll; void __iomem *base; int i, nch, ver; dev_dbg(dev, "starting TI HSUSB TLL Controller\n"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- cgit v1.2.3 From 07141cfedfe7fbbf2a32b6bb73f53cdc15dcc588 Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:35 +0800 Subject: mfd: ti_am335x_tscadc: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-3-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/ti_am335x_tscadc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 07825cfd8aa8..570bc2d33e2b 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -201,8 +201,7 @@ static int ti_tscadc_probe(struct platform_device *pdev) else tscadc->irq = err; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tscadc->tscadc_base = devm_ioremap_resource(&pdev->dev, res); + tscadc->tscadc_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(tscadc->tscadc_base)) return PTR_ERR(tscadc->tscadc_base); -- cgit v1.2.3 From fed64817f0c76b3f47c92d25250f366e5ca09904 Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:36 +0800 Subject: mfd: exynos-lpass: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-4-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/exynos-lpass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 166cd21088cd..1506d8d352b1 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -109,14 +109,12 @@ static int exynos_lpass_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct exynos_lpass *lpass; void __iomem *base_top; - struct resource *res; lpass = devm_kzalloc(dev, sizeof(*lpass), GFP_KERNEL); if (!lpass) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base_top = devm_ioremap_resource(dev, res); + base_top = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base_top)) return PTR_ERR(base_top); -- cgit v1.2.3 From 390a3549fcd2fc96bc01a0b95a2c1028e74cc943 Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:37 +0800 Subject: mfd: omap-usb-host: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-5-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/omap-usb-host.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 7f5775109593..78f1bb55dbc0 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -534,7 +534,6 @@ static int usbhs_omap_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev); struct usbhs_hcd_omap *omap; - struct resource *res; int ret = 0; int i; bool need_logic_fck; @@ -569,8 +568,7 @@ static int usbhs_omap_probe(struct platform_device *pdev) return -ENOMEM; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - omap->uhh_base = devm_ioremap_resource(dev, res); + omap->uhh_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(omap->uhh_base)) return PTR_ERR(omap->uhh_base); -- cgit v1.2.3 From 4c0104bf903fa9be39a7e1227eef8bca81c17bca Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:38 +0800 Subject: mfd: stm32-timers: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-6-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/stm32-timers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c index 44ed2fce0319..dc0cd0808736 100644 --- a/drivers/mfd/stm32-timers.c +++ b/drivers/mfd/stm32-timers.c @@ -226,8 +226,7 @@ static int stm32_timers_probe(struct platform_device *pdev) if (!ddata) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio = devm_ioremap_resource(dev, res); + mmio = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(mmio)) return PTR_ERR(mmio); -- cgit v1.2.3 From 2459f4dfe5529f8b847f452473e2da08a8fc9fe5 Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Thu, 6 Jul 2023 19:39:39 +0800 Subject: mfd: hi655x-pmic: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230706113939.1178-7-frank.li@vivo.com Signed-off-by: Lee Jones --- drivers/mfd/hi655x-pmic.c | 3 +-- include/linux/mfd/hi655x-pmic.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c index a58e42ddcd0c..98ae40ee3f05 100644 --- a/drivers/mfd/hi655x-pmic.c +++ b/drivers/mfd/hi655x-pmic.c @@ -100,8 +100,7 @@ static int hi655x_pmic_probe(struct platform_device *pdev) return -ENOMEM; pmic->dev = dev; - pmic->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, pmic->res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); diff --git a/include/linux/mfd/hi655x-pmic.h b/include/linux/mfd/hi655x-pmic.h index 6a012784dd1b..194556851ccf 100644 --- a/include/linux/mfd/hi655x-pmic.h +++ b/include/linux/mfd/hi655x-pmic.h @@ -52,7 +52,6 @@ #define OTMP_D1R_INT_MASK BIT(OTMP_D1R_INT) struct hi655x_pmic { - struct resource *res; struct device *dev; struct regmap *regmap; struct gpio_desc *gpio; -- cgit v1.2.3 From edae09467141abdf1d04804d15a5ede8aa4562fd Mon Sep 17 00:00:00 2001 From: Biju Das Date: Tue, 11 Jul 2023 10:28:41 +0100 Subject: mfd: Add module build support for RZ/G2L MTU3a Modified Kconfig to enable module build support for RZ/G2L MTU3a driver. While at it, added module.h header file. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230711092841.119161-1-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones --- drivers/mfd/Kconfig | 2 +- drivers/mfd/rz-mtu3.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 8effe182266d..a3875d983b9f 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1371,7 +1371,7 @@ config MFD_SC27XX_PMIC and it also adds the irq_chip parts for handling the PMIC chip events. config RZ_MTU3 - bool "Renesas RZ/G2L MTU3a core driver" + tristate "Renesas RZ/G2L MTU3a core driver" depends on (ARCH_RZG2L && OF) || COMPILE_TEST help Select this option to enable Renesas RZ/G2L MTU3a core driver for diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c index 04006f4aa702..037956f0254b 100644 --- a/drivers/mfd/rz-mtu3.c +++ b/drivers/mfd/rz-mtu3.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From cdc707f72e7b45c951457929866e4d6759928166 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 12 Jul 2023 12:14:43 +0100 Subject: mfd: axp20x: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the axp20x driver to use the more modern data structure, really it should have been fine even without the most recent round of updates. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230712-mfd-axp20x-maple-v1-1-4df3749107a6@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/axp20x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index c03bc5cda080..87603eeaa277 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -342,7 +342,7 @@ static const struct regmap_config axp152_regmap_config = { .wr_table = &axp152_writeable_table, .volatile_table = &axp152_volatile_table, .max_register = AXP152_PWM1_DUTY_CYCLE, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static const struct regmap_config axp192_regmap_config = { @@ -360,7 +360,7 @@ static const struct regmap_config axp20x_regmap_config = { .wr_table = &axp20x_writeable_table, .volatile_table = &axp20x_volatile_table, .max_register = AXP20X_OCV(AXP20X_OCV_MAX), - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static const struct regmap_config axp22x_regmap_config = { @@ -369,7 +369,7 @@ static const struct regmap_config axp22x_regmap_config = { .wr_table = &axp22x_writeable_table, .volatile_table = &axp22x_volatile_table, .max_register = AXP22X_BATLOW_THRES1, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static const struct regmap_config axp288_regmap_config = { @@ -378,7 +378,7 @@ static const struct regmap_config axp288_regmap_config = { .wr_table = &axp288_writeable_table, .volatile_table = &axp288_volatile_table, .max_register = AXP288_FG_TUNE5, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static const struct regmap_config axp313a_regmap_config = { @@ -396,7 +396,7 @@ static const struct regmap_config axp806_regmap_config = { .wr_table = &axp806_writeable_table, .volatile_table = &axp806_volatile_table, .max_register = AXP806_REG_ADDR_EXT, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; static const struct regmap_config axp15060_regmap_config = { @@ -405,7 +405,7 @@ static const struct regmap_config axp15060_regmap_config = { .wr_table = &axp15060_writeable_table, .volatile_table = &axp15060_volatile_table, .max_register = AXP15060_IRQ2_STATE, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; #define INIT_REGMAP_IRQ(_variant, _irq, _off, _mask) \ -- cgit v1.2.3 From 4ffee2918de2d51bc1ef528b0b75c3785f1cc07e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:19 +0100 Subject: mfd: cs47l15: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the cs47l15 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-1-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/cs47l15-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/cs47l15-tables.c b/drivers/mfd/cs47l15-tables.c index 3c77f0a24e9b..59b005cc1e33 100644 --- a/drivers/mfd/cs47l15-tables.c +++ b/drivers/mfd/cs47l15-tables.c @@ -1249,7 +1249,7 @@ const struct regmap_config cs47l15_16bit_spi_regmap = { .readable_reg = &cs47l15_16bit_readable_register, .volatile_reg = &cs47l15_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l15_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l15_reg_default), }; @@ -1264,7 +1264,7 @@ const struct regmap_config cs47l15_16bit_i2c_regmap = { .readable_reg = &cs47l15_16bit_readable_register, .volatile_reg = &cs47l15_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l15_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l15_reg_default), }; @@ -1281,7 +1281,7 @@ const struct regmap_config cs47l15_32bit_spi_regmap = { .readable_reg = &cs47l15_32bit_readable_register, .volatile_reg = &cs47l15_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l15_32bit_spi_regmap); @@ -1295,6 +1295,6 @@ const struct regmap_config cs47l15_32bit_i2c_regmap = { .readable_reg = &cs47l15_32bit_readable_register, .volatile_reg = &cs47l15_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l15_32bit_i2c_regmap); -- cgit v1.2.3 From 01f71e73a221d3579ecb8656c4258084111d1d1b Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:20 +0100 Subject: mfd: cs47l24: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the cs47l24 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-2-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/cs47l24-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/cs47l24-tables.c b/drivers/mfd/cs47l24-tables.c index c289d92a5c1d..878dfd298a17 100644 --- a/drivers/mfd/cs47l24-tables.c +++ b/drivers/mfd/cs47l24-tables.c @@ -1616,7 +1616,7 @@ const struct regmap_config cs47l24_spi_regmap = { .readable_reg = cs47l24_readable_register, .volatile_reg = cs47l24_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l24_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l24_reg_default), }; -- cgit v1.2.3 From f38630fd7cdb85e3a5bcc18cf5da3cfbf6850ac7 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:21 +0100 Subject: mfd: cs47l35: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the cs47l35 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-3-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/cs47l35-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/cs47l35-tables.c b/drivers/mfd/cs47l35-tables.c index a0bc6c5100d6..274f4b05850a 100644 --- a/drivers/mfd/cs47l35-tables.c +++ b/drivers/mfd/cs47l35-tables.c @@ -1498,7 +1498,7 @@ const struct regmap_config cs47l35_16bit_spi_regmap = { .readable_reg = cs47l35_16bit_readable_register, .volatile_reg = cs47l35_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l35_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l35_reg_default), }; @@ -1515,7 +1515,7 @@ const struct regmap_config cs47l35_16bit_i2c_regmap = { .readable_reg = cs47l35_16bit_readable_register, .volatile_reg = cs47l35_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l35_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l35_reg_default), }; @@ -1534,7 +1534,7 @@ const struct regmap_config cs47l35_32bit_spi_regmap = { .readable_reg = cs47l35_32bit_readable_register, .volatile_reg = cs47l35_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l35_32bit_spi_regmap); @@ -1550,6 +1550,6 @@ const struct regmap_config cs47l35_32bit_i2c_regmap = { .readable_reg = cs47l35_32bit_readable_register, .volatile_reg = cs47l35_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l35_32bit_i2c_regmap); -- cgit v1.2.3 From fdcd10cd5efc61bd97c7da5f74226ea08771c205 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:22 +0100 Subject: mfd: cs47l85: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the cs47l85 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-4-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/cs47l85-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/cs47l85-tables.c b/drivers/mfd/cs47l85-tables.c index 270d8eda3f5f..f397894827ce 100644 --- a/drivers/mfd/cs47l85-tables.c +++ b/drivers/mfd/cs47l85-tables.c @@ -2836,7 +2836,7 @@ const struct regmap_config cs47l85_16bit_spi_regmap = { .readable_reg = cs47l85_16bit_readable_register, .volatile_reg = cs47l85_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l85_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l85_reg_default), }; @@ -2853,7 +2853,7 @@ const struct regmap_config cs47l85_16bit_i2c_regmap = { .readable_reg = cs47l85_16bit_readable_register, .volatile_reg = cs47l85_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l85_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l85_reg_default), }; @@ -2872,7 +2872,7 @@ const struct regmap_config cs47l85_32bit_spi_regmap = { .readable_reg = cs47l85_32bit_readable_register, .volatile_reg = cs47l85_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l85_32bit_spi_regmap); @@ -2888,6 +2888,6 @@ const struct regmap_config cs47l85_32bit_i2c_regmap = { .readable_reg = cs47l85_32bit_readable_register, .volatile_reg = cs47l85_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l85_32bit_i2c_regmap); -- cgit v1.2.3 From 7f3494994b71374f27f44bc43516aeb4521765a7 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:23 +0100 Subject: mfd: cs47l90: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the cs47l90 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-5-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/cs47l90-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/cs47l90-tables.c b/drivers/mfd/cs47l90-tables.c index 7345fc09c0bb..6f9ceb36c533 100644 --- a/drivers/mfd/cs47l90-tables.c +++ b/drivers/mfd/cs47l90-tables.c @@ -2539,7 +2539,7 @@ const struct regmap_config cs47l90_16bit_spi_regmap = { .readable_reg = cs47l90_16bit_readable_register, .volatile_reg = cs47l90_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l90_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l90_reg_default), }; @@ -2556,7 +2556,7 @@ const struct regmap_config cs47l90_16bit_i2c_regmap = { .readable_reg = cs47l90_16bit_readable_register, .volatile_reg = cs47l90_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l90_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l90_reg_default), }; @@ -2575,7 +2575,7 @@ const struct regmap_config cs47l90_32bit_spi_regmap = { .readable_reg = cs47l90_32bit_readable_register, .volatile_reg = cs47l90_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l90_32bit_spi_regmap); @@ -2591,6 +2591,6 @@ const struct regmap_config cs47l90_32bit_i2c_regmap = { .readable_reg = cs47l90_32bit_readable_register, .volatile_reg = cs47l90_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l90_32bit_i2c_regmap); -- cgit v1.2.3 From 9300b1e5c640e3a44348b676e24d7c288855f0b7 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:24 +0100 Subject: mfd: cs47l92: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the cs47l92 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-6-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/cs47l92-tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/cs47l92-tables.c b/drivers/mfd/cs47l92-tables.c index f296e355df4d..4d9ba865aaf6 100644 --- a/drivers/mfd/cs47l92-tables.c +++ b/drivers/mfd/cs47l92-tables.c @@ -1890,7 +1890,7 @@ const struct regmap_config cs47l92_16bit_spi_regmap = { .readable_reg = &cs47l92_16bit_readable_register, .volatile_reg = &cs47l92_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l92_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l92_reg_default), }; @@ -1907,7 +1907,7 @@ const struct regmap_config cs47l92_16bit_i2c_regmap = { .readable_reg = &cs47l92_16bit_readable_register, .volatile_reg = &cs47l92_16bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = cs47l92_reg_default, .num_reg_defaults = ARRAY_SIZE(cs47l92_reg_default), }; @@ -1926,7 +1926,7 @@ const struct regmap_config cs47l92_32bit_spi_regmap = { .readable_reg = &cs47l92_32bit_readable_register, .volatile_reg = &cs47l92_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l92_32bit_spi_regmap); @@ -1942,6 +1942,6 @@ const struct regmap_config cs47l92_32bit_i2c_regmap = { .readable_reg = &cs47l92_32bit_readable_register, .volatile_reg = &cs47l92_32bit_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; EXPORT_SYMBOL_GPL(cs47l92_32bit_i2c_regmap); -- cgit v1.2.3 From 85627565a4b796d5116d74bb7e6dc3f720b22994 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:25 +0100 Subject: mfd: wm5102: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wm5102 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-7-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/wm5102-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c index 6bba39657991..f77ecc635b6f 100644 --- a/drivers/mfd/wm5102-tables.c +++ b/drivers/mfd/wm5102-tables.c @@ -1938,7 +1938,7 @@ const struct regmap_config wm5102_i2c_regmap = { .readable_reg = wm5102_readable_register, .volatile_reg = wm5102_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5102_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5102_reg_default), }; -- cgit v1.2.3 From 4207abf35e6d3a019f44a0fceb7c21eb9b72c56f Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:26 +0100 Subject: mfd: wm5110: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wm5110 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-8-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/wm5110-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index 65b9b1d6daec..eba324875afd 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c @@ -3218,7 +3218,7 @@ const struct regmap_config wm5110_i2c_regmap = { .readable_reg = wm5110_readable_register, .volatile_reg = wm5110_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5110_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5110_reg_default), }; -- cgit v1.2.3 From 3d14b0f733b455ed05d87f3d5f420def11c9166f Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:27 +0100 Subject: mfd: wm8994: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wm8994 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-9-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/wm8994-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index cd4fef7df336..ee2ed6773afd 100644 --- a/drivers/mfd/wm8994-regmap.c +++ b/drivers/mfd/wm8994-regmap.c @@ -1238,7 +1238,7 @@ struct regmap_config wm1811_regmap_config = { .reg_bits = 16, .val_bits = 16, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm1811_defaults, .num_reg_defaults = ARRAY_SIZE(wm1811_defaults), @@ -1253,7 +1253,7 @@ struct regmap_config wm8994_regmap_config = { .reg_bits = 16, .val_bits = 16, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm8994_defaults, .num_reg_defaults = ARRAY_SIZE(wm8994_defaults), @@ -1268,7 +1268,7 @@ struct regmap_config wm8958_regmap_config = { .reg_bits = 16, .val_bits = 16, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm8958_defaults, .num_reg_defaults = ARRAY_SIZE(wm8958_defaults), -- cgit v1.2.3 From 56b8cea6803326c16c713d60088664633f82ee05 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:28 +0100 Subject: mfd: wm8997: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wm8997 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-10-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/wm8997-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/wm8997-tables.c b/drivers/mfd/wm8997-tables.c index 3476787c485e..288c57b2d21e 100644 --- a/drivers/mfd/wm8997-tables.c +++ b/drivers/mfd/wm8997-tables.c @@ -1523,7 +1523,7 @@ const struct regmap_config wm8997_i2c_regmap = { .readable_reg = wm8997_readable_register, .volatile_reg = wm8997_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm8997_reg_default, .num_reg_defaults = ARRAY_SIZE(wm8997_reg_default), }; -- cgit v1.2.3 From 9855e7cd6563e01bb95e58d612d4ad72e167bdbf Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 13 Jul 2023 01:49:29 +0100 Subject: mfd: wm8998: Update to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wm8998 driver to use the more modern data structure. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230713-mfd-cirrus-maple-v1-11-16dacae402a8@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/wm8998-tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/wm8998-tables.c b/drivers/mfd/wm8998-tables.c index 9b34a6d76094..b3e6e85bee89 100644 --- a/drivers/mfd/wm8998-tables.c +++ b/drivers/mfd/wm8998-tables.c @@ -1556,7 +1556,7 @@ const struct regmap_config wm8998_i2c_regmap = { .readable_reg = wm8998_readable_register, .volatile_reg = wm8998_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm8998_reg_default, .num_reg_defaults = ARRAY_SIZE(wm8998_reg_default), }; -- cgit v1.2.3 From dc0c386e09a701e3c7c2dd58799cee992fa4e4b6 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 14 Jul 2023 11:47:27 -0600 Subject: mfd: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230714174731.4059811-1-robh@kernel.org Signed-off-by: Lee Jones --- drivers/mfd/ab8500-core.c | 1 - drivers/mfd/acer-ec-a500.c | 2 +- drivers/mfd/act8945a.c | 2 +- drivers/mfd/altera-sysmgr.c | 3 +-- drivers/mfd/arizona-core.c | 1 - drivers/mfd/atc260x-core.c | 1 - drivers/mfd/bcm590xx.c | 1 - drivers/mfd/cros_ec_dev.c | 2 +- drivers/mfd/da9052-i2c.c | 5 +---- drivers/mfd/da9055-i2c.c | 1 - drivers/mfd/da9062-core.c | 2 +- drivers/mfd/hi655x-pmic.c | 4 ++-- drivers/mfd/iqs62x.c | 2 +- drivers/mfd/lp873x.c | 2 +- drivers/mfd/madera-i2c.c | 1 - drivers/mfd/madera-spi.c | 1 - drivers/mfd/max77620.c | 1 - drivers/mfd/max77686.c | 1 - drivers/mfd/max77843.c | 2 +- drivers/mfd/max8907.c | 1 - drivers/mfd/max8925-core.c | 1 - drivers/mfd/max8997.c | 1 - drivers/mfd/max8998.c | 1 - drivers/mfd/mt6358-irq.c | 5 ++--- drivers/mfd/mt6397-core.c | 5 +++-- drivers/mfd/mt6397-irq.c | 5 ++--- drivers/mfd/palmas.c | 3 ++- drivers/mfd/qcom-pm8008.c | 2 +- drivers/mfd/rave-sp.c | 2 +- drivers/mfd/rk8xx-core.c | 2 +- drivers/mfd/rohm-bd71828.c | 2 +- drivers/mfd/rohm-bd718x7.c | 2 +- drivers/mfd/rohm-bd9576.c | 2 +- drivers/mfd/rt5033.c | 2 +- drivers/mfd/rz-mtu3.c | 4 +++- drivers/mfd/sec-core.c | 2 -- drivers/mfd/sprd-sc27xx-spi.c | 2 +- drivers/mfd/ssbi.c | 6 +++--- drivers/mfd/stm32-lptimer.c | 1 + drivers/mfd/stm32-timers.c | 1 + drivers/mfd/sun4i-gpadc.c | 4 ++-- drivers/mfd/ti-lmu.c | 1 - drivers/mfd/ti_am335x_tscadc.c | 2 +- drivers/mfd/tps6507x.c | 1 - drivers/mfd/tps65090.c | 1 - drivers/mfd/tps65217.c | 1 - drivers/mfd/tps65218.c | 1 - drivers/mfd/tps6594-core.c | 2 +- drivers/mfd/twl6040.c | 2 -- drivers/mfd/wm831x-core.c | 3 +-- drivers/mtd/chips/cfi_cmdset_0002.c | 3 +-- 51 files changed, 42 insertions(+), 66 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 9d9e9787d5e8..15c95828b09a 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -21,7 +21,6 @@ #include #include #include -#include /* * Interrupt register offsets diff --git a/drivers/mfd/acer-ec-a500.c b/drivers/mfd/acer-ec-a500.c index feb757e90dc3..79405835ff8e 100644 --- a/drivers/mfd/acer-ec-a500.c +++ b/drivers/mfd/acer-ec-a500.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/act8945a.c b/drivers/mfd/act8945a.c index 2406fcdff5f9..64876537f066 100644 --- a/drivers/mfd/act8945a.c +++ b/drivers/mfd/act8945a.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include static const struct mfd_cell act8945a_devs[] = { diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c index af205813b281..0e52bd2ebd74 100644 --- a/drivers/mfd/altera-sysmgr.c +++ b/drivers/mfd/altera-sysmgr.c @@ -14,8 +14,7 @@ #include #include #include -#include -#include +#include #include #include diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c index c166fcd331f1..19a0adf8ce3d 100644 --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/mfd/atc260x-core.c b/drivers/mfd/atc260x-core.c index 7c5de3ae776e..67473b58b03d 100644 --- a/drivers/mfd/atc260x-core.c +++ b/drivers/mfd/atc260x-core.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #define ATC260X_CHIP_REV_MAX 31 diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c index 9f39b46b87f4..92eede9a5e61 100644 --- a/drivers/mfd/bcm590xx.c +++ b/drivers/mfd/bcm590xx.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c index 92f4dfccc3cc..79d393b602bf 100644 --- a/drivers/mfd/cros_ec_dev.c +++ b/drivers/mfd/cros_ec_dev.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c index 541e2d47677e..fd000a21bcba 100644 --- a/drivers/mfd/da9052-i2c.c +++ b/drivers/mfd/da9052-i2c.c @@ -13,14 +13,11 @@ #include #include #include +#include #include #include -#ifdef CONFIG_OF -#include -#include -#endif /* I2C safe register check */ static inline bool i2c_safe_reg(unsigned char reg) diff --git a/drivers/mfd/da9055-i2c.c b/drivers/mfd/da9055-i2c.c index bbaf4f07f274..9a5f51b60bad 100644 --- a/drivers/mfd/da9055-i2c.c +++ b/drivers/mfd/da9055-i2c.c @@ -11,7 +11,6 @@ #include #include #include -#include #include diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c index 48f58b6f5629..45da007d3e70 100644 --- a/drivers/mfd/da9062-core.c +++ b/drivers/mfd/da9062-core.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c index 98ae40ee3f05..8feae8d8fd9d 100644 --- a/drivers/mfd/hi655x-pmic.c +++ b/drivers/mfd/hi655x-pmic.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -162,7 +162,7 @@ MODULE_DEVICE_TABLE(of, hi655x_pmic_match); static struct platform_driver hi655x_pmic_driver = { .driver = { .name = "hi655x-pmic", - .of_match_table = of_match_ptr(hi655x_pmic_match), + .of_match_table = hi655x_pmic_match, }, .probe = hi655x_pmic_probe, .remove = hi655x_pmic_remove, diff --git a/drivers/mfd/iqs62x.c b/drivers/mfd/iqs62x.c index dfe9cb79e6a1..e03b4d38fbb0 100644 --- a/drivers/mfd/iqs62x.c +++ b/drivers/mfd/iqs62x.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mfd/lp873x.c b/drivers/mfd/lp873x.c index 6639f0fad4ea..de7ab7aed3c6 100644 --- a/drivers/mfd/lp873x.c +++ b/drivers/mfd/lp873x.c @@ -7,8 +7,8 @@ #include #include +#include #include -#include #include #include diff --git a/drivers/mfd/madera-i2c.c b/drivers/mfd/madera-i2c.c index 0968aa9733ac..a404ea26bc79 100644 --- a/drivers/mfd/madera-i2c.c +++ b/drivers/mfd/madera-i2c.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mfd/madera-spi.c b/drivers/mfd/madera-spi.c index da84eb50e53a..ad07ebe29e59 100644 --- a/drivers/mfd/madera-spi.c +++ b/drivers/mfd/madera-spi.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index 5811ed8f4840..e63e8e47d908 100644 --- a/drivers/mfd/max77620.c +++ b/drivers/mfd/max77620.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index 01833086ca7d..91c286c4571c 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c @@ -20,7 +20,6 @@ #include #include #include -#include static const struct mfd_cell max77686_devs[] = { { .name = "max77686-pmic", }, diff --git a/drivers/mfd/max77843.c b/drivers/mfd/max77843.c index b3689c13a14d..fcff0c498c0f 100644 --- a/drivers/mfd/max77843.c +++ b/drivers/mfd/max77843.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include static const struct mfd_cell max77843_devs[] = { diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c index 78b5ee688dec..8bbe7979db91 100644 --- a/drivers/mfd/max8907.c +++ b/drivers/mfd/max8907.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c index 0246bbe80354..105d79b91493 100644 --- a/drivers/mfd/max8925-core.c +++ b/drivers/mfd/max8925-core.c @@ -17,7 +17,6 @@ #include #include #include -#include static const struct resource bk_resources[] = { { 0x84, 0x84, "mode control", IORESOURCE_REG, }, diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 94c09a5eab32..110bef71f208 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 33a3ec5464fb..4cc426a6c767 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c index 389756436af6..49830b526ee8 100644 --- a/drivers/mfd/mt6358-irq.c +++ b/drivers/mfd/mt6358-irq.c @@ -3,6 +3,8 @@ // Copyright (c) 2020 MediaTek Inc. #include +#include +#include #include #include #include @@ -11,9 +13,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index f6c1f80f94a4..4449dde05021 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -6,9 +6,10 @@ #include #include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/mfd/mt6397-irq.c b/drivers/mfd/mt6397-irq.c index 72f923e47752..886745b5b607 100644 --- a/drivers/mfd/mt6397-irq.c +++ b/drivers/mfd/mt6397-irq.c @@ -3,10 +3,9 @@ // Copyright (c) 2019 MediaTek Inc. #include +#include +#include #include -#include -#include -#include #include #include #include diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index a36f12402987..6e562bab62e4 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -18,7 +18,8 @@ #include #include #include -#include +#include +#include static const struct regmap_config palmas_regmap_config[PALMAS_NUM_CLIENTS] = { { diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c index 94a8cca1d955..3ac3742f438b 100644 --- a/drivers/mfd/qcom-pm8008.c +++ b/drivers/mfd/qcom-pm8008.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index 545196c85b5c..da50eba10014 100644 --- a/drivers/mfd/rave-sp.c +++ b/drivers/mfd/rave-sp.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c index e8fc9e2ab1d0..11a831e92da8 100644 --- a/drivers/mfd/rk8xx-core.c +++ b/drivers/mfd/rk8xx-core.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c index 93d80a79b901..594718f7e8e1 100644 --- a/drivers/mfd/rohm-bd71828.c +++ b/drivers/mfd/rohm-bd71828.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/rohm-bd718x7.c b/drivers/mfd/rohm-bd718x7.c index 0b58ecc78334..4798bdf27afb 100644 --- a/drivers/mfd/rohm-bd718x7.c +++ b/drivers/mfd/rohm-bd718x7.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/rohm-bd9576.c b/drivers/mfd/rohm-bd9576.c index 645673322ec0..bceac7016740 100644 --- a/drivers/mfd/rohm-bd9576.c +++ b/drivers/mfd/rohm-bd9576.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/rt5033.c b/drivers/mfd/rt5033.c index 67b0a228db24..7e23ab3d5842 100644 --- a/drivers/mfd/rt5033.c +++ b/drivers/mfd/rt5033.c @@ -10,9 +10,9 @@ */ #include +#include #include #include -#include #include #include #include diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c index 037956f0254b..0156e381fe07 100644 --- a/drivers/mfd/rz-mtu3.c +++ b/drivers/mfd/rz-mtu3.c @@ -12,7 +12,9 @@ #include #include #include -#include +#include +#include +#include #include #include diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index d2f631901886..a6b0d7300b2d 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -10,8 +10,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c index d21f32cc784d..81e517cdfb27 100644 --- a/drivers/mfd/sprd-sc27xx-spi.c +++ b/drivers/mfd/sprd-sc27xx-spi.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c index dee89db3471d..b0b0be483dbf 100644 --- a/drivers/mfd/ssbi.c +++ b/drivers/mfd/ssbi.c @@ -14,12 +14,12 @@ #include #include #include +#include +#include +#include #include #include #include -#include -#include -#include /* SSBI 2.0 controller registers */ #define SSBI2_CMD 0x0008 diff --git a/drivers/mfd/stm32-lptimer.c b/drivers/mfd/stm32-lptimer.c index fa322f4412c8..b2704a9809c7 100644 --- a/drivers/mfd/stm32-lptimer.c +++ b/drivers/mfd/stm32-lptimer.c @@ -9,6 +9,7 @@ #include #include #include +#include #define STM32_LPTIM_MAX_REGISTER 0x3fc diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c index dc0cd0808736..732a28db80fa 100644 --- a/drivers/mfd/stm32-timers.c +++ b/drivers/mfd/stm32-timers.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #define STM32_TIMERS_MAX_REGISTERS 0x3fc diff --git a/drivers/mfd/sun4i-gpadc.c b/drivers/mfd/sun4i-gpadc.c index d1cbea27b136..3029d48e982c 100644 --- a/drivers/mfd/sun4i-gpadc.c +++ b/drivers/mfd/sun4i-gpadc.c @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/drivers/mfd/ti-lmu.c b/drivers/mfd/ti-lmu.c index 4f06adad7b5e..cfc9f88b9842 100644 --- a/drivers/mfd/ti-lmu.c +++ b/drivers/mfd/ti-lmu.c @@ -17,7 +17,6 @@ #include #include #include -#include #include struct ti_lmu_data { diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 570bc2d33e2b..b88eb70c17b3 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/tps6507x.c b/drivers/mfd/tps6507x.c index 9716bf703c7a..95dafb0e9f00 100644 --- a/drivers/mfd/tps6507x.c +++ b/drivers/mfd/tps6507x.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index a35ad70755fb..9245e11219f3 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #define NUM_INT_REG 2 diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 60599291b315..029ecc32f078 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c index 619bf7adb20c..11e4e52b56be 100644 --- a/drivers/mfd/tps65218.c +++ b/drivers/mfd/tps65218.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/mfd/tps6594-core.c b/drivers/mfd/tps6594-core.c index 15f314833207..0fb9c5cf213a 100644 --- a/drivers/mfd/tps6594-core.c +++ b/drivers/mfd/tps6594-core.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index d85675a4d9a8..9ce34dfd99b3 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index e86b6a4896a6..e7e68929275e 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c @@ -15,8 +15,7 @@ #include #include #include -#include -#include +#include #include #include diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 153fb8d0008e..df589d9b4d70 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -650,7 +649,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) /* * Valid primary extension versions are: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 - * see: http://cs.ozerki.net/zap/pub/axim-x5/docs/cfi_r20.pdf, page 19 + * see: http://cs.ozerki.net/zap/pub/axim-x5/docs/cfi_r20.pdf, page 19 * http://www.spansion.com/Support/AppNotes/cfi_100_20011201.pdf * http://www.spansion.com/Support/Datasheets/s29ws-p_00_a12_e.pdf * http://www.spansion.com/Support/Datasheets/S29GL_128S_01GS_00_02_e.pdf -- cgit v1.2.3 From 94f34d99401c23247f940e9d1b6408236a3a3769 Mon Sep 17 00:00:00 2001 From: Biju Das Date: Tue, 18 Jul 2023 14:43:14 +0100 Subject: mfd: rz-mtu3: Fix COMPILE_TEST build error When (MFD) RZ_MTU3=m and PWM_RZ_MTU3=y, It hits the below error aarch64-linux-gnu-ld: rz-mtu3.c:(.text+0x544): undefined reference to `mfd_remove_devices' Fix this issue by selecting MFD_CORE. Reported-by: Uwe Kleine-König Closes: https://lore.kernel.org/linux-pwm/20230718090023.wo6m6ffzaifgctkj@pengutronix.de/ Suggested-by: Uwe Kleine-König Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230718134314.118333-1-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones --- drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index a3875d983b9f..aea95745c73f 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1373,6 +1373,7 @@ config MFD_SC27XX_PMIC config RZ_MTU3 tristate "Renesas RZ/G2L MTU3a core driver" depends on (ARCH_RZG2L && OF) || COMPILE_TEST + select MFD_CORE help Select this option to enable Renesas RZ/G2L MTU3a core driver for the Multi-Function Timer Pulse Unit 3 (MTU3a) hardware available -- cgit v1.2.3 From f1a63db65e456263fa10d8a52aed652f392f22ce Mon Sep 17 00:00:00 2001 From: Chengfeng Ye Date: Thu, 20 Jul 2023 07:13:30 +0000 Subject: mfd: qcom-pm8xxx: Fix potential deadlock on &chip->pm_irq_lock As &chip->pm_irq_lock is acquired by pm8xxx_irq_handler() under irq context, other process context code should disable irq before acquiring the lock. Since .irq_set_type and .irq_get_irqchip_state callbacks are generally executed from process context without irq disabled by default, the same lock acquision should disable irq. Possible deadlock scenario pm8xxx_irq_set_type() -> pm8xxx_config_irq() -> spin_lock(&chip->pm_irq_lock) -> pm8xxx_irq_handler() -> pm8xxx_irq_master_handler() -> pm8xxx_irq_block_handler() -> pm8xxx_read_block_irq() -> spin_lock(&chip->pm_irq_lock) (deadlock here) This flaw was found using an experimental static analysis tool we are developing for irq-related deadlock. Fix the potential deadlock by spin_lock_irqsave(). Signed-off-by: Chengfeng Ye Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230720071330.50382-1-dg573847474@gmail.com Signed-off-by: Lee Jones --- drivers/mfd/qcom-pm8xxx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/qcom-pm8xxx.c b/drivers/mfd/qcom-pm8xxx.c index 9a948df8c28d..07c531bd1236 100644 --- a/drivers/mfd/qcom-pm8xxx.c +++ b/drivers/mfd/qcom-pm8xxx.c @@ -103,8 +103,9 @@ static int pm8xxx_config_irq(struct pm_irq_chip *chip, unsigned int bp, unsigned int cp) { int rc; + unsigned long flags; - spin_lock(&chip->pm_irq_lock); + spin_lock_irqsave(&chip->pm_irq_lock, flags); rc = regmap_write(chip->regmap, SSBI_REG_ADDR_IRQ_BLK_SEL, bp); if (rc) { pr_err("Failed Selecting Block %d rc=%d\n", bp, rc); @@ -116,7 +117,7 @@ pm8xxx_config_irq(struct pm_irq_chip *chip, unsigned int bp, unsigned int cp) if (rc) pr_err("Failed Configuring IRQ rc=%d\n", rc); bail: - spin_unlock(&chip->pm_irq_lock); + spin_unlock_irqrestore(&chip->pm_irq_lock, flags); return rc; } @@ -321,6 +322,7 @@ static int pm8xxx_irq_get_irqchip_state(struct irq_data *d, struct pm_irq_chip *chip = irq_data_get_irq_chip_data(d); unsigned int pmirq = irqd_to_hwirq(d); unsigned int bits; + unsigned long flags; int irq_bit; u8 block; int rc; @@ -331,7 +333,7 @@ static int pm8xxx_irq_get_irqchip_state(struct irq_data *d, block = pmirq / 8; irq_bit = pmirq % 8; - spin_lock(&chip->pm_irq_lock); + spin_lock_irqsave(&chip->pm_irq_lock, flags); rc = regmap_write(chip->regmap, SSBI_REG_ADDR_IRQ_BLK_SEL, block); if (rc) { pr_err("Failed Selecting Block %d rc=%d\n", block, rc); @@ -346,7 +348,7 @@ static int pm8xxx_irq_get_irqchip_state(struct irq_data *d, *state = !!(bits & BIT(irq_bit)); bail: - spin_unlock(&chip->pm_irq_lock); + spin_unlock_irqrestore(&chip->pm_irq_lock, flags); return rc; } -- cgit v1.2.3 From 10d3340441bd0db857fc7fcb1733a800acf47a3d Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 19 Jul 2023 11:02:23 +0200 Subject: mfd: rz-mtu3: Link time dependencies The new set of drivers for RZ/G2L MTU3a tries to enable compile-testing the individual client drivers even when the MFD portion is disabled but gets it wrong, causing a link failure when the core is in a loadable module but the other drivers are built-in: x86_64-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function `rz_mtu3_pwm_apply': pwm-rz-mtu3.c:(.text+0x4bf): undefined reference to `rz_mtu3_8bit_ch_write' x86_64-linux-ld: pwm-rz-mtu3.c:(.text+0x509): undefined reference to `rz_mtu3_disable' arm-linux-gnueabi-ld: drivers/counter/rz-mtu3-cnt.o: in function `rz_mtu3_cascade_counts_enable_get': rz-mtu3-cnt.c:(.text+0xbec): undefined reference to `rz_mtu3_shared_reg_read' It seems better not to add the extra complexity here but instead just use a normal hard dependency, so remove the #else portion in the header along with the "|| COMPILE_TEST". This could also be fixed by having slightly more elaborate Kconfig dependencies or using the cursed 'IS_REACHABLE()' helper, but in practice it's already possible to compile-test all these drivers by enabling the mtd portion. Fixes: 254d3a727421c ("pwm: Add Renesas RZ/G2L MTU3a PWM driver") Fixes: 0be8907359df4 ("counter: Add Renesas RZ/G2L MTU3a counter driver") Fixes: 654c293e1687b ("mfd: Add Renesas RZ/G2L MTU3a core driver") Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20230719090430.1925182-1-arnd@kernel.org Signed-off-by: Lee Jones --- drivers/counter/Kconfig | 2 +- drivers/pwm/Kconfig | 2 +- include/linux/mfd/rz-mtu3.h | 66 --------------------------------------------- 3 files changed, 2 insertions(+), 68 deletions(-) (limited to 'drivers') diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig index bca21df51168..62f118173355 100644 --- a/drivers/counter/Kconfig +++ b/drivers/counter/Kconfig @@ -92,7 +92,7 @@ config MICROCHIP_TCB_CAPTURE config RZ_MTU3_CNT tristate "Renesas RZ/G2L MTU3a counter driver" - depends on RZ_MTU3 || COMPILE_TEST + depends on RZ_MTU3 help Enable support for MTU3a counter driver found on Renesas RZ/G2L alike SoCs. This IP supports both 16-bit and 32-bit phase counting mode diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index 6210babb0741..8ebcddf91f7b 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -505,7 +505,7 @@ config PWM_ROCKCHIP config PWM_RZ_MTU3 tristate "Renesas RZ/G2L MTU3a PWM Timer support" - depends on RZ_MTU3 || COMPILE_TEST + depends on RZ_MTU3 depends on HAS_IOMEM help This driver exposes the MTU3a PWM Timer controller found in Renesas diff --git a/include/linux/mfd/rz-mtu3.h b/include/linux/mfd/rz-mtu3.h index c5173bc06270..8421d49500bf 100644 --- a/include/linux/mfd/rz-mtu3.h +++ b/include/linux/mfd/rz-mtu3.h @@ -151,7 +151,6 @@ struct rz_mtu3 { void *priv_data; }; -#if IS_ENABLED(CONFIG_RZ_MTU3) static inline bool rz_mtu3_request_channel(struct rz_mtu3_channel *ch) { mutex_lock(&ch->lock); @@ -188,70 +187,5 @@ void rz_mtu3_32bit_ch_write(struct rz_mtu3_channel *ch, u16 off, u32 val); void rz_mtu3_shared_reg_write(struct rz_mtu3_channel *ch, u16 off, u16 val); void rz_mtu3_shared_reg_update_bit(struct rz_mtu3_channel *ch, u16 off, u16 pos, u8 val); -#else -static inline bool rz_mtu3_request_channel(struct rz_mtu3_channel *ch) -{ - return false; -} - -static inline void rz_mtu3_release_channel(struct rz_mtu3_channel *ch) -{ -} - -static inline bool rz_mtu3_is_enabled(struct rz_mtu3_channel *ch) -{ - return false; -} - -static inline void rz_mtu3_disable(struct rz_mtu3_channel *ch) -{ -} - -static inline int rz_mtu3_enable(struct rz_mtu3_channel *ch) -{ - return 0; -} - -static inline u8 rz_mtu3_8bit_ch_read(struct rz_mtu3_channel *ch, u16 off) -{ - return 0; -} - -static inline u16 rz_mtu3_16bit_ch_read(struct rz_mtu3_channel *ch, u16 off) -{ - return 0; -} - -static inline u32 rz_mtu3_32bit_ch_read(struct rz_mtu3_channel *ch, u16 off) -{ - return 0; -} - -static inline u16 rz_mtu3_shared_reg_read(struct rz_mtu3_channel *ch, u16 off) -{ - return 0; -} - -static inline void rz_mtu3_8bit_ch_write(struct rz_mtu3_channel *ch, u16 off, u8 val) -{ -} - -static inline void rz_mtu3_16bit_ch_write(struct rz_mtu3_channel *ch, u16 off, u16 val) -{ -} - -static inline void rz_mtu3_32bit_ch_write(struct rz_mtu3_channel *ch, u16 off, u32 val) -{ -} - -static inline void rz_mtu3_shared_reg_write(struct rz_mtu3_channel *ch, u16 off, u16 val) -{ -} - -static inline void rz_mtu3_shared_reg_update_bit(struct rz_mtu3_channel *ch, - u16 off, u16 pos, u8 val) -{ -} -#endif #endif /* __MFD_RZ_MTU3_H__ */ -- cgit v1.2.3 From 8cce9c4cdfd2622955d0e77dd60effddc5bc61d4 Mon Sep 17 00:00:00 2001 From: Yang Li Date: Thu, 10 Aug 2023 08:59:38 +0800 Subject: mfd: rz-mtu3: Remove duplicated include module.h ./drivers/mfd/rz-mtu3.c: linux/module.h is included more than once. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230810005938.12519-1-yang.lee@linux.alibaba.com Signed-off-by: Lee Jones --- drivers/mfd/rz-mtu3.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c index 0156e381fe07..d25109da2f39 100644 --- a/drivers/mfd/rz-mtu3.c +++ b/drivers/mfd/rz-mtu3.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 87ea8c7e2d1981f9a05c1bbeb3d99861ae1ea8fb Mon Sep 17 00:00:00 2001 From: Li Zetao Date: Thu, 17 Aug 2023 19:45:05 +0800 Subject: mfd: ipaq-micro: Remove unused variable i in micro_rx_msg() There is a warning reported by kernel test robot: drivers/mfd/ipaq-micro.c:81:6: warning: unused variable ‘i’ [-Wunused-variable] Since the commit 92d82d76c842 ("mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer"), the variable 'i' is unused. Remove it to silence the warning. Reported-by: kernelci.org bot Closes: https://lore.kernel.org/all/64c8aeac.170a0220.e3234.2745@mx.google.com/ Signed-off-by: Li Zetao Link: https://lore.kernel.org/r/20230817114505.1810920-1-lizetao1@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/ipaq-micro.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index cddfd2e808f2..c964ea6539aa 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -78,8 +78,6 @@ EXPORT_SYMBOL(ipaq_micro_tx_msg); static void micro_rx_msg(struct ipaq_micro *micro, u8 id, int len, u8 *data) { - int i; - dev_dbg(micro->dev, "RX msg: %02x, %d bytes\n", id, len); spin_lock(µ->lock); -- cgit v1.2.3 From 8e922937a78d9683fe8372d8e6b02f145eb451e4 Mon Sep 17 00:00:00 2001 From: Ruan Jinjie Date: Tue, 8 Aug 2023 21:00:02 +0800 Subject: mfd: tc3589x: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, it is not necessary to use of_match_ptr() here. Signed-off-by: Ruan Jinjie Link: https://lore.kernel.org/r/20230808130003.4076702-1-ruanjinjie@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/tc3589x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 16df64e3c0be..28125599fea4 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -483,7 +483,7 @@ static struct i2c_driver tc3589x_driver = { .driver = { .name = "tc3589x", .pm = pm_sleep_ptr(&tc3589x_dev_pm_ops), - .of_match_table = of_match_ptr(tc3589x_match), + .of_match_table = tc3589x_match, }, .probe = tc3589x_probe, .remove = tc3589x_remove, -- cgit v1.2.3 From e158e08a76a5342f8791efb6583dad656279203b Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:16 +0800 Subject: mfd: rsmu_i2c: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Link: https://lore.kernel.org/r/20230808130023.202700-2-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/rsmu_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/rsmu_i2c.c b/drivers/mfd/rsmu_i2c.c index 26972a5aff45..06d78a1cf1cc 100644 --- a/drivers/mfd/rsmu_i2c.c +++ b/drivers/mfd/rsmu_i2c.c @@ -277,7 +277,7 @@ MODULE_DEVICE_TABLE(of, rsmu_i2c_of_match); static struct i2c_driver rsmu_i2c_driver = { .driver = { .name = "rsmu-i2c", - .of_match_table = of_match_ptr(rsmu_i2c_of_match), + .of_match_table = rsmu_i2c_of_match, }, .probe = rsmu_i2c_probe, .remove = rsmu_i2c_remove, -- cgit v1.2.3 From 23fa9421f8b1f6d083f87a6e63d95813110195ac Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:17 +0800 Subject: mfd: altera-a10sr: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Link: https://lore.kernel.org/r/20230808130023.202700-3-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/altera-a10sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/altera-a10sr.c b/drivers/mfd/altera-a10sr.c index 34ef526f4aee..d53e433ab5c1 100644 --- a/drivers/mfd/altera-a10sr.c +++ b/drivers/mfd/altera-a10sr.c @@ -163,7 +163,7 @@ static struct spi_driver altr_a10sr_spi_driver = { .probe = altr_a10sr_spi_probe, .driver = { .name = "altr_a10sr", - .of_match_table = of_match_ptr(altr_a10sr_spi_of_match), + .of_match_table = altr_a10sr_spi_of_match, }, .id_table = altr_a10sr_spi_ids, }; -- cgit v1.2.3 From 6192a8a17979a7bc4dca3e0059b121de536bb726 Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:18 +0800 Subject: mfd: rsmu_spi: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Link: https://lore.kernel.org/r/20230808130023.202700-4-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/rsmu_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c index a4a595bb8d0d..ca0a1202c3ce 100644 --- a/drivers/mfd/rsmu_spi.c +++ b/drivers/mfd/rsmu_spi.c @@ -262,7 +262,7 @@ MODULE_DEVICE_TABLE(of, rsmu_spi_of_match); static struct spi_driver rsmu_spi_driver = { .driver = { .name = "rsmu-spi", - .of_match_table = of_match_ptr(rsmu_spi_of_match), + .of_match_table = rsmu_spi_of_match, }, .probe = rsmu_spi_probe, .remove = rsmu_spi_remove, -- cgit v1.2.3 From 0003732302491e791b97cb858ee900085fc1800e Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:19 +0800 Subject: mfd: act8945a: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Link: https://lore.kernel.org/r/20230808130023.202700-5-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/act8945a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/act8945a.c b/drivers/mfd/act8945a.c index 64876537f066..4e32ac3d573e 100644 --- a/drivers/mfd/act8945a.c +++ b/drivers/mfd/act8945a.c @@ -68,7 +68,7 @@ MODULE_DEVICE_TABLE(of, act8945a_of_match); static struct i2c_driver act8945a_i2c_driver = { .driver = { .name = "act8945a", - .of_match_table = of_match_ptr(act8945a_of_match), + .of_match_table = act8945a_of_match, }, .probe = act8945a_i2c_probe, .id_table = act8945a_i2c_id, -- cgit v1.2.3 From 9425f72ad31e77de33b84df9cd53e33e8a39696f Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:20 +0800 Subject: mfd: stpmic1: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Link: https://lore.kernel.org/r/20230808130023.202700-6-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/stpmic1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/stpmic1.c b/drivers/mfd/stpmic1.c index 3cc7492f828f..c5128fe96cc7 100644 --- a/drivers/mfd/stpmic1.c +++ b/drivers/mfd/stpmic1.c @@ -219,7 +219,7 @@ MODULE_DEVICE_TABLE(of, stpmic1_of_match); static struct i2c_driver stpmic1_driver = { .driver = { .name = "stpmic1", - .of_match_table = of_match_ptr(stpmic1_of_match), + .of_match_table = stpmic1_of_match, .pm = pm_sleep_ptr(&stpmic1_pm), }, .probe = stpmic1_probe, -- cgit v1.2.3 From d20642ad4f0c831e51a9a71835077a766ade7a4d Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:22 +0800 Subject: mfd: lochnagar-i2c: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230808130023.202700-8-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/lochnagar-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/lochnagar-i2c.c b/drivers/mfd/lochnagar-i2c.c index 3c8843117080..59092f839d65 100644 --- a/drivers/mfd/lochnagar-i2c.c +++ b/drivers/mfd/lochnagar-i2c.c @@ -379,7 +379,7 @@ static int lochnagar_i2c_probe(struct i2c_client *i2c) static struct i2c_driver lochnagar_i2c_driver = { .driver = { .name = "lochnagar", - .of_match_table = of_match_ptr(lochnagar_of_match), + .of_match_table = lochnagar_of_match, .suppress_bind_attrs = true, }, .probe = lochnagar_i2c_probe, -- cgit v1.2.3 From 59cf381f1260ba1ae7d70f9e67c6530a5baf79b8 Mon Sep 17 00:00:00 2001 From: Zhu Wang Date: Tue, 8 Aug 2023 21:00:23 +0800 Subject: mfd: rn5t618: Remove redundant of_match_ptr() The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove of_match_ptr() here. Signed-off-by: Zhu Wang Link: https://lore.kernel.org/r/20230808130023.202700-9-wangzhu9@huawei.com Signed-off-by: Lee Jones --- drivers/mfd/rn5t618.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c index 333fef8729a5..0fe616b2db8e 100644 --- a/drivers/mfd/rn5t618.c +++ b/drivers/mfd/rn5t618.c @@ -277,7 +277,7 @@ static SIMPLE_DEV_PM_OPS(rn5t618_i2c_dev_pm_ops, static struct i2c_driver rn5t618_i2c_driver = { .driver = { .name = "rn5t618", - .of_match_table = of_match_ptr(rn5t618_of_match), + .of_match_table = rn5t618_of_match, .pm = &rn5t618_i2c_dev_pm_ops, }, .probe = rn5t618_i2c_probe, -- cgit v1.2.3 From 4db65f45e0ac1d361f351dbeda4c5660f3a4ea38 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:41 +0200 Subject: mfd: stmpe: Fix Wvoid-pointer-to-enum-cast warning 'partnum' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: stmpe-i2c.c:90:13: error: cast to smaller integer type 'enum stmpe_partnum' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/stmpe-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c index 1d7b401776d1..fe018bedab98 100644 --- a/drivers/mfd/stmpe-i2c.c +++ b/drivers/mfd/stmpe-i2c.c @@ -87,7 +87,7 @@ stmpe_i2c_probe(struct i2c_client *i2c) dev_info(&i2c->dev, "matching on node name, compatible is preferred\n"); partnum = id->driver_data; } else - partnum = (enum stmpe_partnum)of_id->data; + partnum = (uintptr_t)of_id->data; return stmpe_probe(&i2c_ci, partnum); } -- cgit v1.2.3 From 0f28379e3a441a594b820c394654afaf0bd415f1 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:42 +0200 Subject: mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning 'dev_type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: max14577.c:406:5: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Link: https://lore.kernel.org/r/20230810095849.123321-2-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/max14577.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index 25ed8846b7fb..1f4f5002595c 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c @@ -402,8 +402,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c) of_id = of_match_device(max14577_dt_match, &i2c->dev); if (of_id) - max14577->dev_type = - (enum maxim_device_type)of_id->data; + max14577->dev_type = (uintptr_t)of_id->data; } else { max14577->dev_type = id->driver_data; } -- cgit v1.2.3 From b1da99664b51c0538bec271e9d9924a3d92e3bd4 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:43 +0200 Subject: mfd: max77541: Fix Wvoid-pointer-to-enum-cast warning 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: max77541.c:176:18: error: cast to smaller integer type 'enum max7754x_ids' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-3-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/max77541.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/max77541.c b/drivers/mfd/max77541.c index e147e949c2b3..10c2e274b4af 100644 --- a/drivers/mfd/max77541.c +++ b/drivers/mfd/max77541.c @@ -173,7 +173,7 @@ static int max77541_probe(struct i2c_client *client) i2c_set_clientdata(client, max77541); max77541->i2c = client; - max77541->id = (enum max7754x_ids)device_get_match_data(dev); + max77541->id = (uintptr_t)device_get_match_data(dev); if (!max77541->id) max77541->id = (enum max7754x_ids)id->driver_data; -- cgit v1.2.3 From b2ee6a378d05016357eba021698f4d3620455312 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:44 +0200 Subject: mfd: hi6421-pmic: Fix Wvoid-pointer-to-enum-cast warning 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: hi6421-pmic-core.c:62:9: error: cast to smaller integer type 'enum hi6421_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-4-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/hi6421-pmic-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/hi6421-pmic-core.c b/drivers/mfd/hi6421-pmic-core.c index cb5cf4a81c06..a6a890537a1e 100644 --- a/drivers/mfd/hi6421-pmic-core.c +++ b/drivers/mfd/hi6421-pmic-core.c @@ -59,7 +59,7 @@ static int hi6421_pmic_probe(struct platform_device *pdev) id = of_match_device(of_hi6421_pmic_match, &pdev->dev); if (!id) return -EINVAL; - type = (enum hi6421_type)id->data; + type = (uintptr_t)id->data; pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); if (!pmic) -- cgit v1.2.3 From aad6c588bdd229034dc1152052f1a1a5aecabb0a Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:45 +0200 Subject: mfd: lp87565: Fix Wvoid-pointer-to-enum-cast warning 'dev_type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: lp87565.c:95:23: error: cast to smaller integer type 'enum lp87565_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-5-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/lp87565.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/lp87565.c b/drivers/mfd/lp87565.c index 88ce4d7c50a7..1b7f8349911d 100644 --- a/drivers/mfd/lp87565.c +++ b/drivers/mfd/lp87565.c @@ -92,7 +92,7 @@ static int lp87565_probe(struct i2c_client *client) of_id = of_match_device(of_lp87565_match_table, &client->dev); if (of_id) - lp87565->dev_type = (enum lp87565_device_type)of_id->data; + lp87565->dev_type = (uintptr_t)of_id->data; i2c_set_clientdata(client, lp87565); -- cgit v1.2.3 From a2ce000265b78054225403e0815f11c7eefe0d58 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:46 +0200 Subject: mfd: tc3589: Fix Wvoid-pointer-to-enum-cast warning 'version' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: tc3589x.c:343:13: error: cast to smaller integer type 'enum tc3589x_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-6-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/tc3589x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 28125599fea4..db28eb0c8995 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -340,7 +340,7 @@ tc3589x_of_probe(struct device *dev, enum tc3589x_version *version) of_id = of_match_device(tc3589x_match, dev); if (!of_id) return ERR_PTR(-ENODEV); - *version = (enum tc3589x_version) of_id->data; + *version = (uintptr_t) of_id->data; for_each_child_of_node(np, child) { if (of_device_is_compatible(child, "toshiba,tc3589x-gpio")) -- cgit v1.2.3 From 5033fb97795f5a21583e77331597cc9dbe7162a9 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:47 +0200 Subject: mfd: wm8994: Fix Wvoid-pointer-to-enum-cast warning 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: wm8994-core.c:631:19: error: cast to smaller integer type 'enum wm8994_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230810095849.123321-7-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/wm8994-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 1e4f1694f065..aba7af688175 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -628,7 +628,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c) if (i2c->dev.of_node) { of_id = of_match_device(wm8994_of_match, &i2c->dev); if (of_id) - wm8994->type = (enum wm8994_type)of_id->data; + wm8994->type = (uintptr_t)of_id->data; } else { wm8994->type = id->driver_data; } -- cgit v1.2.3 From 4e57d1425c7b9bc8e8be47835ac0afc8a94948d0 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:48 +0200 Subject: mfd: wm31x: Fix Wvoid-pointer-to-enum-cast warning 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: wm831x-spi.c:36:10: error: cast to smaller integer type 'enum wm831x_parent' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-8-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/wm831x-i2c.c | 2 +- drivers/mfd/wm831x-spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c index 997837f13180..694ddbbf0372 100644 --- a/drivers/mfd/wm831x-i2c.c +++ b/drivers/mfd/wm831x-i2c.c @@ -36,7 +36,7 @@ static int wm831x_i2c_probe(struct i2c_client *i2c) dev_err(&i2c->dev, "Failed to match device\n"); return -ENODEV; } - type = (enum wm831x_parent)of_id->data; + type = (uintptr_t)of_id->data; } else { type = (enum wm831x_parent)id->driver_data; } diff --git a/drivers/mfd/wm831x-spi.c b/drivers/mfd/wm831x-spi.c index 7bcddccbf155..76be7ef5c970 100644 --- a/drivers/mfd/wm831x-spi.c +++ b/drivers/mfd/wm831x-spi.c @@ -33,7 +33,7 @@ static int wm831x_spi_probe(struct spi_device *spi) dev_err(&spi->dev, "Failed to match device\n"); return -ENODEV; } - type = (enum wm831x_parent)of_id->data; + type = (uintptr_t)of_id->data; } else { type = (enum wm831x_parent)id->driver_data; } -- cgit v1.2.3 From 367124ebb359539fe237899abc6a9c78c6f793b6 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 11:58:49 +0200 Subject: mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning 'soc' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: mxs-lradc.c:145:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810095849.123321-9-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones --- drivers/mfd/mxs-lradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mfd/mxs-lradc.c b/drivers/mfd/mxs-lradc.c index 111d11fd25aa..21f3033d6eb5 100644 --- a/drivers/mfd/mxs-lradc.c +++ b/drivers/mfd/mxs-lradc.c @@ -142,7 +142,7 @@ static int mxs_lradc_probe(struct platform_device *pdev) if (!of_id) return -EINVAL; - lradc->soc = (enum mxs_lradc_id)of_id->data; + lradc->soc = (uintptr_t)of_id->data; lradc->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(lradc->clk)) { -- cgit v1.2.3 From a160d1286b5907603a5d4329f6047709bc423480 Mon Sep 17 00:00:00 2001 From: Biju Das Date: Tue, 15 Aug 2023 08:34:44 +0100 Subject: mfd: rz-mtu3: Reduce critical sections Reduce critical sections on rz_mtu3_start_stop_ch() and rz_mtu3_is_enabled() by moving offset and bitpos computation outside the critical section and drop the 'ret' variable on rz_mtu3_is_enabled() and return 'tstr & BIT(bitpos)' directly. Reported-by: Pavel Machek Closes: https://lore.kernel.org/all/ZIMAse1ikTuycJ02@duo.ucw.cz/ Signed-off-by: Biju Das Reviewed-by: Pavel Machek Link: https://lore.kernel.org/r/20230815073445.9579-2-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones --- drivers/mfd/rz-mtu3.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c index d25109da2f39..44133fc7a8d6 100644 --- a/drivers/mfd/rz-mtu3.c +++ b/drivers/mfd/rz-mtu3.c @@ -252,11 +252,12 @@ static void rz_mtu3_start_stop_ch(struct rz_mtu3_channel *ch, bool start) u16 offset; u8 bitpos; + offset = rz_mtu3_get_tstr_offset(ch); + bitpos = rz_mtu3_get_tstr_bit_pos(ch); + /* start stop register shared by multiple timer channels */ raw_spin_lock_irqsave(&priv->lock, flags); - offset = rz_mtu3_get_tstr_offset(ch); - bitpos = rz_mtu3_get_tstr_bit_pos(ch); tstr = rz_mtu3_shared_reg_read(ch, offset); __assign_bit(bitpos, &tstr, start); rz_mtu3_shared_reg_write(ch, offset, tstr); @@ -269,21 +270,18 @@ bool rz_mtu3_is_enabled(struct rz_mtu3_channel *ch) struct rz_mtu3 *mtu = dev_get_drvdata(ch->dev->parent); struct rz_mtu3_priv *priv = mtu->priv_data; unsigned long flags, tstr; - bool ret = false; u16 offset; u8 bitpos; - /* start stop register shared by multiple timer channels */ - raw_spin_lock_irqsave(&priv->lock, flags); - offset = rz_mtu3_get_tstr_offset(ch); bitpos = rz_mtu3_get_tstr_bit_pos(ch); - tstr = rz_mtu3_shared_reg_read(ch, offset); - ret = tstr & BIT(bitpos); + /* start stop register shared by multiple timer channels */ + raw_spin_lock_irqsave(&priv->lock, flags); + tstr = rz_mtu3_shared_reg_read(ch, offset); raw_spin_unlock_irqrestore(&priv->lock, flags); - return ret; + return tstr & BIT(bitpos); } EXPORT_SYMBOL_GPL(rz_mtu3_is_enabled); -- cgit v1.2.3 From d92df6fb812c5c126d1a3a06034bb2f2bb0e585f Mon Sep 17 00:00:00 2001 From: Biju Das Date: Tue, 15 Aug 2023 08:34:45 +0100 Subject: mfd: rz-mtu3: Replace raw_spin_lock->spin_lock() As per kernel documentation, use raw_spinlock_t only in real critical core code, low-level interrupt handling, and places where disabling preemption or interrupts is required. Here the lock is for concurrent register access from different drivers, hence spin_lock() is sufficient. Reported-by: Pavel Machek Closes: https://lore.kernel.org/all/ZIL%2FitcJvV5s3Bnf@duo.ucw.cz/ Signed-off-by: Biju Das Reviewed-by: Pavel Machek Link: https://lore.kernel.org/r/20230815073445.9579-3-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones --- drivers/mfd/rz-mtu3.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/rz-mtu3.c b/drivers/mfd/rz-mtu3.c index 44133fc7a8d6..f3dac4a29a83 100644 --- a/drivers/mfd/rz-mtu3.c +++ b/drivers/mfd/rz-mtu3.c @@ -22,7 +22,7 @@ struct rz_mtu3_priv { void __iomem *mmio; struct reset_control *rstc; - raw_spinlock_t lock; + spinlock_t lock; }; /******* MTU3 registers (original offset is +0x1200) *******/ @@ -176,11 +176,11 @@ void rz_mtu3_shared_reg_update_bit(struct rz_mtu3_channel *ch, u16 offset, struct rz_mtu3_priv *priv = mtu->priv_data; unsigned long tmdr, flags; - raw_spin_lock_irqsave(&priv->lock, flags); + spin_lock_irqsave(&priv->lock, flags); tmdr = rz_mtu3_shared_reg_read(ch, offset); __assign_bit(pos, &tmdr, !!val); rz_mtu3_shared_reg_write(ch, offset, tmdr); - raw_spin_unlock_irqrestore(&priv->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); } EXPORT_SYMBOL_GPL(rz_mtu3_shared_reg_update_bit); @@ -256,13 +256,13 @@ static void rz_mtu3_start_stop_ch(struct rz_mtu3_channel *ch, bool start) bitpos = rz_mtu3_get_tstr_bit_pos(ch); /* start stop register shared by multiple timer channels */ - raw_spin_lock_irqsave(&priv->lock, flags); + spin_lock_irqsave(&priv->lock, flags); tstr = rz_mtu3_shared_reg_read(ch, offset); __assign_bit(bitpos, &tstr, start); rz_mtu3_shared_reg_write(ch, offset, tstr); - raw_spin_unlock_irqrestore(&priv->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); } bool rz_mtu3_is_enabled(struct rz_mtu3_channel *ch) @@ -277,9 +277,9 @@ bool rz_mtu3_is_enabled(struct rz_mtu3_channel *ch) bitpos = rz_mtu3_get_tstr_bit_pos(ch); /* start stop register shared by multiple timer channels */ - raw_spin_lock_irqsave(&priv->lock, flags); + spin_lock_irqsave(&priv->lock, flags); tstr = rz_mtu3_shared_reg_read(ch, offset); - raw_spin_unlock_irqrestore(&priv->lock, flags); + spin_unlock_irqrestore(&priv->lock, flags); return tstr & BIT(bitpos); } @@ -349,7 +349,7 @@ static int rz_mtu3_probe(struct platform_device *pdev) return PTR_ERR(ddata->clk); reset_control_deassert(priv->rstc); - raw_spin_lock_init(&priv->lock); + spin_lock_init(&priv->lock); platform_set_drvdata(pdev, ddata); for (i = 0; i < RZ_MTU_NUM_CHANNELS; i++) { -- cgit v1.2.3 From 9aab92bc3a8922d4b2e24d10271dfe3034cbf5c2 Mon Sep 17 00:00:00 2001 From: Biju Das Date: Sat, 19 Aug 2023 19:31:55 +0100 Subject: mfd: mc13xxx: Simplify device data fetching in probe() Simplify probe() by replacing of_match_device() and ID lookup for retrieving match data by i2c_get_match_data(). Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230819183155.22335-1-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones --- drivers/mfd/mc13xxx-i2c.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/mfd/mc13xxx-i2c.c b/drivers/mfd/mc13xxx-i2c.c index de59b498c925..6bc0e755ba34 100644 --- a/drivers/mfd/mc13xxx-i2c.c +++ b/drivers/mfd/mc13xxx-i2c.c @@ -53,7 +53,6 @@ static const struct regmap_config mc13xxx_regmap_i2c_config = { static int mc13xxx_i2c_probe(struct i2c_client *client) { - const struct i2c_device_id *id = i2c_client_get_device_id(client); struct mc13xxx *mc13xxx; int ret; @@ -73,13 +72,7 @@ static int mc13xxx_i2c_probe(struct i2c_client *client) return ret; } - if (client->dev.of_node) { - const struct of_device_id *of_id = - of_match_device(mc13xxx_dt_ids, &client->dev); - mc13xxx->variant = of_id->data; - } else { - mc13xxx->variant = (void *)id->driver_data; - } + mc13xxx->variant = i2c_get_match_data(client); return mc13xxx_common_init(&client->dev); } -- cgit v1.2.3