From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Frank Lee <tiny.windzz@gmail.com>
Cc: rui.zhang@intel.com, Eduardo Valentin <edubezval@gmail.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>, Chen-Yu Tsai <wens@csie.org>,
David Miller <davem@davemloft.net>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
paulmck@linux.ibm.com, Linux PM <linux-pm@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] thermal: sun8i: add thermal driver for h6
Date: Fri, 14 Jun 2019 10:02:00 +0200 [thread overview]
Message-ID: <20190614080200.fc3mah5q3mmihxa5@flea> (raw)
In-Reply-To: <CAEExFWskAsNquULKBLtBFUOosNpks8L6aUhw-+cF=oZ0aghAtQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2017 bytes --]
Hi,
On Thu, Jun 13, 2019 at 11:35:15PM +0800, Frank Lee wrote:
> On Thu, Jun 13, 2019 at 9:26 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Fri, Jun 07, 2019 at 09:34:44PM +0800, Frank Lee wrote:
> > > On Mon, May 27, 2019 at 8:27 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > > > > + ret = devm_request_threaded_irq(dev, irq, NULL,
> > > > > + tmdev->chip->irq_thread,
> > > > > + IRQF_ONESHOT, "ths", tmdev);
> > > > > + if (ret)
> > > > > + return ret;
> > > >
> > > > Is there any particular reason to use a threaded interrupt?
> > >
> > > Just to improve real-time.
> >
> > What do you mean by real-time here? If anything, that will increase
> > the latency of the interrupts here.
> >
> > And in preempt-rt, regular top-half interrupts will be forced into a
> > threaded interrupt anyway.
> >
> > > > > +static int sun8i_ths_remove(struct platform_device *pdev)
> > > > > +{
> > > > > + struct ths_device *tmdev = platform_get_drvdata(pdev);
> > > > > +
> > > > > + clk_disable_unprepare(tmdev->bus_clk);
> > > >
> > > > I know that we discussed that already, but I'm not sure why you switch
> > > > back to a regular call to regmap_init_mmio, while regmap_init_mmio_clk
> > > > will take care of enabling and disabling the bus clock for you?
> > >
> > > It seems that regmap_init_mmio_clk just get clk and prepare clk
> > > but no enable.
> >
> > At init time, yes. But it will enable it only when you access the
> > registers, which is what you want anyway.
>
> But after accessing the register, it turns the clock off, which
> affects the ad conversion and the occurrence of the interrupt.
Ah, so that's how it works. Yeah, it makes sense then.
> In addition, when resuming from suspend, we need to enable
> the clock, so I think it is necessary to have a clock pointer.
Yep, indeed.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2019-06-14 8:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-25 18:13 [PATCH v3 0/3] add thermal driver for h6 Yangtao Li
2019-05-25 18:13 ` [PATCH v3 1/3] thermal: sun8i: " Yangtao Li
2019-05-27 12:27 ` Maxime Ripard
2019-06-07 13:34 ` Frank Lee
2019-06-12 15:43 ` Maxime Ripard
2019-06-13 15:35 ` Frank Lee
2019-06-14 8:02 ` Maxime Ripard [this message]
2019-05-27 14:25 ` Ondřej Jirman
2019-06-07 13:50 ` Frank Lee
2019-06-07 13:52 ` Frank Lee
2019-06-07 17:18 ` Ondřej Jirman
2019-06-07 17:25 ` Ondřej Jirman
2019-06-10 23:29 ` Vasily Khoruzhick
2019-06-11 0:31 ` Frank Lee
2019-06-11 0:34 ` Vasily Khoruzhick
2019-06-12 16:49 ` Frank Lee
2019-06-14 23:07 ` Vasily Khoruzhick
2019-06-16 15:27 ` Frank Lee
2019-06-18 19:04 ` Frank Lee
2019-05-25 18:13 ` [PATCH v3 2/3] dt-bindings: thermal: add binding document for h6 thermal controller Yangtao Li
2019-05-27 12:16 ` Maxime Ripard
2019-05-25 18:13 ` [PATCH v3 3/3] thermal: fix indentation in makefile Yangtao Li
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=20190614080200.fc3mah5q3mmihxa5@flea \
--to=maxime.ripard@bootlin.com \
--cc=daniel.lezcano@linaro.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab+samsung@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=paulmck@linux.ibm.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=tiny.windzz@gmail.com \
--cc=wens@csie.org \
/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).