Re: [PATCH v2 07/11] media: i2c: Add support for new frequencies to ov7251

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

 



On 01/03/2022 14:33, Andy Shevchenko wrote:
> On Mon, Feb 28, 2022 at 11:11:27PM +0000, Daniel Scally wrote:
>> On 28/02/2022 11:55, Andy Shevchenko wrote:
>>> On Fri, Feb 25, 2022 at 10:04:29PM +0000, Daniel Scally wrote:
>>>> On 25/02/2022 17:09, Andy Shevchenko wrote:
> ...
>
>> Basically it seems better to me to just let it match by device rather than
>> have the names. The only advantage I can see for the names is if a device
>> has multiple clocks assigned to it...but there are no instances of that in
>> media/i2c.
> I have heard you, but leave for the judgement done by maintainers.
>

Fair enough :)

>
>>>> Broken ACPI compensated for by the cio2-bridge - it creates the
>>>> clock-frequency property which ordinarily wouldn't be there on ACPI systems
>>>> AIUI.
>>> In the current practice we have CLK priority over property, this means we may do:
>>> 1) unconditional reading of the property;
>>> 2) trying CLK.
>>>
>>> Can it be done here?
>> Er, can you point me to an example?
> Something like
>
> 	device_read_property_u32("clock-frequency", &rate);
>
> 	clk = devm_clk_get_optional(...);
> 	if (IS_ERR(clk))
> 		return PTR_ERR(clk);
>
> 	clk_rate = clk_get_rate(...);
> 	if (clk_rate == 0)
> 		clk_rate = rate;
> 	if (clk_rate == 0)
> 		return dev_err_probe(...);
>
Gotcha - ok sure, leave that with me.



[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