[PATCH 0/2] drm/bridge: Add 'struct device *' field to the drm_bridge structure

Maxime Ripard mripard at kernel.org
Tue May 21 08:37:57 UTC 2024


On Thu, May 16, 2024 at 08:04:59PM GMT, Sui Jingfeng wrote:
> 
> 
> On 5/16/24 18:40, Sui Jingfeng wrote:
> > use 'to_i2c_client(bridge->dev)' to retrieve the pointer
> 
> to_i2c_client(bridge->kdev).
> 
> Besides, this also means that we don't need to add the fwnode
> pointer into struct drm_bridge as member. Relief the conflicts
> with other reviewers if the work of switching to fwnode is still
> needed. As for majorities cases (1 to 1), of_node and fwnode can
> be retrieved with 'struct device *' easily. The aux-bridge.c and
> aux-hdp-bridge.c can also be converted too easily.

So that's what you're going for.

> of_node, fwnode, swnode and device properties are all belong to
> the backing device structure itself. It can be more natural to use
> device_proterty_read_xxx() APIs after init time, Which in turn
> avoid the need to acquire and duplicate all properties another
> time in the driver private structure.
> 
> We could do the programming around the 'struct device *.', remove
> a batch of boilerplate.

Please make that happen once the device_property_read_* API is there,
and we can get rid of of_node, swnode, and fwnode then.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20240521/9c4bfd83/attachment.sig>


More information about the dri-devel mailing list