[PATCH v3 2/3] net: can: rockchip: add can for RK3576 Soc
Krzysztof Kozlowski
krzk at kernel.org
Thu May 22 00:00:13 PDT 2025
On 22/05/2025 08:32, Elaine Zhang wrote:
> }
>
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> priv->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(priv->regs)) {
> err = PTR_ERR(priv->regs);
> @@ -912,13 +1426,46 @@ static int rkcanfd_probe(struct platform_device *pdev)
> priv->can.do_set_mode = rkcanfd_set_mode;
> priv->can.do_get_berr_counter = rkcanfd_get_berr_counter;
> priv->ndev = ndev;
> + priv->dev = &pdev->dev;
>
> match = device_get_match_data(&pdev->dev);
> if (match)
> priv->devtype_data = *(struct rkcanfd_devtype_data *)match;
>
> + if (device_property_read_u32(&pdev->dev, "rockchip,auto-retx-cnt", &val))
No, undocumented ABI. You never tested this or DTS.
> + priv->auto_retx_cnt = 0;
> + else
> + priv->auto_retx_cnt = val;
> + if (priv->auto_retx_cnt > RK3576CANFD_RETX_TIME_LIMIT_CNT_MAX)
> + priv->auto_retx_cnt = RK3576CANFD_RETX_TIME_LIMIT_CNT_MAX;
> +
> + /* rx-max-data only 4 Words or 18 words are supported */
> + if (device_property_read_u32_array(&pdev->dev, "rockchip,rx-max-data", &val, 1))
No, you cannot keep adding undocumented ABI.
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list