Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1357269iol; Fri, 10 Jun 2022 06:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznAuYRFjm2W1bX6iyG9gHpI5fyNwRxnB+01AeLqZCfv7b2teS2rFdef1pcKENfO83O+Rld X-Received: by 2002:a05:6402:5189:b0:42d:fe60:a03a with SMTP id q9-20020a056402518900b0042dfe60a03amr51438953edd.390.1654866108109; Fri, 10 Jun 2022 06:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654866108; cv=none; d=google.com; s=arc-20160816; b=U71P7X4ozUpXY9+9JLBzMmBXfWQc4WX5cayGFT7ojBC+MbZS9On0EEnpeEyaOWU7mJ iN23VONFe3QF2S29+En5t3hoaRF5iMrAL89A8cDiH1So3gVMJjw+1d0GUwxB7Sm++mPR 5BfRYBp8DFnHTjRbCRc+OTMGOW37AyulfCsMA916pNxMeDnXxphdhzNRN0+ks09sMHpo nzkQnymjIEZFEh+F9fGs8FNbi/TmZhJF2qwiPAfvz706MxAmlOEO9mUpTyuSrh9LvNDk it/YrQ36//rU3iKeH0wIVb4qsf2L3iLx4hdpJCCGDpQ6dW/irauC5uLXKdcFTrmwQjn7 ux0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=z4WE6SPckcHYXKwLFBH2TH8FBe4r/iUtHZtiPwsKkZE=; b=Qf1LGEB5JcuAvoxtBCA+dbhOcCyUyabkuodSS70LC09gFH+fnsMe7L42umjHDcJrwF P1gadTkqce38DV/hbaZVu8A6QAxV0vQVU9Rk5SoExI5Yj8HUTSCNKgI6iMhvOFHUm7N3 oLCrXOmU2hCGoNhWEDyZL5n5sqM+87X4vX5Zx7f9MmQEEn/k45lUbnPERLf4vgAeP0uF qdNqE52yJpQwifSR74t7Wy8rIO/7rKVXQkUO7SsjcDMUVYbKjJmTntGwLz7aLjJyfPMK ps8LCF9HIeKloVkFzVclQgXVJHGF1vabMl/guhRbxBqVDqidcuciwcvNJP0JPdB3uGfY Pxdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nYI9RtFr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc12-20020a170907168c00b006ff0937f440si2362384ejc.815.2022.06.10.06.01.16; Fri, 10 Jun 2022 06:01:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nYI9RtFr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347689AbiFJMVc (ORCPT + 99 others); Fri, 10 Jun 2022 08:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239840AbiFJMVa (ORCPT ); Fri, 10 Jun 2022 08:21:30 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A9F2D057B; Fri, 10 Jun 2022 05:21:29 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id x62so35038778ede.10; Fri, 10 Jun 2022 05:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z4WE6SPckcHYXKwLFBH2TH8FBe4r/iUtHZtiPwsKkZE=; b=nYI9RtFrLo87bOVdy88dqGE7TDNOJs6Tx6UarjskgiVmzG4fPyrX6ezNb3bFs7BHf/ ko9Ql8aC6w/QdXBke5I5KTLmNTx3m+Ge/M+W9YEwapfijdrIACn9R+eAyUzdJRip70S1 OdPNIkC78R8l4syzI+USBmvE6B9B41xqFafj+9qVrjsuS+yJs7eLdG+fUhZzZWh/dfTM rEZdm0lL8HwE5Hmq8wJo21PORAB0+JiWWQU5Cj+Hib7DgV9ndASl8SscgkdCxDsZ3xL7 lwSXoThp2tPVGi0hJhwyLqEYfrQ8+o8kU3cobZJc/GBXz2/3p7lSEWQNmkfjTqV3oo2f OUuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z4WE6SPckcHYXKwLFBH2TH8FBe4r/iUtHZtiPwsKkZE=; b=Rhbr4bA3+nw6w9CEz/u87VPl7mk3P5R4M4Wt4AbCY3dBAI2PXcNedqHBZOEn5X0DuE QHVDstI5yn+rENLEE1LlVWrQ2Jq5Z4T9ZE+KY6IBgCh9lPLLia3LFv6XGkaWrct5uxec CR40cKBCUUnfn8l6QPXyRzacW/fSlb2ungW2MyZopPuOATos4yjHUQ1wKEN7Q16MyVrI 8uRv5F73FBPKrau7Yuh47CwhQiRxcfYTsbL9h86cPWqvMDZDCULVEErYVPEGdTfbQAPZ k1toDICpatMyJ8w3YQ/s3Nkz78mO0PuFeJlUctNXPg2rAjYFx4ny5K/MQpFG3rN9eIFr k5fg== X-Gm-Message-State: AOAM530k/Kf/eZ8gJsb0OVaQI9dFoG17uryPT0TIiGfnCpYkV4ZWJKHj WRjT2jhq4ZVO8JR5jFWmcp1XeyfyV/zEomMan00= X-Received: by 2002:aa7:d303:0:b0:42d:d192:4c41 with SMTP id p3-20020aa7d303000000b0042dd1924c41mr51502895edq.178.1654863688079; Fri, 10 Jun 2022 05:21:28 -0700 (PDT) MIME-Version: 1.0 References: <20220610054622.21281-1-a-govindraju@ti.com> In-Reply-To: <20220610054622.21281-1-a-govindraju@ti.com> From: Andy Shevchenko Date: Fri, 10 Jun 2022 14:20:51 +0200 Message-ID: Subject: Re: [PATCH v2] gpio: davinci: Add support for system suspend/resume PM To: Aswath Govindraju Cc: Vignesh Raghavendra , Devarsh Thakkar , Keerthy , Linus Walleij , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 10, 2022 at 8:08 AM Aswath Govindraju wrote: > > From: Devarsh Thakkar > > Add support for system suspend/resume PM hooks, save the > register context of all the required gpio registers on suspend > and restore the context on resume. the resume ... > + writel_relaxed(0xFFFFFFFF, &g->intstat); GENMASK(31, 0) ? ... > +static int __maybe_unused davinci_gpio_suspend(struct device *dev) > +static int __maybe_unused davinci_gpio_resume(struct device *dev) > +static const struct dev_pm_ops davinci_gpio_dev_pm_ops = { > + SET_SYSTEM_SLEEP_PM_OPS(davinci_gpio_suspend, davinci_gpio_resume) > +}; > + .pm = &davinci_gpio_dev_pm_ops, Can you utilize pm_sleep_ptr() and corresponding macros instead of __maybe_unused? -- With Best Regards, Andy Shevchenko