From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F5F8C31E45 for ; Thu, 13 Jun 2019 15:35:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36159206BB for ; Thu, 13 Jun 2019 15:35:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DQZoL1q1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YFFG03IL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36159206BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9fmEvVctS7xTvaQBSQ97AyaQ3BDvF12rJe+4IRSwZas=; b=DQZoL1q1eWBQ+G 4VNSzN4EXHvXphpCTCTouPW7gVMDXqIApFgKkMx5cpX7vV1Eo28/6d3M06pfX9tSU69wOiQja17t8 69r6JdTdg/eAWQlpAa3NelE5mO5Od25aVN4vt5UFo68KKOgqYGXnDfz1ezkPC9noCJpjS71jW5s1f 00wG5/1DXWU9Mnz1JOYbqsUm9e7H0ITrq//UnYaMUwkd2ZSIxn5RPGxnGFylOIuFS0VUFDkCgNckJ 8ZgQl42p+3mfXMeCu4a5Vyk7+ZnthOApLd6ZyQnVKmORMZGmcK5EhF3lwJrmOxwpxZGWw6wgehs++ XgYKbsSF8Ix4rs6m+lXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbRlD-0006y5-IP; Thu, 13 Jun 2019 15:35:31 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbRlA-0006xC-1h for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2019 15:35:29 +0000 Received: by mail-io1-xd43.google.com with SMTP id r185so17850619iod.6 for ; Thu, 13 Jun 2019 08:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aF7WfJBqic6Edz88lRv/0CL+oI9ZSIdnX+8VgBOn3LM=; b=YFFG03ILxrBxA6EZc7HJyHTcZQG8lYtS0piFG6RoKFTL9WaRyzxFvfEfAYIJhj/ftv 9ExuTCWv50qCckQUHlJWT2UsUYTEATiFrwqXse8mop93NQaSCaMjFPtYLHL53CS1iBdu FSSVPGtnBTxP4GW8ocS4dqqaF8GUvpBrzW2/4wt80dCCxcvClhxqJh5SbP92pc3pYdQl jlJmooBJcmedVvhBjo+Q5iscUzsWXs4DECS3/+7zXE3IHqrut20IQRp4C0HcFKIYAcT7 4RLMs3kfUprhpOWBGSDxx6PuB5IH+dkxMni5cJQm3aX/POi0LH+cq45V7JYf6aWa4T1L TnxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aF7WfJBqic6Edz88lRv/0CL+oI9ZSIdnX+8VgBOn3LM=; b=sLwsvpK2ZuVrw3JByJI2iwmfthAbRj7XUSEiKKJJOC1hmEpLv3t75tvMStynO9z7KB B6qii/OLsKfqu7XhMs+f3JgECnVpUtU/i8Zle4F2y26ZasLutM6fO/L1bMgJxQQ6RfFM rpBPpj6krco/XyZi4gCIdCMfuFhUAEXnvMyxatmda3Dav1z6/C7DNneIx9c468vNypiH zluWGWtm9gJkfpD3ezd8WgldRZZ4fXb4GN6fak6XQrZkC9rdTvm9B0In+aDbbQ3BCn7D B7iyII5pM8/+/rPaEnk0iMyUZQkvMjwn7BHw8agkIBYGP8i1mHo4Jmmz+RlnaURDJEtq J0Lg== X-Gm-Message-State: APjAAAVg+wJxNHdutAG2V+rmbV8WUv9dyfR6OrpLnoVmgrBhhOJ3tPpS qpFt0fPUl4GJB5T2MCe2+VXvUxVHlk/AKmEIjx8= X-Google-Smtp-Source: APXvYqzEXd8Sr1aUseL+zTWDc5Ak4NVxezALw+LIg0QIm0xSXFjXqsm8USdWkhi9CiqHsaqRen64MfMyW8gnwFYF5X4= X-Received: by 2002:a5d:9047:: with SMTP id v7mr36860549ioq.18.1560440127125; Thu, 13 Jun 2019 08:35:27 -0700 (PDT) MIME-Version: 1.0 References: <20190525181329.18657-1-tiny.windzz@gmail.com> <20190525181329.18657-2-tiny.windzz@gmail.com> <20190527122752.uc7q6zkjti3zag4q@flea> <20190612154325.m6z7xsxlpdq4wkxv@flea> In-Reply-To: <20190612154325.m6z7xsxlpdq4wkxv@flea> From: Frank Lee Date: Thu, 13 Jun 2019 23:35:15 +0800 Message-ID: Subject: Re: [PATCH v3 1/3] thermal: sun8i: add thermal driver for h6 To: Maxime Ripard X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190613_083528_094888_C64F3770 X-CRM114-Status: GOOD ( 21.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree , Linux PM , Greg Kroah-Hartman , Linus Walleij , Daniel Lezcano , Linux Kernel Mailing List , Eduardo Valentin , Chen-Yu Tsai , Rob Herring , Mauro Carvalho Chehab , rui.zhang@intel.com, paulmck@linux.ibm.com, David Miller , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 13, 2019 at 9:26 PM Maxime Ripard 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 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