Re: [PATCH v4 2/2] media: rc: Add driver for tango HW IR decoder

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

 



On 25/09/2017 16:08, Måns Rullgård wrote:

> Marc Gonzalez writes:
> 
> Why did you put this way early now?  Registering the device should be
> the last thing you do (LIKE I DID IT, DAMMIT).  Otherwise something might
> try to use it before it is fully configured.
> 
>> +	err = clk_prepare_enable(ir->clk);
>> +	if (err)
>> +		return err;
> 
> Why did you move this call later?  Seriously, why do you constantly move
> things around seemingly at random?

This mistake was present in v1, v2, v3.

I got into this mess because I (incorrectly) tried to do all the
devm inits before clk_prepare_enable().

Why do we need clk_prepare_enable() and why would that function
fail? The clock is a crystal oscillator which cannot be disabled
or powered down, and which is the input for every system PLL.

>> +	writel_relaxed(0xc0000000, ir->rc6_base + RC6_CTRL);
> 
> Since you've added somewhat descriptive macros for some things, why did
> you skip this magic number?

This write is supposed to clear interrupts, but there are none
to clear at this point. I'll remove it.




[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