Unverified Commit 25da503e authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'reset-for-v5.14-2' of git://git.pengutronix.de/pza/linux into arm/drivers

Reset controller updates for v5.14, part2

This tag contains a few small fixes, allows to build the Berlin reset
driver as a module, and adds stubs to the reset controller API to allow
compile-testing drivers outside of drivers/reset without enabling the
reset framework.

* tag 'reset-for-v5.14-2' of git://git.pengutronix.de/pza/linux:
  reset: Add compile-test stubs
  reset: berlin: support module build
  reset: bail if try_module_get() fails
  reset: mchp: sparx5: fix return value check in mchp_sparx5_map_io()
  reset: lantiq: use devm_reset_controller_register()
  reset: hi6220: Use the correct HiSilicon copyright

Link: https://lore.kernel.org/r/14d33ac19b2a107e97ce1ab264987b707baa9ba7.camel@pengutronix.de


Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 1eb5f83e 48a74b11
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -43,8 +43,9 @@ config RESET_BCM6345
	  This enables the reset controller driver for BCM6345 SoCs.

config RESET_BERLIN
	bool "Berlin Reset Driver" if COMPILE_TEST
	default ARCH_BERLIN
	tristate "Berlin Reset Driver"
	depends on ARCH_BERLIN || COMPILE_TEST
	default m if ARCH_BERLIN
	help
	  This enables the reset controller driver for Marvell Berlin SoCs.

+4 −1
Original line number Diff line number Diff line
@@ -774,7 +774,10 @@ __reset_control_get_internal(struct reset_controller_dev *rcdev,
	if (!rstc)
		return ERR_PTR(-ENOMEM);

	try_module_get(rcdev->owner);
	if (!try_module_get(rcdev->owner)) {
		kfree(rstc);
		return ERR_PTR(-ENODEV);
	}

	rstc->rcdev = rcdev;
	list_add(&rstc->list, &rcdev->reset_control_head);
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 * Hisilicon Hi6220 reset controller driver
 *
 * Copyright (c) 2016 Linaro Limited.
 * Copyright (c) 2015-2016 Hisilicon Limited.
 * Copyright (c) 2015-2016 HiSilicon Limited.
 *
 * Author: Feng Chen <puck.chen@hisilicon.com>
 */
+8 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
@@ -93,6 +93,7 @@ static const struct of_device_id berlin_reset_dt_match[] = {
	{ .compatible = "marvell,berlin2-reset" },
	{ },
};
MODULE_DEVICE_TABLE(of, berlin_reset_dt_match);

static struct platform_driver berlin_reset_driver = {
	.probe	= berlin2_reset_probe,
@@ -101,4 +102,9 @@ static struct platform_driver berlin_reset_driver = {
		.of_match_table = berlin_reset_dt_match,
	},
};
builtin_platform_driver(berlin_reset_driver);
module_platform_driver(berlin_reset_driver);

MODULE_AUTHOR("Antoine Tenart <antoine.tenart@free-electrons.com>");
MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>");
MODULE_DESCRIPTION("Synaptics Berlin reset controller");
MODULE_LICENSE("GPL");
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ static int lantiq_rcu_reset_probe(struct platform_device *pdev)
	priv->rcdev.of_xlate = lantiq_rcu_reset_xlate;
	priv->rcdev.of_reset_n_cells = 2;

	return reset_controller_register(&priv->rcdev);
	return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
}

static const struct of_device_id lantiq_rcu_reset_dt_ids[] = {
Loading