Alternative for IOService->getProvider in DriverKit

We have developed PCIFamily based KEXT which uses IOService->getProvider method to access Thunderbolt's device parent PCIBridge object.

So just want to know what's alternative for this in PCIDriverKit. I have explored PCIDriverKit and DriverKit but could not find any alternative.

Any help or suggestion is really appreciated.
Thanks

It depends on what your goals are for what is recommended to replace getProvider. If you're just looking to get properties from that device, you can use IOService->CopyProviderProperties. Does this provide what you need? What is your need for accessing the provider of your matched provider?
@Drewbadour
Thanks for your reply..
Actually I want to use one of the provider device object to call api to read/write configuration register.

I want to iterate through all provider device object to match a specific provider then use this object for the same, the same way I used in my KEXT using IoService->getProvider.


@anshu1102 I also have a KEXT where getProvider() was used to get the parent of the provider object for performing a specific operation. But it seems like DriverKit does not have any alternative for this and I am stuck with this issue.

@anshu1102 @Drewbadour

Finally we got GetProvider API with MacOS 12 Developer Beta Release and Xcode 13 Beta. I'm excited to complete my DEXT.

Using this API, I got first (primary) provider but after that when I iterated to retrieve the provider of the primary provider, it's returning null. Since this API is in beta release, I'm expecting this to work properly in future releases. Has anyone tested this GetProvider API in DEXT??

Alternative for IOService->getProvider in DriverKit
 
 
Q