Message ID | 20221018084905.21717-3-clamor95@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1850321wrs; Tue, 18 Oct 2022 02:05:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GVH3hTqwv64o1JD4aOOT4Ptl4yH1aOoZTmmzgZ+Ym7Y6SD5dmT8kkRitaYs7rRVpgTKMZ X-Received: by 2002:a17:906:eec9:b0:73d:c369:690f with SMTP id wu9-20020a170906eec900b0073dc369690fmr1562025ejb.767.1666083935511; Tue, 18 Oct 2022 02:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666083935; cv=none; d=google.com; s=arc-20160816; b=LDeB7Z3w9zJ3W8ITVP0V5XYdD3WeslrqX/59yD1ntKZ96tTKI3GJAY2n6JkMvLwUiC d98sp5jLFF2NCBZEfrtRk+WO/HZIEoVobMep2vUWeGs+NNWQe9kEwnYt36+nm0bKoMd4 MJ2BnwwJGs8NmnRWCfylWAzvD2UoXUEpXTfEwJjLqXoUDbkmC0PWhwoAmp5mXHt/msfA vs66TRHx+8Swjf4SnAkrinuHl2UVTj/uQ9oaukT8SBSEeIaX8PMBvsAtewTtGPmu65zo Sdukl3HicAwVY5OepgsdodJEfngev5BymCAaG2/zHWxUNmjt6UPPsQkJkB6ikeJi9zKV Pirw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S11K4vBoZGON508rytYjLm5ClL9jYcwO7synKUjPE5g=; b=vk5QJekMmGaAeJYGEHwUmNoAUWHm5dGJg4Qdyxh/x+PaKm4T2tTjOVc0nwgQF7BN6v rj7bEK3f2oVxRX0Fn0h+ZifEFRe8TjFx1k+9NM4BFzO9luadSa1IBTKzFbIXHFLxads3 uuav/sb/jiHKtN95QMN6xWqrpIlrj/sMIHAdcZQwtYEIK0SsI4jQJLIk8QScY5ns3DoY Vgt3LOMGLIJMnsslp6jCSZKH/o3z4NnXIowtgSvOr6y6APwBkVUKJju7ordQmDybjlJk 9XaTT+bfpflXs9SEGYZ2zTHRPyr6q5wRxq1NzpC0CTfRC+qILborBFvSuVul8TQK64YR UcPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f0NcEixT; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa44-20020a17090786ac00b0078a10c159b4si11371385ejc.290.2022.10.18.02.05.10; Tue, 18 Oct 2022 02:05:35 -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=f0NcEixT; 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 S231178AbiJRIuG (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Tue, 18 Oct 2022 04:50:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbiJRIt5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 18 Oct 2022 04:49:57 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97AC5FAD4; Tue, 18 Oct 2022 01:49:29 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id h8so17010569lja.11; Tue, 18 Oct 2022 01:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S11K4vBoZGON508rytYjLm5ClL9jYcwO7synKUjPE5g=; b=f0NcEixTYGOiFkW5GEnnTneNS4jwWS4EYYcTionijTwvaum39D+rS7wbM6VENJOl61 YNt/CM+RiaTh28efu7Y3tRH/YvJuseLjdBrutpYSwiSLbQRfcYdACpnL3jqKL6+XTcAO kV4DU83geA8e0ASM96bwoiRjGiXYH+LxJstVPLzkwgGAPIDDXPFJxMNtQ/BY4CF25Tab QrT26rabQ7maetDkzZUE4gjTfLgkDg7ru+61g0AD7wzVHI3XniaTG357bOh0QN/nukLo GQ/seikoPNOMWxq8AK2Mk9jKt399skq1703f64w/2Iih0ij9sA/WA8QK28vLWzzGO98k 4etw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S11K4vBoZGON508rytYjLm5ClL9jYcwO7synKUjPE5g=; b=OwlefIaBYMEW1MacG7wT95eYlYXhl+Dbg2c2pfBT25jCGQ+80vEGyMxggIDlEK5yoD ZpL9o+fJJf8MrTmHo9oqdQznw9Vx6u31GOVgqBfqyJxVw54EFNZKL4AcaiuW/02J62xH 8lqH5myYrxbY8rZOovaNqjSUe8hdqHl2U+0G6HwcHlqkU61L+1iUa7GpvJw6kwHWc1yK qpKd/+n6eTuk3Dasr9APqfN4mkANivevfXg8Czzc+PyB2+7m5oAbvF3Qqzmfn0cRgLNJ 6eKbkNsy6Bb/DyyNnq14a8Qjd/jmfvqTnSkIYo2GC7sbI9/+PqexbmP3MFFcn1LkbpUS SCHA== X-Gm-Message-State: ACrzQf2t0HNJSH9XnOiZyZ2JwmfLTRw/nH1uat0vcrnk5pztVNZksUlS Dx7woRHRI7NKdOnRctjCMzY= X-Received: by 2002:a2e:92d5:0:b0:26f:a674:94ac with SMTP id k21-20020a2e92d5000000b0026fa67494acmr704419ljh.470.1666082968143; Tue, 18 Oct 2022 01:49:28 -0700 (PDT) Received: from localhost.localdomain ([188.163.112.49]) by smtp.gmail.com with ESMTPSA id e10-20020a05651236ca00b004949f7cbb6esm1771890lfs.79.2022.10.18.01.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 01:49:27 -0700 (PDT) From: Svyatoslav Ryhel <clamor95@gmail.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Thierry Reding <thierry.reding@gmail.com>, Jonathan Hunter <jonathanh@nvidia.com>, Dmitry Osipenko <digetx@gmail.com> Cc: linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/2] gpio: tegra: Switch to new *_PM_OPS macros Date: Tue, 18 Oct 2022 11:49:05 +0300 Message-Id: <20221018084905.21717-3-clamor95@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221018084905.21717-1-clamor95@gmail.com> References: <20221018084905.21717-1-clamor95@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747015628822532974?= X-GMAIL-MSGID: =?utf-8?q?1747015628822532974?= |
Series |
gpio: tegra: Convert to immutable irq chip
|
|
Commit Message
Svyatoslav Ryhel
Oct. 18, 2022, 8:49 a.m. UTC
Since SET_*_PM_OPS() were deprecated, switch to new *_PM_OPS.
The callbacks that are only useful with CONFIG_PM_SLEEP is enabled,
are now wrapped with a pm_sleep_ptr().
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/gpio/gpio-tegra.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
Comments
Hi Svyatoslav, Thank you for the patch! Yet something to improve: [auto build test ERROR on tegra/for-next] [also build test ERROR on brgl/gpio/for-next tegra-drm/drm/tegra/for-next linus/master v6.1-rc1] [cannot apply to next-20221018] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Svyatoslav-Ryhel/gpio-tegra-Convert-to-immutable-irq-chip/20221018-165123 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next patch link: https://lore.kernel.org/r/20221018084905.21717-3-clamor95%40gmail.com patch subject: [PATCH v3 2/2] gpio: tegra: Switch to new *_PM_OPS macros config: arc-randconfig-r043-20221017 compiler: arceb-elf-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/c54ab03745fb5e4eb7d851a47c5631fd683604c0 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Svyatoslav-Ryhel/gpio-tegra-Convert-to-immutable-irq-chip/20221018-165123 git checkout c54ab03745fb5e4eb7d851a47c5631fd683604c0 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/gpio/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): In file included from include/linux/cpumask.h:10, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:62, from include/linux/irq.h:14, from drivers/gpio/gpio-tegra.c:14: drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_resume': >> drivers/gpio/gpio-tegra.c:472:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/kernel.h:55:33: note: in definition of macro 'ARRAY_SIZE' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ >> drivers/gpio/gpio-tegra.c:472:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/kernel.h:55:48: note: in definition of macro 'ARRAY_SIZE' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ In file included from arch/arc/include/asm/cache.h:28, from include/linux/cache.h:6, from include/linux/irq.h:13: >> drivers/gpio/gpio-tegra.c:472:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO' 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:51: note: in expansion of macro '__same_type' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/gpio/gpio-tegra.c:472:33: note: in expansion of macro 'ARRAY_SIZE' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~~~~~~~~~ >> drivers/gpio/gpio-tegra.c:472:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO' 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:51: note: in expansion of macro '__same_type' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/gpio/gpio-tegra.c:472:33: note: in expansion of macro 'ARRAY_SIZE' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~~~~~~~~~ include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/gpio/gpio-tegra.c:472:33: note: in expansion of macro 'ARRAY_SIZE' 472 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~~~~~~~~~ >> drivers/gpio/gpio-tegra.c:475:52: error: 'struct tegra_gpio_bank' has no member named 'cnf' 475 | tegra_gpio_writel(tgi, bank->cnf[p], | ^~ >> drivers/gpio/gpio-tegra.c:481:62: error: 'struct tegra_gpio_bank' has no member named 'dbc_enb'; did you mean 'dbc_cnt'? 481 | tegra_gpio_writel(tgi, bank->dbc_enb[p], | ^~~~~~~ | dbc_cnt >> drivers/gpio/gpio-tegra.c:485:52: error: 'struct tegra_gpio_bank' has no member named 'out' 485 | tegra_gpio_writel(tgi, bank->out[p], | ^~ drivers/gpio/gpio-tegra.c:487:52: error: 'struct tegra_gpio_bank' has no member named 'oe' 487 | tegra_gpio_writel(tgi, bank->oe[p], | ^~ >> drivers/gpio/gpio-tegra.c:489:52: error: 'struct tegra_gpio_bank' has no member named 'int_lvl' 489 | tegra_gpio_writel(tgi, bank->int_lvl[p], | ^~ >> drivers/gpio/gpio-tegra.c:491:52: error: 'struct tegra_gpio_bank' has no member named 'int_enb' 491 | tegra_gpio_writel(tgi, bank->int_enb[p], | ^~ drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_suspend': drivers/gpio/gpio-tegra.c:507:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/kernel.h:55:33: note: in definition of macro 'ARRAY_SIZE' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/gpio/gpio-tegra.c:507:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/kernel.h:55:48: note: in definition of macro 'ARRAY_SIZE' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~ drivers/gpio/gpio-tegra.c:507:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO' 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:51: note: in expansion of macro '__same_type' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/gpio/gpio-tegra.c:507:33: note: in expansion of macro 'ARRAY_SIZE' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~~~~~~~~~ drivers/gpio/gpio-tegra.c:507:48: error: 'struct tegra_gpio_bank' has no member named 'oe' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~ include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO' 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:51: note: in expansion of macro '__same_type' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/gpio/gpio-tegra.c:507:33: note: in expansion of macro 'ARRAY_SIZE' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~~~~~~~~~ include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); }))) | ^ include/linux/compiler.h:240:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO' 240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) | ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:55:59: note: in expansion of macro '__must_be_array' 55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~~~~~~~~~~~ drivers/gpio/gpio-tegra.c:507:33: note: in expansion of macro 'ARRAY_SIZE' 507 | for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { | ^~~~~~~~~~ drivers/gpio/gpio-tegra.c:510:29: error: 'struct tegra_gpio_bank' has no member named 'cnf' 510 | bank->cnf[p] = tegra_gpio_readl(tgi, | ^~ drivers/gpio/gpio-tegra.c:512:29: error: 'struct tegra_gpio_bank' has no member named 'out' 512 | bank->out[p] = tegra_gpio_readl(tgi, | ^~ drivers/gpio/gpio-tegra.c:514:29: error: 'struct tegra_gpio_bank' has no member named 'oe' 514 | bank->oe[p] = tegra_gpio_readl(tgi, | ^~ drivers/gpio/gpio-tegra.c:517:39: error: 'struct tegra_gpio_bank' has no member named 'dbc_enb'; did you mean 'dbc_cnt'? 517 | bank->dbc_enb[p] = tegra_gpio_readl(tgi, | ^~~~~~~ | dbc_cnt drivers/gpio/gpio-tegra.c:519:39: error: 'struct tegra_gpio_bank' has no member named 'dbc_enb'; did you mean 'dbc_cnt'? 519 | bank->dbc_enb[p] = (bank->dbc_enb[p] << 8) | | ^~~~~~~ | dbc_cnt drivers/gpio/gpio-tegra.c:519:59: error: 'struct tegra_gpio_bank' has no member named 'dbc_enb'; did you mean 'dbc_cnt'? 519 | bank->dbc_enb[p] = (bank->dbc_enb[p] << 8) | | ^~~~~~~ | dbc_cnt drivers/gpio/gpio-tegra.c:520:63: error: 'struct tegra_gpio_bank' has no member named 'dbc_enb'; did you mean 'dbc_cnt'? 520 | bank->dbc_enb[p]; | ^~~~~~~ | dbc_cnt drivers/gpio/gpio-tegra.c:523:29: error: 'struct tegra_gpio_bank' has no member named 'int_enb' 523 | bank->int_enb[p] = tegra_gpio_readl(tgi, | ^~ drivers/gpio/gpio-tegra.c:525:29: error: 'struct tegra_gpio_bank' has no member named 'int_lvl' 525 | bank->int_lvl[p] = tegra_gpio_readl(tgi, | ^~ >> drivers/gpio/gpio-tegra.c:529:52: error: 'struct tegra_gpio_bank' has no member named 'wake_enb' 529 | tegra_gpio_writel(tgi, bank->wake_enb[p], | ^~ drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_irq_set_wake': drivers/gpio/gpio-tegra.c:565:21: error: 'struct tegra_gpio_bank' has no member named 'wake_enb' 565 | bank->wake_enb[port] |= mask; | ^~ drivers/gpio/gpio-tegra.c:567:21: error: 'struct tegra_gpio_bank' has no member named 'wake_enb' 567 | bank->wake_enb[port] &= ~mask; | ^~ >> drivers/gpio/gpio-tegra.c:543:13: warning: variable 'port' set but not used [-Wunused-but-set-variable] 543 | u32 port, bit, mask; | ^~~~ vim +472 drivers/gpio/gpio-tegra.c 3c92db9ac0ca3e arch/arm/mach-tegra/gpio.c Erik Gilling 2010-03-15 463 8939ddc76a2f33 drivers/gpio/gpio-tegra.c Laxman Dewangan 2012-11-07 464 static int tegra_gpio_resume(struct device *dev) 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 465 { 7ddb7dce0ab69a drivers/gpio/gpio-tegra.c Wolfram Sang 2018-10-21 466 struct tegra_gpio_info *tgi = dev_get_drvdata(dev); 539b7a39f5ec4c drivers/gpio/gpio-tegra.c Thierry Reding 2017-07-24 467 unsigned int b, p; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 468 b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 469 for (b = 0; b < tgi->bank_count; b++) { b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 470 struct tegra_gpio_bank *bank = &tgi->bank_info[b]; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 471 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 @472 for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 473 unsigned int gpio = (b << 5) | (p << 3); 4bc178608baec1 drivers/gpio/gpio-tegra.c Thierry Reding 2017-07-24 474 b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 @475 tegra_gpio_writel(tgi, bank->cnf[p], b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 476 GPIO_CNF(tgi, gpio)); 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 477 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 478 if (tgi->soc->debounce_supported) { 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 479 tegra_gpio_writel(tgi, bank->dbc_cnt[p], 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 480 GPIO_DBC_CNT(tgi, gpio)); 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 @481 tegra_gpio_writel(tgi, bank->dbc_enb[p], 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 482 GPIO_MSK_DBC_EN(tgi, gpio)); 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 483 } 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 484 b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 @485 tegra_gpio_writel(tgi, bank->out[p], b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 486 GPIO_OUT(tgi, gpio)); b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 487 tegra_gpio_writel(tgi, bank->oe[p], b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 488 GPIO_OE(tgi, gpio)); b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 @489 tegra_gpio_writel(tgi, bank->int_lvl[p], b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 490 GPIO_INT_LVL(tgi, gpio)); b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 @491 tegra_gpio_writel(tgi, bank->int_enb[p], b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 492 GPIO_INT_ENB(tgi, gpio)); 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 493 } 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 494 } 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 495 8939ddc76a2f33 drivers/gpio/gpio-tegra.c Laxman Dewangan 2012-11-07 496 return 0; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 497 } 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 498 8939ddc76a2f33 drivers/gpio/gpio-tegra.c Laxman Dewangan 2012-11-07 499 static int tegra_gpio_suspend(struct device *dev) 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 500 { 7ddb7dce0ab69a drivers/gpio/gpio-tegra.c Wolfram Sang 2018-10-21 501 struct tegra_gpio_info *tgi = dev_get_drvdata(dev); 539b7a39f5ec4c drivers/gpio/gpio-tegra.c Thierry Reding 2017-07-24 502 unsigned int b, p; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 503 b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 504 for (b = 0; b < tgi->bank_count; b++) { b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 505 struct tegra_gpio_bank *bank = &tgi->bank_info[b]; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 506 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 507 for (p = 0; p < ARRAY_SIZE(bank->oe); p++) { 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 508 unsigned int gpio = (b << 5) | (p << 3); 4bc178608baec1 drivers/gpio/gpio-tegra.c Thierry Reding 2017-07-24 509 b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 510 bank->cnf[p] = tegra_gpio_readl(tgi, b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 511 GPIO_CNF(tgi, gpio)); b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 512 bank->out[p] = tegra_gpio_readl(tgi, b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 513 GPIO_OUT(tgi, gpio)); b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 514 bank->oe[p] = tegra_gpio_readl(tgi, b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 515 GPIO_OE(tgi, gpio)); 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 516 if (tgi->soc->debounce_supported) { 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 517 bank->dbc_enb[p] = tegra_gpio_readl(tgi, 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 518 GPIO_MSK_DBC_EN(tgi, gpio)); 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 519 bank->dbc_enb[p] = (bank->dbc_enb[p] << 8) | 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 520 bank->dbc_enb[p]; 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 521 } 3737de42afb8d7 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 522 b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 523 bank->int_enb[p] = tegra_gpio_readl(tgi, b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 524 GPIO_INT_ENB(tgi, gpio)); b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 525 bank->int_lvl[p] = tegra_gpio_readl(tgi, b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 526 GPIO_INT_LVL(tgi, gpio)); 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 527 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 528 /* Enable gpio irq for wake up source */ b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 @529 tegra_gpio_writel(tgi, bank->wake_enb[p], b546be0db95584 drivers/gpio/gpio-tegra.c Laxman Dewangan 2016-04-25 530 GPIO_INT_ENB(tgi, gpio)); 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 531 } 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 532 } 9ccaf106c2cf15 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2019-12-15 533 8939ddc76a2f33 drivers/gpio/gpio-tegra.c Laxman Dewangan 2012-11-07 534 return 0; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 535 } 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 536 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 537 static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable) 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 538 { 66fecef5bde078 drivers/gpio/gpio-tegra.c Thierry Reding 2020-11-27 539 struct gpio_chip *chip = irq_data_get_irq_chip_data(d); 66fecef5bde078 drivers/gpio/gpio-tegra.c Thierry Reding 2020-11-27 540 struct tegra_gpio_info *tgi = gpiochip_get_data(chip); 66fecef5bde078 drivers/gpio/gpio-tegra.c Thierry Reding 2020-11-27 541 struct tegra_gpio_bank *bank; 539b7a39f5ec4c drivers/gpio/gpio-tegra.c Thierry Reding 2017-07-24 542 unsigned int gpio = d->hwirq; 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 @543 u32 port, bit, mask; 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 544 int err; f56d979cc58e9a drivers/gpio/gpio-tegra.c Dmitry Osipenko 2019-12-15 545 66fecef5bde078 drivers/gpio/gpio-tegra.c Thierry Reding 2020-11-27 546 bank = &tgi->bank_info[GPIO_BANK(d->hwirq)]; 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 547 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 548 port = GPIO_PORT(gpio); 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 549 bit = GPIO_BIT(gpio); 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 550 mask = BIT(bit); 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 551 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 552 err = irq_set_irq_wake(tgi->irqs[bank->bank], enable); 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 553 if (err) 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 554 return err; 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 555 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 556 if (d->parent_data) { 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 557 err = irq_chip_set_wake_parent(d, enable); 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 558 if (err) { 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 559 irq_set_irq_wake(tgi->irqs[bank->bank], !enable); 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 560 return err; 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 561 } 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 562 } 27f8feea4091a7 drivers/gpio/gpio-tegra.c Dmitry Osipenko 2021-01-12 563 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 564 if (enable) 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 565 bank->wake_enb[port] |= mask; 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 566 else 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 567 bank->wake_enb[port] &= ~mask; 203f31cb86eb6a drivers/gpio/gpio-tegra.c Joseph Lo 2013-04-03 568 f56d979cc58e9a drivers/gpio/gpio-tegra.c Dmitry Osipenko 2019-12-15 569 return 0; 2e47b8b3c2dc0f arch/arm/mach-tegra/gpio.c Colin Cross 2010-04-07 570 } 3c92db9ac0ca3e arch/arm/mach-tegra/gpio.c Erik Gilling 2010-03-15 571
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 5b265a6fd3c1..ce17cc1a1cab 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -461,7 +461,6 @@ static int tegra_gpio_populate_parent_fwspec(struct gpio_chip *chip, return 0; } -#ifdef CONFIG_PM_SLEEP static int tegra_gpio_resume(struct device *dev) { struct tegra_gpio_info *tgi = dev_get_drvdata(dev); @@ -569,7 +568,6 @@ static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable) return 0; } -#endif static int tegra_gpio_irq_set_affinity(struct irq_data *data, const struct cpumask *dest, @@ -613,9 +611,7 @@ static const struct irq_chip tegra_gpio_irq_chip = { .irq_mask = tegra_gpio_irq_mask, .irq_unmask = tegra_gpio_irq_unmask, .irq_set_type = tegra_gpio_irq_set_type, -#ifdef CONFIG_PM_SLEEP - .irq_set_wake = tegra_gpio_irq_set_wake, -#endif + .irq_set_wake = pm_sleep_ptr(tegra_gpio_irq_set_wake), .irq_print_chip = tegra_gpio_irq_print_chip, .irq_request_resources = tegra_gpio_irq_request_resources, .irq_release_resources = tegra_gpio_irq_release_resources, @@ -629,9 +625,7 @@ static const struct irq_chip tegra210_gpio_irq_chip = { .irq_unmask = tegra_gpio_irq_unmask, .irq_set_affinity = tegra_gpio_irq_set_affinity, .irq_set_type = tegra_gpio_irq_set_type, -#ifdef CONFIG_PM_SLEEP - .irq_set_wake = tegra_gpio_irq_set_wake, -#endif + .irq_set_wake = pm_sleep_ptr(tegra_gpio_irq_set_wake), .irq_print_chip = tegra_gpio_irq_print_chip, .irq_request_resources = tegra_gpio_irq_request_resources, .irq_release_resources = tegra_gpio_irq_release_resources, @@ -681,7 +675,7 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) #endif static const struct dev_pm_ops tegra_gpio_pm_ops = { - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume) + NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume) }; static const struct of_device_id tegra_pmc_of_match[] = {