[PATCH v2] drm/bridge: fsl-ldb: Parse register offsets from DT

Marek Vasut marek.vasut at mailbox.org
Mon Nov 3 19:13:14 PST 2025


On 11/4/25 3:39 AM, Liu Ying wrote:

Hello Liu,

>> @@ -61,24 +62,13 @@ enum fsl_ldb_devtype {
>>   };
>>   
>>   struct fsl_ldb_devdata {
>> -	u32 ldb_ctrl;
>> -	u32 lvds_ctrl;
>>   	bool lvds_en_bit;
>> -	bool single_ctrl_reg;
>>   };
>>   
>>   static const struct fsl_ldb_devdata fsl_ldb_devdata[] = {
> 
> As I pointed out in v1 comment, this patch should remove struct
> fsl_ldb_devdata.

The lvds_en_bit is still needed , and I plan to add MX95 support here, 
which would extend this again. Going back and forth makes little sense.

[...]

>> @@ -309,6 +302,27 @@ static int fsl_ldb_probe(struct platform_device *pdev)
>>   	fsl_ldb->dev = &pdev->dev;
>>   	fsl_ldb->bridge.of_node = dev->of_node;
>>   
>> +	/* No "reg-names" property likely means single-register LDB */
>> +	idx = of_property_match_string(dev->of_node, "reg-names", "ldb");
> 
> You don't need to match reg-names.  Instead, just call of_property_read_reg()
> twice to get the first reg and the second reg by passing indexes 0 and 1 to it.
> If the second reg is not found, then set fsl_ldb->single_ctrl_reg to true.

This wouldn't work if the two entries were ordered the other way around 
in DT, i.e. first "ldb" second "lvds" and vice-versa. That's why 
properties with multiple values also have the -names property that goes 
with them.



More information about the linux-arm-kernel mailing list