Re: [PATCH v2] software node: Implement device_get_match_data fwnode callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 24, 2024 at 12:37:16AM +0300, Dmitry Baryshkov wrote:
> On Wed, Apr 24, 2024 at 12:49:18AM +0800, Sui Jingfeng wrote:
> > On 2024/4/23 21:28, Andy Shevchenko wrote:
> > > On Tue, Apr 23, 2024 at 12:46:58AM +0800, Sui Jingfeng wrote:

...

> But let me throw an argument why this patch (or something similar) looks
> to be necessary.
> 
> Both on DT and non-DT systems the kernel allows using the non-OF based
> matching. For the platform devices there is platform_device_id-based
> matching.
> 
> Currently handling the data coming from such device_ids requires using
> special bits of code, e.g. platform_get_device_id(pdev)->driver_data to
> get the data from the platform_device_id. Having such codepaths goes
> against the goal of unifying DT and non-DT paths via generic property /
> fwnode code.
> 
> As such, I support Sui's idea of being able to use device_get_match_data
> for non-DT, non-ACPI platform devices.

I'm not sure I buy this. We have a special helpers based on the bus type to
combine device_get_match_data() with the respective ID table crawling, see
the SPI and I²C cases as the examples.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux