Lines Matching +full:max +full:- +full:bitrate

1 // SPDX-License-Identifier: GPL-2.0
3 * phy-can-transceiver.c - phy driver for CAN transceivers
5 * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com
31 if (can_transceiver_phy->standby_gpio) in can_transceiver_phy_power_on()
32 gpiod_set_value_cansleep(can_transceiver_phy->standby_gpio, 0); in can_transceiver_phy_power_on()
33 if (can_transceiver_phy->enable_gpio) in can_transceiver_phy_power_on()
34 gpiod_set_value_cansleep(can_transceiver_phy->enable_gpio, 1); in can_transceiver_phy_power_on()
44 if (can_transceiver_phy->standby_gpio) in can_transceiver_phy_power_off()
45 gpiod_set_value_cansleep(can_transceiver_phy->standby_gpio, 1); in can_transceiver_phy_power_off()
46 if (can_transceiver_phy->enable_gpio) in can_transceiver_phy_power_off()
47 gpiod_set_value_cansleep(can_transceiver_phy->enable_gpio, 0); in can_transceiver_phy_power_off()
82 struct device *dev = &pdev->dev; in can_transceiver_phy_probe()
93 return -ENOMEM; in can_transceiver_phy_probe()
95 match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node); in can_transceiver_phy_probe()
96 drvdata = match->data; in can_transceiver_phy_probe()
98 phy = devm_phy_create(dev, dev->of_node, in can_transceiver_phy_probe()
105 device_property_read_u32(dev, "max-bitrate", &max_bitrate); in can_transceiver_phy_probe()
107 dev_warn(dev, "Invalid value for transceiver max bitrate. Ignoring bitrate limit\n"); in can_transceiver_phy_probe()
108 phy->attrs.max_link_rate = max_bitrate; in can_transceiver_phy_probe()
110 can_transceiver_phy->generic_phy = phy; in can_transceiver_phy_probe()
112 if (drvdata->flags & CAN_TRANSCEIVER_STB_PRESENT) { in can_transceiver_phy_probe()
116 can_transceiver_phy->standby_gpio = standby_gpio; in can_transceiver_phy_probe()
119 if (drvdata->flags & CAN_TRANSCEIVER_EN_PRESENT) { in can_transceiver_phy_probe()
123 can_transceiver_phy->enable_gpio = enable_gpio; in can_transceiver_phy_probe()
126 phy_set_drvdata(can_transceiver_phy->generic_phy, can_transceiver_phy); in can_transceiver_phy_probe()
136 .name = "can-transceiver-phy",
144 MODULE_AUTHOR("Aswath Govindraju <a-govindraju@ti.com>");