Re: [PATCH v2 20/20] media: venus: pm_helpers: Use reset_bulk API

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

 



On 14.02.2024 14:31, Philipp Zabel wrote:
> Hi Konrad,
> 
> On Fr, 2024-02-09 at 22:10 +0100, Konrad Dybcio wrote:
>> All of the resets are toggled together. Use the bulk api to save on some
>> code complexity.
>>
>> The delay between resets is now correctly determined by the reset
>> framework.
> 
> If this is a recent change, could you reference the commit?

It's a series that recently landed in -next [1]

[...]

> 
> Since VIDC_RESETS_NUM_MAX is only 2, I don't think a separate
> allocation is worth it.

It's 2 today, anyway. I wanted to keep it flexible

[...]

>> +	ret = reset_control_bulk_reset(res->resets_num, core->resets);
>> +	if (ret)
>> +		dev_err(core->dev, "Failed to toggle resets: %d\n", ret);
>>  
>> -err:
>>  	return ret;
> 
> Could be simplified to:
> 
> 	return reset_control_bulk_reset(res->resets_num, core-
>> resets);

I intentionally kept the if (ret) to print a specific error message
in case the call fails, this driver doesn't go a good job of telling
the user/developer what went wrong.

Konrad




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux