[PATCH 2/2] clocksource/drivers/renesas-ostm: Add RZ/G2L OSTM support

Philipp Zabel p.zabel at pengutronix.de
Wed Nov 10 02:05:30 PST 2021


On Wed, 2021-11-10 at 08:31 +0000, Biju Das wrote:
[...]
> +#ifdef CONFIG_ARCH_R9A07G044
> +static int __init ostm_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct reset_control *rstc;
> +	int ret;
> +
> +	rstc = devm_reset_control_get_exclusive(dev, NULL);
> +	if (IS_ERR(rstc))
> +		return dev_err_probe(dev, PTR_ERR(rstc), "failed to get reset");
> +
> +	reset_control_deassert(rstc);
> +
> +	ret = ostm_init(dev->of_node);
> +	if (ret) {
> +		reset_control_assert(rstc);
> +		return ret;
> +	}
> +
> +	return 0;
> +}
> +
> +static const struct of_device_id ostm_of_table[] = {
> +	{ .compatible = "renesas,rzg2l-ostm", },
> +	{ }
> +};
> +
> +static struct platform_driver ostm_device_driver = {
> +	.driver		= {
> +		.name	= "rzg2l_ostm",
> +		.of_match_table = of_match_ptr(ostm_of_table),
> +	},
> +};
> +builtin_platform_driver_probe(ostm_device_driver, ostm_probe);
> +#endif

I assuming the corresponding reset controller driver is builtin as well.

Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>

regards
Philipp




More information about the linux-arm-kernel mailing list