[v5,3/3] media: imx-jpeg: Add vendor prefix in slot property

Message ID be1f8907582ea344f8826f7888b277534859e0c4.1697597713.git.ming.qian@nxp.com (mailing list archive)
State New
Delegated to: Hans Verkuil
Headers
Series media: imx-jpeg: Assign a single slot |

Commit Message

ming qian Oct. 19, 2023, 2:48 a.m. UTC
  From: Ming Qian <ming.qian@nxp.com>

The slot property isn't generic property, add vendor prefix. Change the
property name to nxp,slot.

Fixes: 53ebeea50599 ("media: imx-jpeg: Support to assign slot for encoder/decoder")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
---
v5
- add vender prefix, change property slot to nxp,slot

v4
- nothing changed here, just modify the bindings and dts

v3
- nothing changed here, just modify the bindings and dts

v2
- nothing changed here, just modify the bindings and dts

 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Krzysztof Kozlowski Oct. 19, 2023, 7:14 a.m. UTC | #1
On 19/10/2023 04:48, Ming Qian (OSS) wrote:
> From: Ming Qian <ming.qian@nxp.com>
> 
> The slot property isn't generic property, add vendor prefix. Change the
> property name to nxp,slot.
> 
> Fixes: 53ebeea50599 ("media: imx-jpeg: Support to assign slot for encoder/decoder")
> Signed-off-by: Ming Qian <ming.qian@nxp.com>
> ---
> v5
> - add vender prefix, change property slot to nxp,slot
> 
> v4
> - nothing changed here, just modify the bindings and dts
> 
> v3
> - nothing changed here, just modify the bindings and dts
> 
> v2
> - nothing changed here, just modify the bindings and dts
> 
>  drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> index 64112b63298c..f8b99a292ad1 100644
> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> @@ -2762,7 +2762,7 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
>  	if (IS_ERR(jpeg->base_reg))
>  		return PTR_ERR(jpeg->base_reg);
>  
> -	ret = of_property_read_u32_index(pdev->dev.of_node, "slot", 0, &jpeg->slot_data.slot);

How did it appear in the code and in the DTS without bindings...

Best regards,
Krzysztof
  
ming qian Oct. 19, 2023, 7:41 a.m. UTC | #2
Hi Krzysztof,

>> From: Ming Qian <ming.qian@nxp.com>
>>
>> The slot property isn't generic property, add vendor prefix. Change the
>> property name to nxp,slot.
>>
>> Fixes: 53ebeea50599 ("media: imx-jpeg: Support to assign slot for encoder/decoder")
>> Signed-off-by: Ming Qian <ming.qian@nxp.com>
>> ---
>> v5
>> - add vender prefix, change property slot to nxp,slot
>>
>> v4
>> - nothing changed here, just modify the bindings and dts
>>
>> v3
>> - nothing changed here, just modify the bindings and dts
>>
>> v2
>> - nothing changed here, just modify the bindings and dts
>>
>>   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
>> index 64112b63298c..f8b99a292ad1 100644
>> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
>> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
>> @@ -2762,7 +2762,7 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
>>   	if (IS_ERR(jpeg->base_reg))
>>   		return PTR_ERR(jpeg->base_reg);
>>   
>> -	ret = of_property_read_u32_index(pdev->dev.of_node, "slot", 0, &jpeg->slot_data.slot);
> 
> How did it appear in the code and in the DTS without bindings...
> 
> Best regards,
> Krzysztof
> 

In the beginning, I only made the patch set of code and dts, the code
patch can work without dts patch due to the default value. The code
patch is merged to media_tree, but mark the dts patch as ´Not
Applicable´. After that, I sent the dts patch again, but maintainer
reminds me that I need to change the binding too. So I made this patch
set. And I guess the dts patch was merged by mistake.

best regards,
Ming
  
Krzysztof Kozlowski Oct. 20, 2023, 11:12 a.m. UTC | #3
On 19/10/2023 09:41, ming qian wrote:
>>> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
>>> index 64112b63298c..f8b99a292ad1 100644
>>> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
>>> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
>>> @@ -2762,7 +2762,7 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
>>>   	if (IS_ERR(jpeg->base_reg))
>>>   		return PTR_ERR(jpeg->base_reg);
>>>   
>>> -	ret = of_property_read_u32_index(pdev->dev.of_node, "slot", 0, &jpeg->slot_data.slot);
>>
>> How did it appear in the code and in the DTS without bindings...
>>
>> Best regards,
>> Krzysztof
>>
> 
> In the beginning, I only made the patch set of code and dts, the code
> patch can work without dts patch due to the default value. The code
> patch is merged to media_tree, but mark the dts patch as ´Not
> Applicable´. After that, I sent the dts patch again, but maintainer
> reminds me that I need to change the binding too. So I made this patch
> set. And I guess the dts patch was merged by mistake.

The code was merged by mistake. You cannot add of_property() ABI to the
Linux without documenting it via bindings. Don't send such patches.

Best regards,
Krzysztof
  

Patch

diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index 64112b63298c..f8b99a292ad1 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -2762,7 +2762,7 @@  static int mxc_jpeg_probe(struct platform_device *pdev)
 	if (IS_ERR(jpeg->base_reg))
 		return PTR_ERR(jpeg->base_reg);
 
-	ret = of_property_read_u32_index(pdev->dev.of_node, "slot", 0, &jpeg->slot_data.slot);
+	ret = of_property_read_u32_index(pdev->dev.of_node, "nxp,slot", 0, &jpeg->slot_data.slot);
 	if (ret)
 		jpeg->slot_data.slot = 0;
 	dev_info(&pdev->dev, "choose slot %d\n", jpeg->slot_data.slot);