Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp169769iog; Sun, 12 Jun 2022 23:06:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycTvaToX/DPYXb8jDARSOTEuqJ0UVSpglMA5/VqRJQk0ojhd7GBouTFD+HxbaJsy2aohGR X-Received: by 2002:a17:90b:33ca:b0:1e8:61e8:7b26 with SMTP id lk10-20020a17090b33ca00b001e861e87b26mr14039906pjb.102.1655100368208; Sun, 12 Jun 2022 23:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655100368; cv=none; d=google.com; s=arc-20160816; b=lzFtNwRgVC6v0RLRL4ZnUmXYWmiNR6vpAy2pasOtpCAAkPxcaG+GjWGFw9xH5knu23 9EUchbnKeNHDLCL+hDt7V0XZIZrohyli2kRZ3GRRV/CL3PmuDEeyyC3IV/zb2u6VOKi/ BDIYNFauf+oiC/OjnChXdlEMLlQIhRHUMiwjpKEO74BJApj29niuSElHaerV682KYZSa iSc+ugbxITJR1KdvsUoCMZKZDxbQodao/FWXlmN9D8sFAz5zPOJdIBi3XzAVWWzF308L FbsnTbAlwc2ZEDovo0k4zvk33lthO02xwSUT4V9SPf954TQUlYI8D8eig9L2V54Txs/k YG6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YGrd/7kl44LtBnocymnKeoW4pEzFWqJ8jpENxUsO5Ug=; b=fk3f4jB3P6cDJ55nFcdfr/1fPmdMvo8P/GdU31zibjkKFUGoyUjnY/dRndmfNRgiCY PovvrOB6dv4jrTUwGl/r7NEAF2gE2iVz4pEmN84C/WZcUZjeL412VSwqifDz1qa3T51e KCJt29I3OpucE0Glb6FumuSfLlaR10rpm3gjzASzPLI0I/FrLQF+sRboUddtA3YtwXlI YrqoCGKh1p0bJP10gndiZObV5z36lGnqVrypnSJJOpeFmUrEIlKxQyml4v5cEKjnZ41u Vodr+HWTAc5DafMxv2wAsQhYvJGxYoefNv8h6ko2KwX36A1udDvDh0Uvjdlh4VdHpjEj sEaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=cXuRNnIs; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a170902b7ca00b0016229a39343si7960129plz.115.2022.06.12.23.05.55; Sun, 12 Jun 2022 23:06:08 -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=@ti.com header.s=ti-com-17Q1 header.b=cXuRNnIs; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231464AbiFMFrA (ORCPT + 99 others); Mon, 13 Jun 2022 01:47:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236378AbiFMFqn (ORCPT ); Mon, 13 Jun 2022 01:46:43 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 025F46581; Sun, 12 Jun 2022 22:46:39 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 25D5kccK099819; Mon, 13 Jun 2022 00:46:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1655099198; bh=YGrd/7kl44LtBnocymnKeoW4pEzFWqJ8jpENxUsO5Ug=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=cXuRNnIsDUbn1d/dCjQoZ9pn56r+PMRmMYMsJa60XoJO/WOv5vjBD9roceAjAq8Zf TVMx5jXH8rQc3IuA15atWOMarprN7LMGaY9SX1uom0MagJ2uQlqTXwGor2CKKDm3Mo 0z26zVtgZ8w6/BYOY6MDKJSzbGyA0YqV/eGSevHg= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 25D5kcUj118310 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Jun 2022 00:46:38 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 13 Jun 2022 00:46:38 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Mon, 13 Jun 2022 00:46:38 -0500 Received: from [172.24.145.198] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 25D5kZtT073781; Mon, 13 Jun 2022 00:46:35 -0500 Message-ID: <2aa6259b-92b8-e169-7004-1876a7aaa1fd@ti.com> Date: Mon, 13 Jun 2022 11:16:34 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] gpio: davinci: Add support for system suspend/resume PM Content-Language: en-US To: Andy Shevchenko CC: Vignesh Raghavendra , Devarsh Thakkar , Keerthy , Linus Walleij , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List References: <20220610054622.21281-1-a-govindraju@ti.com> From: Aswath Govindraju In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 Hi Andy, On 10/06/22 17:50, Andy Shevchenko wrote: > 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 > Fixed this in respin > ... > >> + writel_relaxed(0xFFFFFFFF, &g->intstat); > > GENMASK(31, 0) ? Used this instead of the direct value in the respin > > ... > >> +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? Used pm_sleep_ptr instead of the __maybe_unused in the respin. Thank you for the review. I have posted a respin(v3) for this patch, https://patchwork.ozlabs.org/project/linux-gpio/patch/20220613054310.21186-1-a-govindraju@ti.com/ -- Thanks, Aswath