spi: rspi: Simplify reset control handling
PATCH 1/1 spi: rspi: Simplify reset control handling
Use devm_reset_control_get_optional_exclusive_deasserted() to combine get + deassert + cleanup in a single call, removing the redundant rspi_reset_control_assert() helper.
--- drivers/spi/spi-rspi.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-)
drivers/spi/spi-rspi.c +2 -19
@@ -1226,11 +1226,6 @@ static const struct of_device_id rspi_of_match[] __maybe_unused = {MODULE_DEVICE_TABLE (of, rspi_of_match);#ifdef CONFIG_OF -static void rspi_reset_control_assert (void *data) -{ -reset_control_assert (data); -} -static int rspi_parse_dt (struct device *dev,struct spi_controller *ctlr) {struct reset_control *rstc;
@@ -1246,22 +1241,10 @@ static int rspi_parse_dt(struct device *dev, struct spi_controller *ctlr) ctlr->num_chipselect = num_cs; - rstc =devm_reset_control_get_optional_exclusive (dev,NULL ); + rstc =devm_reset_control_get_optional_exclusive_deasserted (dev,NULL );if (IS_ERR (rstc))return dev_err_probe (dev,PTR_ERR (rstc), -"failed to get reset ctrl\n" ); - - error =reset_control_deassert (rstc); -if (error) { -dev_err (dev,"failed to deassert reset %d\n" , error); -return error; - } - - error =devm_add_action_or_reset (dev, rspi_reset_control_assert, rstc); -if (error) { -dev_err (dev,"failed to register assert devm action, %d\n" , error); -return error; - } +"failed to get reset ctrl and deassert reset\n" );return 0 ; }
---
base-commit: 17c7841d09ee7d33557fd075562d9289b6018c90
change-id: 20260507-rspi-74a3e4665edd
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
Mark Brown
maintainerQuoted 1 line · Felix Gu
spi: rspi: Simplify reset control handling
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.2
Thanks!
[1/1] spi: rspi: Simplify reset control handling
https://git.kernel.org/broonie/sound/c/d3873c5f4d6e
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark