lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Jun 2019 10:02:00 +0200
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Frank Lee <tiny.windzz@...il.com>
Cc:     rui.zhang@...el.com, Eduardo Valentin <edubezval@...il.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Chen-Yu Tsai <wens@...e.org>,
        David Miller <davem@...emloft.net>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        paulmck@...ux.ibm.com, Linux PM <linux-pm@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/3] thermal: sun8i: add thermal driver for h6

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@...tlin.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@...tlin.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

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists