Lines Matching +full:sub +full:- +full:bus
1 // SPDX-License-Identifier: GPL-2.0
5 * The DP AUX bus is used for devices that are connected over a DisplayPort
6 * AUX bus. The devices on the far side of the bus are referred to as
9 * Commonly there is only one device connected to the DP AUX bus: a panel.
11 * platform devices, putting them under the DP AUX bus allows the panel driver
12 * to perform transactions on that bus.
26 * dp_aux_ep_match() - The match function for the dp_aux_bus.
36 return !!of_match_device(drv->of_match_table, dev); in dp_aux_ep_match()
40 * dp_aux_ep_probe() - The probe function for the dp_aux_bus.
49 struct dp_aux_ep_driver *aux_ep_drv = to_dp_aux_ep_drv(dev->driver); in dp_aux_ep_probe()
57 ret = aux_ep_drv->probe(aux_ep); in dp_aux_ep_probe()
65 * dp_aux_ep_remove() - The remove function for the dp_aux_bus.
73 struct dp_aux_ep_driver *aux_ep_drv = to_dp_aux_ep_drv(dev->driver); in dp_aux_ep_remove()
76 if (aux_ep_drv->remove) in dp_aux_ep_remove()
77 aux_ep_drv->remove(aux_ep); in dp_aux_ep_remove()
82 * dp_aux_ep_shutdown() - The shutdown function for the dp_aux_bus.
91 if (!dev->driver) in dp_aux_ep_shutdown()
94 aux_ep_drv = to_dp_aux_ep_drv(dev->driver); in dp_aux_ep_shutdown()
95 if (aux_ep_drv->shutdown) in dp_aux_ep_shutdown()
96 aux_ep_drv->shutdown(to_dp_aux_ep_dev(dev)); in dp_aux_ep_shutdown()
100 .name = "dp-aux",
121 * dp_aux_ep_dev_release() - Free memory for the dp_aux_ep device
138 * of_dp_aux_ep_destroy() - Destroy an DP AUX endpoint device
143 * is called for _all_ of the child devices of the device providing the AUX bus.
153 struct device_node *np = dev->of_node; in of_dp_aux_ep_destroy()
155 if (dev->bus != &dp_aux_bus_type) in of_dp_aux_ep_destroy()
170 * of_dp_aux_depopulate_ep_devices() - Undo of_dp_aux_populate_ep_devices
178 device_for_each_child_reverse(aux->dev, NULL, of_dp_aux_ep_destroy); in of_dp_aux_depopulate_ep_devices()
183 * of_dp_aux_populate_ep_devices() - Populate the endpoint devices on the DP AUX
187 * This will populate all the devices under the "aux-bus" node of the device
188 * providing the AUX channel (AKA aux->dev).
191 * our sub-devices will have finished probing. It should be noted that if our
192 * sub-devices return -EPROBE_DEFER that we will not return any error codes
193 * ourselves but our sub-devices will _not_ have actually probed successfully
194 * yet. There may be other cases (maybe added in the future?) where sub-devices
206 struct device_node *bus, *np; in of_dp_aux_populate_ep_devices() local
211 WARN_ON_ONCE(!aux->ddc.algo); in of_dp_aux_populate_ep_devices()
213 if (!aux->dev->of_node) in of_dp_aux_populate_ep_devices()
216 bus = of_get_child_by_name(aux->dev->of_node, "aux-bus"); in of_dp_aux_populate_ep_devices()
217 if (!bus) in of_dp_aux_populate_ep_devices()
220 for_each_available_child_of_node(bus, np) { in of_dp_aux_populate_ep_devices()
227 aux_ep->aux = aux; in of_dp_aux_populate_ep_devices()
229 aux_ep->dev.parent = aux->dev; in of_dp_aux_populate_ep_devices()
230 aux_ep->dev.bus = &dp_aux_bus_type; in of_dp_aux_populate_ep_devices()
231 aux_ep->dev.type = &dp_aux_device_type_type; in of_dp_aux_populate_ep_devices()
232 aux_ep->dev.of_node = of_node_get(np); in of_dp_aux_populate_ep_devices()
233 dev_set_name(&aux_ep->dev, "aux-%s", dev_name(aux->dev)); in of_dp_aux_populate_ep_devices()
235 ret = device_register(&aux_ep->dev); in of_dp_aux_populate_ep_devices()
237 dev_err(aux->dev, "Failed to create AUX EP for %pOF: %d\n", np, ret); in of_dp_aux_populate_ep_devices()
245 put_device(&aux_ep->dev); in of_dp_aux_populate_ep_devices()
249 * we won't fail the whole function here--we'll just in of_dp_aux_populate_ep_devices()
255 of_node_put(bus); in of_dp_aux_populate_ep_devices()
266 * devm_of_dp_aux_populate_ep_devices() - devm wrapper for of_dp_aux_populate_ep_devices()
269 * Handles freeing w/ devm on the device "aux->dev".
281 return devm_add_action_or_reset(aux->dev, in devm_of_dp_aux_populate_ep_devices()
289 drv->driver.owner = owner; in __dp_aux_dp_driver_register()
290 drv->driver.bus = &dp_aux_bus_type; in __dp_aux_dp_driver_register()
292 return driver_register(&drv->driver); in __dp_aux_dp_driver_register()
298 driver_unregister(&drv->driver); in dp_aux_dp_driver_unregister()
322 MODULE_DESCRIPTION("DRM DisplayPort AUX bus");