/* Power on function */ staticint can_transceiver_phy_power_on(struct phy *phy)
{ struct can_transceiver_phy *can_transceiver_phy = phy_get_drvdata(phy); int ret;
if (can_transceiver_phy->mux_state) {
ret = mux_state_select(can_transceiver_phy->mux_state); if (ret) {
dev_err(&phy->dev, "Failed to select CAN mux: %d\n", ret); return ret;
}
} if (can_transceiver_phy->standby_gpio)
gpiod_set_value_cansleep(can_transceiver_phy->standby_gpio, 0); if (can_transceiver_phy->enable_gpio)
gpiod_set_value_cansleep(can_transceiver_phy->enable_gpio, 1);
return0;
}
/* Power off function */ staticint can_transceiver_phy_power_off(struct phy *phy)
{ struct can_transceiver_phy *can_transceiver_phy = phy_get_drvdata(phy);
if (can_transceiver_phy->standby_gpio)
gpiod_set_value_cansleep(can_transceiver_phy->standby_gpio, 1); if (can_transceiver_phy->enable_gpio)
gpiod_set_value_cansleep(can_transceiver_phy->enable_gpio, 0); if (can_transceiver_phy->mux_state)
mux_state_deselect(can_transceiver_phy->mux_state);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.