Re: [PATCH 1/9] media: qcom: camss: Add per sub-device type resources

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

 



Hi Konrad,

Thank you for the review.

On 3/12/2024 4:44 PM, Konrad Dybcio wrote:
> 
> 
> On 2/27/24 13:24, Gjorgji Rosikopulos wrote:
>> From: Radoslav Tsvetkov <quic_rtsvetko@xxxxxxxxxxx>
>>
>> Currently resources structure grows with additional parameters
>> required for
>> each sub-deivce. However each sub-device has some specific resources or
>> configurations which need to be passed during the initialization.
>>
>> This change adds per sub-device type structure to simplify the things
>> and removes the magical void pointer to hw_ops.
> 
> I'm not quite sure what the benefit here is, as opposed to simply
> extending <name>_device?
> 
> Generally, I think the driver state as of today is somewhat backwards..
> 
> We define a common set of resources, and then assign them subdev-specific
> ops, instead of defining the subdev and consuming clocks/pds/resets
> within a subdevice there..

In the current code only ops are specific. However there are other
configurations passed to the sub-devices which are actually specific to
different sub-device, as an example:


1. is_lite flag. The lite flag is valid for csid and vfe but not for csiphy.

2. line_num this is valid only for vfe sub-device.

3. video device available formats. Those formats are only used by the
vfe sub-device and are not valid to other sub-devices which are not
having any video device connected, (those will be added in next patches
in the patch-set).

Please check the other changes in this patch-set maybe it will make more
sense.

I am not sure with such differences in the sub-device code we can have
generic structure which contains only ops...

And please note that when we are introducing new sub-device for other
SoC it may need additional specific configuration.


Regards,

~Gjorgji





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux