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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF42CC7EE24 for ; Fri, 12 May 2023 22:30:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240001AbjELWap (ORCPT ); Fri, 12 May 2023 18:30:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239815AbjELWam (ORCPT ); Fri, 12 May 2023 18:30:42 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1934B4C15; Fri, 12 May 2023 15:30:38 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34CKQAmH050150; Fri, 12 May 2023 15:26:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1683923170; bh=pgJzF1E1ke1uXdxCOXRhPbp9iOjFxxxNoopTt2gKb7Y=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=cUIjkX64IQMKLiCJf28GSwwhD+hjUfl1hCR60B7yMtVP2HMRxOiRPUCy8C+HaM02I rezM8p0WQGgOm4HeIEX2Y2wLkP10XM2GLv9HtuBgmkdpRHHht95WLYBCpymgp+Znd6 f6BMHd0UVWNdqbY29nAf+PuP66qEIXD9McwJu6ig= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34CKQAvO095225 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 May 2023 15:26:10 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 12 May 2023 15:26:10 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 12 May 2023 15:26:10 -0500 Received: from [128.247.81.95] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34CKQAv3002127; Fri, 12 May 2023 15:26:10 -0500 Message-ID: Date: Fri, 12 May 2023 15:26:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v5 2/2] can: m_can: Add hrtimer to generate software interrupt To: Tony Lindgren CC: , Chandrasekar Ramakrishnan , Wolfgang Grandegger , Marc Kleine-Budde , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , Schuyler Patton , , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oliver Hartkopp , References: <20230510202952.27111-1-jm@ti.com> <20230510202952.27111-3-jm@ti.com> <20230511062353.GE14287@atomide.com> Content-Language: en-US From: Judith Mendez In-Reply-To: <20230511062353.GE14287@atomide.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Tony, On 5/11/23 01:23, Tony Lindgren wrote: > Hi, > > * Judith Mendez [230510 20:31]: >> Add an hrtimer to MCAN class device. Each MCAN will have its own >> hrtimer instantiated if there is no hardware interrupt found and >> poll-interval property is defined in device tree M_CAN node. >> >> The hrtimer will generate a software interrupt every 1 ms. In >> hrtimer callback, we check if there is a transaction pending by >> reading a register, then process by calling the isr if there is. > > So what about system suspend, do you need to do something to > ensure the timer does not happen to run while suspending? Great question. Tested the MCAN using timer polling method and it seems to suspend to RAM but not resume. Meanwhile MCAN using hardware irq suspends and resumes from RAM just fine. Will look deeper into this here soon. Thank you Tony for bringing this up. regards, Judith