Query about platform device registration

From: Vakul Garg
Date: Fri Dec 07 2018 - 20:59:42 EST


Hi

I am registering a device using platform_device_register_full().
In the above-mentioned api argument - 'struct platform_device_info', I set the parent device pointer, set_dma_mask from parent device etc.

The parent device is created by declaration in device tree and the relevant node has property 'dma-coherent'.
So I get dma_coherent attribute as 1 for the parent device. In other words, is_dev_dma_coherent() returns 1 for parent device.

But for the device registered using platform_device_register_full(), the dma_coherent is not set and is_dev_dma_coherent() returns 0.

Can someone please guide me, how to declare the newly registered device as 'dma_coherent'.

Regards

Vakul