Re: [PATCH v3 1/3] thermal: sun8i: add thermal driver for h6

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

 



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

Maxime

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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux