Lines Matching +full:rate +full:- +full:select0 +full:- +full:gpios
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
29 * Small Form Factor (SFF) Committee Pluggable (SFP) Transceiver (FDT-based).
66 s = device_get_property(dev, "i2c-bus", &node, sizeof(node),
68 if (s == -1) {
69 device_printf(dev, "%s: '%s' has no 'i2c-bus' property, s %zd\n",
74 device_set_desc(dev, "Small Form-factor Pluggable Transceiver");
86 sc->ofw_node = ofw_bus_get_node(dev);
88 s = device_get_property(dev, "i2c-bus", &sc->i2c_bus,
89 sizeof(sc->i2c_bus), DEVICE_PROP_HANDLE);
90 if (s == -1) {
91 device_printf(dev, "%s: cannot find 'i2c-bus' property: %zd\n",
97 (void)device_get_property(dev, "mod-def0-gpios", &sc->mod_def,
98 sizeof(sc->mod_def), DEVICE_PROP_HANDLE);
99 (void)device_get_property(dev, "los-gpios", &sc->los, sizeof(sc->los),
101 (void)device_get_property(dev, "tx-fault-gpios", &sc->tx_fault,
102 sizeof(sc->tx_fault), DEVICE_PROP_HANDLE);
103 (void)device_get_property(dev, "tx-disable-gpios", &sc->tx_disable,
104 sizeof(sc->tx_disable), DEVICE_PROP_HANDLE);
105 (void)device_get_property(dev, "rate-select0-gpios", &sc->rx_rate,
106 sizeof(sc->rx_rate), DEVICE_PROP_HANDLE);
107 (void)device_get_property(dev, "rate-select1-gpios", &sc->tx_rate,
108 sizeof(sc->tx_rate), DEVICE_PROP_HANDLE);
109 (void)device_get_property(dev, "maximum-power-milliwatt", &sc->max_power,
110 sizeof(sc->max_power), DEVICE_PROP_UINT32);
112 error = OF_device_register_xref(OF_xref_from_node(sc->ofw_node), dev);
115 __func__, OF_xref_from_node(sc->ofw_node));
129 xdev = OF_device_from_xref(OF_xref_from_node(sc->i2c_bus));