Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Frank Lee <tiny.windzz@gmail.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree <devicetree@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Eduardo Valentin <edubezval@gmail.com>,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	rui.zhang@intel.com, paulmck@linux.ibm.com,
	David Miller <davem@davemloft.net>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 1/3] thermal: sun8i: add thermal driver for h6
Date: Thu, 13 Jun 2019 23:35:15 +0800
Message-ID: <CAEExFWskAsNquULKBLtBFUOosNpks8L6aUhw-+cF=oZ0aghAtQ@mail.gmail.com> (raw)
In-Reply-To: <20190612154325.m6z7xsxlpdq4wkxv@flea>

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.

In addition, when resuming from suspend, we need to enable
the clock, so I think it is necessary to have a clock pointer.

Yangtao

>
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25 18:13 [PATCH v3 0/3] " 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 [this message]
2019-06-14  8:02           ` Maxime Ripard
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 publically 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='CAEExFWskAsNquULKBLtBFUOosNpks8L6aUhw-+cF=oZ0aghAtQ@mail.gmail.com' \
    --to=tiny.windzz@gmail.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=maxime.ripard@bootlin.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=paulmck@linux.ibm.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox