mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
CAN: program prod setting for tdcr register
Using this patch we are programming tdcr register of can controllers based on the data speed. Bug 4165928 Change-Id: I4d3f9426695b4ac19bef144f242dcf74371c00b7 Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924921 Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com> Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
821e738ecc
commit
df0489a1e0
@@ -988,7 +988,7 @@ static int mttcan_do_set_bittiming(struct net_device *dev)
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO)
|
||||
priv->ttcan->bt_config.fd_flags |= CAN_FD_NON_ISO_FLAG;
|
||||
|
||||
err = ttcan_set_bitrate(priv->ttcan);
|
||||
err = ttcan_set_bitrate(priv);
|
||||
if (err) {
|
||||
netdev_err(priv->dev, "Unable to set bitrate\n");
|
||||
return err;
|
||||
@@ -1906,6 +1906,14 @@ static int mttcan_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto exit_free_device;
|
||||
|
||||
#if KERNEL_VERSION(5, 16, 0) >= LINUX_VERSION_CODE
|
||||
priv->ttcan->prod_list = devm_tegra_prod_get(&pdev->dev);
|
||||
if (IS_ERR_OR_NULL(priv->ttcan->prod_list)) {
|
||||
dev_dbg(&pdev->dev, "Prod-setting not available\n");
|
||||
priv->ttcan->prod_list = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = register_mttcan_dev(dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "registering %s failed (err=%d)\n",
|
||||
|
||||
Reference in New Issue
Block a user