Message ID | 20221018084905.21717-3-clamor95@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | gpio: tegra: Convert to immutable irq chip | expand |
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[] = {
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(-)