From: "Måns Rullgård" <mans@mansr.com>
To: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Cc: Sean Young <sean@mess.org>,
linux-media <linux-media@vger.kernel.org>,
Mason <slash.tmp@free.fr>
Subject: Re: [PATCH v4 2/2] media: rc: Add driver for tango HW IR decoder
Date: Mon, 25 Sep 2017 17:34:05 +0100 [thread overview]
Message-ID: <yw1xvak6eo02.fsf@mansr.com> (raw)
In-Reply-To: <d4bf7e00-12f0-58a1-a209-247a3dde5094@sigmadesigns.com> (Marc Gonzalez's message of "Mon, 25 Sep 2017 17:00:22 +0200")
Marc Gonzalez <marc_gonzalez@sigmadesigns.com> writes:
> 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.
Is that supposed to be an excuse?
> 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.
You can't know that. It happens to be the case for all systems you know
about today, but the driver has to work with any clock configuration.
>>> + 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.
Wrong answer.
--
Måns Rullgård
next prev parent reply other threads:[~2017-09-25 16:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 12:02 [PATCH v4 1/2] media: dt: bindings: Add binding for tango HW IR decoder Marc Gonzalez
2017-09-25 12:14 ` [PATCH v4 2/2] media: rc: Add driver " Marc Gonzalez
2017-09-25 14:08 ` Måns Rullgård
2017-09-25 15:00 ` Marc Gonzalez
2017-09-25 16:34 ` Måns Rullgård [this message]
2017-09-25 16:07 ` [PATCH v5 " Marc Gonzalez
2017-09-25 16:45 ` Måns Rullgård
2017-09-26 8:51 ` [PATCH v6 " Marc Gonzalez
2017-09-26 13:02 ` Måns Rullgård
2017-09-26 14:14 ` Marc Gonzalez
2017-09-26 14:49 ` Måns Rullgård
2017-10-04 16:00 ` Marc Gonzalez
2017-10-04 21:18 ` Sean Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yw1xvak6eo02.fsf@mansr.com \
--to=mans@mansr.com \
--cc=linux-media@vger.kernel.org \
--cc=marc_gonzalez@sigmadesigns.com \
--cc=sean@mess.org \
--cc=slash.tmp@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).