@@ -488,47 +488,6 @@ device_required_handles_get(const struct device *dev,
488488 return rv ;
489489}
490490
491- /**
492- * @brief Get the set of handles that this device supports.
493- *
494- * The set of supported devices is inferred from devicetree, and does not
495- * include any software constructs that may depend on the device.
496- *
497- * @param dev the device for which supports are desired.
498- *
499- * @param count pointer to a place to store the number of devices provided at
500- * the returned pointer. The value is not set if the call returns a null
501- * pointer. The value may be set to zero.
502- *
503- * @return a pointer to a sequence of @p *count device handles, or a null
504- * pointer if @p dh does not provide dependency information.
505- */
506- static inline const device_handle_t *
507- device_supported_handles_get (const struct device * dev ,
508- size_t * count )
509- {
510- const device_handle_t * rv = dev -> handles ;
511- size_t region = 0 ;
512- size_t i = 0 ;
513-
514- if (rv != NULL ) {
515- /* Fast forward to supporting devices */
516- while (region != 2 ) {
517- if (* rv == DEVICE_HANDLE_SEP ) {
518- region ++ ;
519- }
520- rv ++ ;
521- }
522- /* Count supporting devices */
523- while (rv [i ] != DEVICE_HANDLE_ENDS ) {
524- ++ i ;
525- }
526- * count = i ;
527- }
528-
529- return rv ;
530- }
531-
532491/**
533492 * @brief Visit every device that @p dev directly requires.
534493 *
@@ -566,42 +525,6 @@ int device_required_foreach(const struct device *dev,
566525 device_visitor_callback_t visitor_cb ,
567526 void * context );
568527
569- /**
570- * @brief Visit every device that @p dev directly supports.
571- *
572- * Zephyr maintains information about which devices are directly supported by
573- * another device; for example an I2C controller will support an I2C-based
574- * sensor driver. Supported devices can derive from statically-defined
575- * devicetree relationships.
576- *
577- * This API supports operating on the set of supported devices. Example uses
578- * include iterating over the devices connected to a regulator when it is
579- * powered on.
580- *
581- * There is no guarantee on the order in which required devices are visited.
582- *
583- * If the @p visitor function returns a negative value iteration is halted,
584- * and the returned value from the visitor is returned from this function.
585- *
586- * @note This API is not available to unprivileged threads.
587- *
588- * @param dev a device of interest. The devices that this device supports
589- * will be used as the set of devices to visit. This parameter must not be
590- * null.
591- *
592- * @param visitor_cb the function that should be invoked on each device in the
593- * support set. This parameter must not be null.
594- *
595- * @param context state that is passed through to the visitor function. This
596- * parameter may be null if @p visitor tolerates a null @p context.
597- *
598- * @return The number of devices that were visited if all visits succeed, or
599- * the negative value returned from the first visit that did not succeed.
600- */
601- int device_supported_foreach (const struct device * dev ,
602- device_visitor_callback_t visitor_cb ,
603- void * context );
604-
605528/**
606529 * @brief Retrieve the device structure for a driver by name
607530 *
0 commit comments