Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'hwlock-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull hwspinlock updates from Bjorn Andersson:
"Convert u8500 and omap drivers to void-returning remove.

Complete the support for representing the Qualcomm TCSR mutex as a
mmio device, and check the return value of devm_regmap_field_alloc()
in the same"

* tag 'hwlock-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
hwspinlock: u8500: Convert to platform remove callback returning void
hwspinlock: omap: Convert to platform remove callback returning void
hwspinlock: omap: Emit only one error message for errors in .remove()
hwspinlock: add a check of devm_regmap_field_alloc in qcom_hwspinlock_probe

+16 -9
+3 -5
drivers/hwspinlock/omap_hwspinlock.c
··· 145 145 return ret; 146 146 } 147 147 148 - static int omap_hwspinlock_remove(struct platform_device *pdev) 148 + static void omap_hwspinlock_remove(struct platform_device *pdev) 149 149 { 150 150 struct hwspinlock_device *bank = platform_get_drvdata(pdev); 151 151 int ret; ··· 153 153 ret = hwspin_lock_unregister(bank); 154 154 if (ret) { 155 155 dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); 156 - return ret; 156 + return; 157 157 } 158 158 159 159 pm_runtime_disable(&pdev->dev); 160 - 161 - return 0; 162 160 } 163 161 164 162 static const struct of_device_id omap_hwspinlock_of_match[] = { ··· 169 171 170 172 static struct platform_driver omap_hwspinlock_driver = { 171 173 .probe = omap_hwspinlock_probe, 172 - .remove = omap_hwspinlock_remove, 174 + .remove_new = omap_hwspinlock_remove, 173 175 .driver = { 174 176 .name = "omap_hwspinlock", 175 177 .of_match_table = omap_hwspinlock_of_match,
+11
drivers/hwspinlock/qcom_hwspinlock.c
··· 69 69 .unlock = qcom_hwspinlock_unlock, 70 70 }; 71 71 72 + static const struct regmap_config sfpb_mutex_config = { 73 + .reg_bits = 32, 74 + .reg_stride = 4, 75 + .val_bits = 32, 76 + .max_register = 0x100, 77 + .fast_io = true, 78 + }; 79 + 72 80 static const struct qcom_hwspinlock_of_data of_sfpb_mutex = { 73 81 .offset = 0x4, 74 82 .stride = 0x4, 83 + .regmap_config = &sfpb_mutex_config, 75 84 }; 76 85 77 86 static const struct regmap_config tcsr_msm8226_mutex_config = { ··· 206 197 207 198 bank->lock[i].priv = devm_regmap_field_alloc(&pdev->dev, 208 199 regmap, field); 200 + if (IS_ERR(bank->lock[i].priv)) 201 + return PTR_ERR(bank->lock[i].priv); 209 202 } 210 203 211 204 return devm_hwspin_lock_register(&pdev->dev, bank, &qcom_hwspinlock_ops,
+2 -4
drivers/hwspinlock/u8500_hsem.c
··· 120 120 pdata->base_id, num_locks); 121 121 } 122 122 123 - static int u8500_hsem_remove(struct platform_device *pdev) 123 + static void u8500_hsem_remove(struct platform_device *pdev) 124 124 { 125 125 struct hwspinlock_device *bank = platform_get_drvdata(pdev); 126 126 void __iomem *io_base = bank->lock[0].priv - HSEM_REGISTER_OFFSET; 127 127 128 128 /* clear all interrupts */ 129 129 writel(0xFFFF, io_base + HSEM_ICRALL); 130 - 131 - return 0; 132 130 } 133 131 134 132 static struct platform_driver u8500_hsem_driver = { 135 133 .probe = u8500_hsem_probe, 136 - .remove = u8500_hsem_remove, 134 + .remove_new = u8500_hsem_remove, 137 135 .driver = { 138 136 .name = "u8500_hsem", 139 137 },