* drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
@ 2026-08-14 15:30 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-08-14 15:30 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Joy Zou <joy.zou@nxp.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2f1baf1fc8929e6c48370be543ad028ac7ad4131
commit: 162e23657e5379f07c6404dbfbf4367cb438ea7d regulator: pf0900: Add PMIC PF0900 support
date: 1 year ago
:::::: branch date: 16 hours ago
:::::: commit date: 1 year ago
config: powerpc-randconfig-r053-20260812 (https://download.01.org/0day-ci/archive/20260814/202608142345.WXCldvhP-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 162e23657e53 ("regulator: pf0900: Add PMIC PF0900 support")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202608142345.WXCldvhP-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
vim +891 drivers/regulator/pf0900-regulator.c
162e23657e5379 Joy Zou 2025-07-31 826
162e23657e5379 Joy Zou 2025-07-31 827 static int pf0900_i2c_probe(struct i2c_client *i2c)
162e23657e5379 Joy Zou 2025-07-31 828 {
162e23657e5379 Joy Zou 2025-07-31 829 const struct pf0900_regulator_desc *regulator_desc;
162e23657e5379 Joy Zou 2025-07-31 830 const struct pf0900_drvdata *drvdata = NULL;
162e23657e5379 Joy Zou 2025-07-31 831 struct device_node *np = i2c->dev.of_node;
162e23657e5379 Joy Zou 2025-07-31 832 unsigned int device_id, device_fam, i;
162e23657e5379 Joy Zou 2025-07-31 833 struct regulator_config config = { };
162e23657e5379 Joy Zou 2025-07-31 834 struct pf0900 *pf0900;
162e23657e5379 Joy Zou 2025-07-31 835 int ret;
162e23657e5379 Joy Zou 2025-07-31 836
162e23657e5379 Joy Zou 2025-07-31 837 if (!i2c->irq)
162e23657e5379 Joy Zou 2025-07-31 838 return dev_err_probe(&i2c->dev, -EINVAL, "No IRQ configured?\n");
162e23657e5379 Joy Zou 2025-07-31 839
162e23657e5379 Joy Zou 2025-07-31 840 pf0900 = devm_kzalloc(&i2c->dev, sizeof(struct pf0900), GFP_KERNEL);
162e23657e5379 Joy Zou 2025-07-31 841 if (!pf0900)
162e23657e5379 Joy Zou 2025-07-31 842 return -ENOMEM;
162e23657e5379 Joy Zou 2025-07-31 843
162e23657e5379 Joy Zou 2025-07-31 844 drvdata = device_get_match_data(&i2c->dev);
162e23657e5379 Joy Zou 2025-07-31 845 if (!drvdata)
162e23657e5379 Joy Zou 2025-07-31 846 return dev_err_probe(&i2c->dev, -EINVAL, "unable to find driver data\n");
162e23657e5379 Joy Zou 2025-07-31 847
162e23657e5379 Joy Zou 2025-07-31 848 regulator_desc = drvdata->desc;
162e23657e5379 Joy Zou 2025-07-31 849 pf0900->drvdata = drvdata;
162e23657e5379 Joy Zou 2025-07-31 850 pf0900->crc_en = of_property_read_bool(np, "nxp,i2c-crc-enable");
162e23657e5379 Joy Zou 2025-07-31 851 pf0900->irq = i2c->irq;
162e23657e5379 Joy Zou 2025-07-31 852 pf0900->dev = &i2c->dev;
162e23657e5379 Joy Zou 2025-07-31 853 pf0900->addr = i2c->addr;
162e23657e5379 Joy Zou 2025-07-31 854
162e23657e5379 Joy Zou 2025-07-31 855 dev_set_drvdata(&i2c->dev, pf0900);
162e23657e5379 Joy Zou 2025-07-31 856
162e23657e5379 Joy Zou 2025-07-31 857 pf0900->regmap = devm_regmap_init(&i2c->dev, &pf0900_regmap_bus, &i2c->dev,
162e23657e5379 Joy Zou 2025-07-31 858 &pf0900_regmap_config);
162e23657e5379 Joy Zou 2025-07-31 859 if (IS_ERR(pf0900->regmap))
162e23657e5379 Joy Zou 2025-07-31 860 return dev_err_probe(&i2c->dev, PTR_ERR(pf0900->regmap),
162e23657e5379 Joy Zou 2025-07-31 861 "regmap initialization failed\n");
162e23657e5379 Joy Zou 2025-07-31 862 ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_ID, &device_id);
162e23657e5379 Joy Zou 2025-07-31 863 if (ret)
162e23657e5379 Joy Zou 2025-07-31 864 return dev_err_probe(&i2c->dev, ret, "Read device id error\n");
162e23657e5379 Joy Zou 2025-07-31 865
162e23657e5379 Joy Zou 2025-07-31 866 ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_FAM, &device_fam);
162e23657e5379 Joy Zou 2025-07-31 867 if (ret)
162e23657e5379 Joy Zou 2025-07-31 868 return dev_err_probe(&i2c->dev, ret, "Read device fam error\n");
162e23657e5379 Joy Zou 2025-07-31 869
162e23657e5379 Joy Zou 2025-07-31 870 /* Check your board and dts for match the right pmic */
162e23657e5379 Joy Zou 2025-07-31 871 if (device_fam == 0x09 && (device_id & 0x1F) != 0x0)
162e23657e5379 Joy Zou 2025-07-31 872 return dev_err_probe(&i2c->dev, -EINVAL, "Device id(%x) mismatched\n",
162e23657e5379 Joy Zou 2025-07-31 873 device_id >> 4);
162e23657e5379 Joy Zou 2025-07-31 874
162e23657e5379 Joy Zou 2025-07-31 875 for (i = 0; i < drvdata->rcnt; i++) {
162e23657e5379 Joy Zou 2025-07-31 876 const struct regulator_desc *desc;
162e23657e5379 Joy Zou 2025-07-31 877 const struct pf0900_regulator_desc *r;
162e23657e5379 Joy Zou 2025-07-31 878
162e23657e5379 Joy Zou 2025-07-31 879 r = ®ulator_desc[i];
162e23657e5379 Joy Zou 2025-07-31 880 desc = &r->desc;
162e23657e5379 Joy Zou 2025-07-31 881 config.regmap = pf0900->regmap;
162e23657e5379 Joy Zou 2025-07-31 882 config.driver_data = (void *)r;
162e23657e5379 Joy Zou 2025-07-31 883 config.dev = pf0900->dev;
162e23657e5379 Joy Zou 2025-07-31 884
162e23657e5379 Joy Zou 2025-07-31 885 pf0900->rdevs[i] = devm_regulator_register(pf0900->dev, desc, &config);
162e23657e5379 Joy Zou 2025-07-31 886 if (IS_ERR(pf0900->rdevs[i]))
162e23657e5379 Joy Zou 2025-07-31 887 return dev_err_probe(pf0900->dev, PTR_ERR(pf0900->rdevs[i]),
162e23657e5379 Joy Zou 2025-07-31 888 "Failed to register regulator(%s)\n", desc->name);
162e23657e5379 Joy Zou 2025-07-31 889 }
162e23657e5379 Joy Zou 2025-07-31 890
162e23657e5379 Joy Zou 2025-07-31 @891 ret = devm_request_threaded_irq(pf0900->dev, pf0900->irq, NULL,
162e23657e5379 Joy Zou 2025-07-31 892 pf0900_irq_handler,
162e23657e5379 Joy Zou 2025-07-31 893 (IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
162e23657e5379 Joy Zou 2025-07-31 894 "pf0900-irq", pf0900);
162e23657e5379 Joy Zou 2025-07-31 895
162e23657e5379 Joy Zou 2025-07-31 896 if (ret != 0)
162e23657e5379 Joy Zou 2025-07-31 897 return dev_err_probe(pf0900->dev, ret, "Failed to request IRQ: %d\n",
162e23657e5379 Joy Zou 2025-07-31 898 pf0900->irq);
162e23657e5379 Joy Zou 2025-07-31 899 /*
162e23657e5379 Joy Zou 2025-07-31 900 * The PWRUP_M is unmasked by default. When the device enter in RUN state,
162e23657e5379 Joy Zou 2025-07-31 901 * it will assert the PWRUP_I interrupt and assert the INTB pin to inform
162e23657e5379 Joy Zou 2025-07-31 902 * the MCU that it has finished the power up sequence properly.
162e23657e5379 Joy Zou 2025-07-31 903 */
162e23657e5379 Joy Zou 2025-07-31 904 ret = regmap_write_bits(pf0900->regmap, PF0900_REG_STATUS1_INT, PF0900_IRQ_PWRUP,
162e23657e5379 Joy Zou 2025-07-31 905 PF0900_IRQ_PWRUP);
162e23657e5379 Joy Zou 2025-07-31 906 if (ret)
162e23657e5379 Joy Zou 2025-07-31 907 return dev_err_probe(&i2c->dev, ret, "Clean PWRUP_I error\n");
162e23657e5379 Joy Zou 2025-07-31 908
162e23657e5379 Joy Zou 2025-07-31 909 /* mask interrupt PWRUP */
162e23657e5379 Joy Zou 2025-07-31 910 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_STATUS1_MSK, PF0900_IRQ_PWRUP,
162e23657e5379 Joy Zou 2025-07-31 911 PF0900_IRQ_PWRUP);
162e23657e5379 Joy Zou 2025-07-31 912 if (ret)
162e23657e5379 Joy Zou 2025-07-31 913 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 914
162e23657e5379 Joy Zou 2025-07-31 915 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_ILIM_MSK, PF0900_IRQ_SW1_IL |
162e23657e5379 Joy Zou 2025-07-31 916 PF0900_IRQ_SW2_IL | PF0900_IRQ_SW3_IL | PF0900_IRQ_SW4_IL |
162e23657e5379 Joy Zou 2025-07-31 917 PF0900_IRQ_SW5_IL, 0);
162e23657e5379 Joy Zou 2025-07-31 918 if (ret)
162e23657e5379 Joy Zou 2025-07-31 919 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 920
162e23657e5379 Joy Zou 2025-07-31 921 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_UV_MSK, PF0900_IRQ_SW1_UV |
162e23657e5379 Joy Zou 2025-07-31 922 PF0900_IRQ_SW2_UV | PF0900_IRQ_SW3_UV | PF0900_IRQ_SW4_UV |
162e23657e5379 Joy Zou 2025-07-31 923 PF0900_IRQ_SW5_UV, 0);
162e23657e5379 Joy Zou 2025-07-31 924 if (ret)
162e23657e5379 Joy Zou 2025-07-31 925 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 926
162e23657e5379 Joy Zou 2025-07-31 927 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_OV_MSK, PF0900_IRQ_SW1_OV |
162e23657e5379 Joy Zou 2025-07-31 928 PF0900_IRQ_SW2_OV | PF0900_IRQ_SW3_OV | PF0900_IRQ_SW4_OV |
162e23657e5379 Joy Zou 2025-07-31 929 PF0900_IRQ_SW5_OV, 0);
162e23657e5379 Joy Zou 2025-07-31 930 if (ret)
162e23657e5379 Joy Zou 2025-07-31 931 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 932
162e23657e5379 Joy Zou 2025-07-31 933 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_ILIM_MSK, PF0900_IRQ_LDO1_IL |
162e23657e5379 Joy Zou 2025-07-31 934 PF0900_IRQ_LDO2_IL | PF0900_IRQ_LDO3_IL, 0);
162e23657e5379 Joy Zou 2025-07-31 935 if (ret)
162e23657e5379 Joy Zou 2025-07-31 936 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 937
162e23657e5379 Joy Zou 2025-07-31 938 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_UV_MSK, PF0900_IRQ_LDO1_UV |
162e23657e5379 Joy Zou 2025-07-31 939 PF0900_IRQ_LDO2_UV | PF0900_IRQ_LDO3_UV | PF0900_IRQ_VAON_UV, 0);
162e23657e5379 Joy Zou 2025-07-31 940 if (ret)
162e23657e5379 Joy Zou 2025-07-31 941 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 942
162e23657e5379 Joy Zou 2025-07-31 943 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_OV_MSK, PF0900_IRQ_LDO1_OV |
162e23657e5379 Joy Zou 2025-07-31 944 PF0900_IRQ_LDO2_OV | PF0900_IRQ_LDO3_OV | PF0900_IRQ_VAON_OV, 0);
162e23657e5379 Joy Zou 2025-07-31 945 if (ret)
162e23657e5379 Joy Zou 2025-07-31 946 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 947
162e23657e5379 Joy Zou 2025-07-31 948 return 0;
162e23657e5379 Joy Zou 2025-07-31 949 }
162e23657e5379 Joy Zou 2025-07-31 950
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
@ 2026-07-10 14:04 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-07-10 14:04 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Joy Zou <joy.zou@nxp.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a635d6748234582ea287c5ffeae28b9b23f91c7e
commit: 162e23657e5379f07c6404dbfbf4367cb438ea7d regulator: pf0900: Add PMIC PF0900 support
date: 11 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 11 months ago
config: hexagon-randconfig-r051-20260709 (https://download.01.org/0day-ci/archive/20260710/202607102135.ba4qDt1l-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c279890c85da307abe34f10333442bbf72a60644)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 162e23657e53 ("regulator: pf0900: Add PMIC PF0900 support")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202607102135.ba4qDt1l-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
vim +891 drivers/regulator/pf0900-regulator.c
162e23657e5379 Joy Zou 2025-07-31 826
162e23657e5379 Joy Zou 2025-07-31 827 static int pf0900_i2c_probe(struct i2c_client *i2c)
162e23657e5379 Joy Zou 2025-07-31 828 {
162e23657e5379 Joy Zou 2025-07-31 829 const struct pf0900_regulator_desc *regulator_desc;
162e23657e5379 Joy Zou 2025-07-31 830 const struct pf0900_drvdata *drvdata = NULL;
162e23657e5379 Joy Zou 2025-07-31 831 struct device_node *np = i2c->dev.of_node;
162e23657e5379 Joy Zou 2025-07-31 832 unsigned int device_id, device_fam, i;
162e23657e5379 Joy Zou 2025-07-31 833 struct regulator_config config = { };
162e23657e5379 Joy Zou 2025-07-31 834 struct pf0900 *pf0900;
162e23657e5379 Joy Zou 2025-07-31 835 int ret;
162e23657e5379 Joy Zou 2025-07-31 836
162e23657e5379 Joy Zou 2025-07-31 837 if (!i2c->irq)
162e23657e5379 Joy Zou 2025-07-31 838 return dev_err_probe(&i2c->dev, -EINVAL, "No IRQ configured?\n");
162e23657e5379 Joy Zou 2025-07-31 839
162e23657e5379 Joy Zou 2025-07-31 840 pf0900 = devm_kzalloc(&i2c->dev, sizeof(struct pf0900), GFP_KERNEL);
162e23657e5379 Joy Zou 2025-07-31 841 if (!pf0900)
162e23657e5379 Joy Zou 2025-07-31 842 return -ENOMEM;
162e23657e5379 Joy Zou 2025-07-31 843
162e23657e5379 Joy Zou 2025-07-31 844 drvdata = device_get_match_data(&i2c->dev);
162e23657e5379 Joy Zou 2025-07-31 845 if (!drvdata)
162e23657e5379 Joy Zou 2025-07-31 846 return dev_err_probe(&i2c->dev, -EINVAL, "unable to find driver data\n");
162e23657e5379 Joy Zou 2025-07-31 847
162e23657e5379 Joy Zou 2025-07-31 848 regulator_desc = drvdata->desc;
162e23657e5379 Joy Zou 2025-07-31 849 pf0900->drvdata = drvdata;
162e23657e5379 Joy Zou 2025-07-31 850 pf0900->crc_en = of_property_read_bool(np, "nxp,i2c-crc-enable");
162e23657e5379 Joy Zou 2025-07-31 851 pf0900->irq = i2c->irq;
162e23657e5379 Joy Zou 2025-07-31 852 pf0900->dev = &i2c->dev;
162e23657e5379 Joy Zou 2025-07-31 853 pf0900->addr = i2c->addr;
162e23657e5379 Joy Zou 2025-07-31 854
162e23657e5379 Joy Zou 2025-07-31 855 dev_set_drvdata(&i2c->dev, pf0900);
162e23657e5379 Joy Zou 2025-07-31 856
162e23657e5379 Joy Zou 2025-07-31 857 pf0900->regmap = devm_regmap_init(&i2c->dev, &pf0900_regmap_bus, &i2c->dev,
162e23657e5379 Joy Zou 2025-07-31 858 &pf0900_regmap_config);
162e23657e5379 Joy Zou 2025-07-31 859 if (IS_ERR(pf0900->regmap))
162e23657e5379 Joy Zou 2025-07-31 860 return dev_err_probe(&i2c->dev, PTR_ERR(pf0900->regmap),
162e23657e5379 Joy Zou 2025-07-31 861 "regmap initialization failed\n");
162e23657e5379 Joy Zou 2025-07-31 862 ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_ID, &device_id);
162e23657e5379 Joy Zou 2025-07-31 863 if (ret)
162e23657e5379 Joy Zou 2025-07-31 864 return dev_err_probe(&i2c->dev, ret, "Read device id error\n");
162e23657e5379 Joy Zou 2025-07-31 865
162e23657e5379 Joy Zou 2025-07-31 866 ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_FAM, &device_fam);
162e23657e5379 Joy Zou 2025-07-31 867 if (ret)
162e23657e5379 Joy Zou 2025-07-31 868 return dev_err_probe(&i2c->dev, ret, "Read device fam error\n");
162e23657e5379 Joy Zou 2025-07-31 869
162e23657e5379 Joy Zou 2025-07-31 870 /* Check your board and dts for match the right pmic */
162e23657e5379 Joy Zou 2025-07-31 871 if (device_fam == 0x09 && (device_id & 0x1F) != 0x0)
162e23657e5379 Joy Zou 2025-07-31 872 return dev_err_probe(&i2c->dev, -EINVAL, "Device id(%x) mismatched\n",
162e23657e5379 Joy Zou 2025-07-31 873 device_id >> 4);
162e23657e5379 Joy Zou 2025-07-31 874
162e23657e5379 Joy Zou 2025-07-31 875 for (i = 0; i < drvdata->rcnt; i++) {
162e23657e5379 Joy Zou 2025-07-31 876 const struct regulator_desc *desc;
162e23657e5379 Joy Zou 2025-07-31 877 const struct pf0900_regulator_desc *r;
162e23657e5379 Joy Zou 2025-07-31 878
162e23657e5379 Joy Zou 2025-07-31 879 r = ®ulator_desc[i];
162e23657e5379 Joy Zou 2025-07-31 880 desc = &r->desc;
162e23657e5379 Joy Zou 2025-07-31 881 config.regmap = pf0900->regmap;
162e23657e5379 Joy Zou 2025-07-31 882 config.driver_data = (void *)r;
162e23657e5379 Joy Zou 2025-07-31 883 config.dev = pf0900->dev;
162e23657e5379 Joy Zou 2025-07-31 884
162e23657e5379 Joy Zou 2025-07-31 885 pf0900->rdevs[i] = devm_regulator_register(pf0900->dev, desc, &config);
162e23657e5379 Joy Zou 2025-07-31 886 if (IS_ERR(pf0900->rdevs[i]))
162e23657e5379 Joy Zou 2025-07-31 887 return dev_err_probe(pf0900->dev, PTR_ERR(pf0900->rdevs[i]),
162e23657e5379 Joy Zou 2025-07-31 888 "Failed to register regulator(%s)\n", desc->name);
162e23657e5379 Joy Zou 2025-07-31 889 }
162e23657e5379 Joy Zou 2025-07-31 890
162e23657e5379 Joy Zou 2025-07-31 @891 ret = devm_request_threaded_irq(pf0900->dev, pf0900->irq, NULL,
162e23657e5379 Joy Zou 2025-07-31 892 pf0900_irq_handler,
162e23657e5379 Joy Zou 2025-07-31 893 (IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
162e23657e5379 Joy Zou 2025-07-31 894 "pf0900-irq", pf0900);
162e23657e5379 Joy Zou 2025-07-31 895
162e23657e5379 Joy Zou 2025-07-31 896 if (ret != 0)
162e23657e5379 Joy Zou 2025-07-31 897 return dev_err_probe(pf0900->dev, ret, "Failed to request IRQ: %d\n",
162e23657e5379 Joy Zou 2025-07-31 898 pf0900->irq);
162e23657e5379 Joy Zou 2025-07-31 899 /*
162e23657e5379 Joy Zou 2025-07-31 900 * The PWRUP_M is unmasked by default. When the device enter in RUN state,
162e23657e5379 Joy Zou 2025-07-31 901 * it will assert the PWRUP_I interrupt and assert the INTB pin to inform
162e23657e5379 Joy Zou 2025-07-31 902 * the MCU that it has finished the power up sequence properly.
162e23657e5379 Joy Zou 2025-07-31 903 */
162e23657e5379 Joy Zou 2025-07-31 904 ret = regmap_write_bits(pf0900->regmap, PF0900_REG_STATUS1_INT, PF0900_IRQ_PWRUP,
162e23657e5379 Joy Zou 2025-07-31 905 PF0900_IRQ_PWRUP);
162e23657e5379 Joy Zou 2025-07-31 906 if (ret)
162e23657e5379 Joy Zou 2025-07-31 907 return dev_err_probe(&i2c->dev, ret, "Clean PWRUP_I error\n");
162e23657e5379 Joy Zou 2025-07-31 908
162e23657e5379 Joy Zou 2025-07-31 909 /* mask interrupt PWRUP */
162e23657e5379 Joy Zou 2025-07-31 910 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_STATUS1_MSK, PF0900_IRQ_PWRUP,
162e23657e5379 Joy Zou 2025-07-31 911 PF0900_IRQ_PWRUP);
162e23657e5379 Joy Zou 2025-07-31 912 if (ret)
162e23657e5379 Joy Zou 2025-07-31 913 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 914
162e23657e5379 Joy Zou 2025-07-31 915 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_ILIM_MSK, PF0900_IRQ_SW1_IL |
162e23657e5379 Joy Zou 2025-07-31 916 PF0900_IRQ_SW2_IL | PF0900_IRQ_SW3_IL | PF0900_IRQ_SW4_IL |
162e23657e5379 Joy Zou 2025-07-31 917 PF0900_IRQ_SW5_IL, 0);
162e23657e5379 Joy Zou 2025-07-31 918 if (ret)
162e23657e5379 Joy Zou 2025-07-31 919 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 920
162e23657e5379 Joy Zou 2025-07-31 921 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_UV_MSK, PF0900_IRQ_SW1_UV |
162e23657e5379 Joy Zou 2025-07-31 922 PF0900_IRQ_SW2_UV | PF0900_IRQ_SW3_UV | PF0900_IRQ_SW4_UV |
162e23657e5379 Joy Zou 2025-07-31 923 PF0900_IRQ_SW5_UV, 0);
162e23657e5379 Joy Zou 2025-07-31 924 if (ret)
162e23657e5379 Joy Zou 2025-07-31 925 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 926
162e23657e5379 Joy Zou 2025-07-31 927 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_OV_MSK, PF0900_IRQ_SW1_OV |
162e23657e5379 Joy Zou 2025-07-31 928 PF0900_IRQ_SW2_OV | PF0900_IRQ_SW3_OV | PF0900_IRQ_SW4_OV |
162e23657e5379 Joy Zou 2025-07-31 929 PF0900_IRQ_SW5_OV, 0);
162e23657e5379 Joy Zou 2025-07-31 930 if (ret)
162e23657e5379 Joy Zou 2025-07-31 931 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 932
162e23657e5379 Joy Zou 2025-07-31 933 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_ILIM_MSK, PF0900_IRQ_LDO1_IL |
162e23657e5379 Joy Zou 2025-07-31 934 PF0900_IRQ_LDO2_IL | PF0900_IRQ_LDO3_IL, 0);
162e23657e5379 Joy Zou 2025-07-31 935 if (ret)
162e23657e5379 Joy Zou 2025-07-31 936 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 937
162e23657e5379 Joy Zou 2025-07-31 938 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_UV_MSK, PF0900_IRQ_LDO1_UV |
162e23657e5379 Joy Zou 2025-07-31 939 PF0900_IRQ_LDO2_UV | PF0900_IRQ_LDO3_UV | PF0900_IRQ_VAON_UV, 0);
162e23657e5379 Joy Zou 2025-07-31 940 if (ret)
162e23657e5379 Joy Zou 2025-07-31 941 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 942
162e23657e5379 Joy Zou 2025-07-31 943 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_OV_MSK, PF0900_IRQ_LDO1_OV |
162e23657e5379 Joy Zou 2025-07-31 944 PF0900_IRQ_LDO2_OV | PF0900_IRQ_LDO3_OV | PF0900_IRQ_VAON_OV, 0);
162e23657e5379 Joy Zou 2025-07-31 945 if (ret)
162e23657e5379 Joy Zou 2025-07-31 946 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 947
162e23657e5379 Joy Zou 2025-07-31 948 return 0;
162e23657e5379 Joy Zou 2025-07-31 949 }
162e23657e5379 Joy Zou 2025-07-31 950
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
@ 2026-03-25 3:43 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-03-25 3:43 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Joy Zou <joy.zou@nxp.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bbeb83d3182abe0d245318e274e8531e5dd7a948
commit: 162e23657e5379f07c6404dbfbf4367cb438ea7d regulator: pf0900: Add PMIC PF0900 support
date: 8 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 8 months ago
config: s390-randconfig-r052-20260323 (https://download.01.org/0day-ci/archive/20260325/202603251157.0niwr65l-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c911b8492374942bf4cfe35411e90a35d3837f6a)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202603251157.0niwr65l-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
vim +891 drivers/regulator/pf0900-regulator.c
162e23657e5379 Joy Zou 2025-07-31 826
162e23657e5379 Joy Zou 2025-07-31 827 static int pf0900_i2c_probe(struct i2c_client *i2c)
162e23657e5379 Joy Zou 2025-07-31 828 {
162e23657e5379 Joy Zou 2025-07-31 829 const struct pf0900_regulator_desc *regulator_desc;
162e23657e5379 Joy Zou 2025-07-31 830 const struct pf0900_drvdata *drvdata = NULL;
162e23657e5379 Joy Zou 2025-07-31 831 struct device_node *np = i2c->dev.of_node;
162e23657e5379 Joy Zou 2025-07-31 832 unsigned int device_id, device_fam, i;
162e23657e5379 Joy Zou 2025-07-31 833 struct regulator_config config = { };
162e23657e5379 Joy Zou 2025-07-31 834 struct pf0900 *pf0900;
162e23657e5379 Joy Zou 2025-07-31 835 int ret;
162e23657e5379 Joy Zou 2025-07-31 836
162e23657e5379 Joy Zou 2025-07-31 837 if (!i2c->irq)
162e23657e5379 Joy Zou 2025-07-31 838 return dev_err_probe(&i2c->dev, -EINVAL, "No IRQ configured?\n");
162e23657e5379 Joy Zou 2025-07-31 839
162e23657e5379 Joy Zou 2025-07-31 840 pf0900 = devm_kzalloc(&i2c->dev, sizeof(struct pf0900), GFP_KERNEL);
162e23657e5379 Joy Zou 2025-07-31 841 if (!pf0900)
162e23657e5379 Joy Zou 2025-07-31 842 return -ENOMEM;
162e23657e5379 Joy Zou 2025-07-31 843
162e23657e5379 Joy Zou 2025-07-31 844 drvdata = device_get_match_data(&i2c->dev);
162e23657e5379 Joy Zou 2025-07-31 845 if (!drvdata)
162e23657e5379 Joy Zou 2025-07-31 846 return dev_err_probe(&i2c->dev, -EINVAL, "unable to find driver data\n");
162e23657e5379 Joy Zou 2025-07-31 847
162e23657e5379 Joy Zou 2025-07-31 848 regulator_desc = drvdata->desc;
162e23657e5379 Joy Zou 2025-07-31 849 pf0900->drvdata = drvdata;
162e23657e5379 Joy Zou 2025-07-31 850 pf0900->crc_en = of_property_read_bool(np, "nxp,i2c-crc-enable");
162e23657e5379 Joy Zou 2025-07-31 851 pf0900->irq = i2c->irq;
162e23657e5379 Joy Zou 2025-07-31 852 pf0900->dev = &i2c->dev;
162e23657e5379 Joy Zou 2025-07-31 853 pf0900->addr = i2c->addr;
162e23657e5379 Joy Zou 2025-07-31 854
162e23657e5379 Joy Zou 2025-07-31 855 dev_set_drvdata(&i2c->dev, pf0900);
162e23657e5379 Joy Zou 2025-07-31 856
162e23657e5379 Joy Zou 2025-07-31 857 pf0900->regmap = devm_regmap_init(&i2c->dev, &pf0900_regmap_bus, &i2c->dev,
162e23657e5379 Joy Zou 2025-07-31 858 &pf0900_regmap_config);
162e23657e5379 Joy Zou 2025-07-31 859 if (IS_ERR(pf0900->regmap))
162e23657e5379 Joy Zou 2025-07-31 860 return dev_err_probe(&i2c->dev, PTR_ERR(pf0900->regmap),
162e23657e5379 Joy Zou 2025-07-31 861 "regmap initialization failed\n");
162e23657e5379 Joy Zou 2025-07-31 862 ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_ID, &device_id);
162e23657e5379 Joy Zou 2025-07-31 863 if (ret)
162e23657e5379 Joy Zou 2025-07-31 864 return dev_err_probe(&i2c->dev, ret, "Read device id error\n");
162e23657e5379 Joy Zou 2025-07-31 865
162e23657e5379 Joy Zou 2025-07-31 866 ret = regmap_read(pf0900->regmap, PF0900_REG_DEV_FAM, &device_fam);
162e23657e5379 Joy Zou 2025-07-31 867 if (ret)
162e23657e5379 Joy Zou 2025-07-31 868 return dev_err_probe(&i2c->dev, ret, "Read device fam error\n");
162e23657e5379 Joy Zou 2025-07-31 869
162e23657e5379 Joy Zou 2025-07-31 870 /* Check your board and dts for match the right pmic */
162e23657e5379 Joy Zou 2025-07-31 871 if (device_fam == 0x09 && (device_id & 0x1F) != 0x0)
162e23657e5379 Joy Zou 2025-07-31 872 return dev_err_probe(&i2c->dev, -EINVAL, "Device id(%x) mismatched\n",
162e23657e5379 Joy Zou 2025-07-31 873 device_id >> 4);
162e23657e5379 Joy Zou 2025-07-31 874
162e23657e5379 Joy Zou 2025-07-31 875 for (i = 0; i < drvdata->rcnt; i++) {
162e23657e5379 Joy Zou 2025-07-31 876 const struct regulator_desc *desc;
162e23657e5379 Joy Zou 2025-07-31 877 const struct pf0900_regulator_desc *r;
162e23657e5379 Joy Zou 2025-07-31 878
162e23657e5379 Joy Zou 2025-07-31 879 r = ®ulator_desc[i];
162e23657e5379 Joy Zou 2025-07-31 880 desc = &r->desc;
162e23657e5379 Joy Zou 2025-07-31 881 config.regmap = pf0900->regmap;
162e23657e5379 Joy Zou 2025-07-31 882 config.driver_data = (void *)r;
162e23657e5379 Joy Zou 2025-07-31 883 config.dev = pf0900->dev;
162e23657e5379 Joy Zou 2025-07-31 884
162e23657e5379 Joy Zou 2025-07-31 885 pf0900->rdevs[i] = devm_regulator_register(pf0900->dev, desc, &config);
162e23657e5379 Joy Zou 2025-07-31 886 if (IS_ERR(pf0900->rdevs[i]))
162e23657e5379 Joy Zou 2025-07-31 887 return dev_err_probe(pf0900->dev, PTR_ERR(pf0900->rdevs[i]),
162e23657e5379 Joy Zou 2025-07-31 888 "Failed to register regulator(%s)\n", desc->name);
162e23657e5379 Joy Zou 2025-07-31 889 }
162e23657e5379 Joy Zou 2025-07-31 890
162e23657e5379 Joy Zou 2025-07-31 @891 ret = devm_request_threaded_irq(pf0900->dev, pf0900->irq, NULL,
162e23657e5379 Joy Zou 2025-07-31 892 pf0900_irq_handler,
162e23657e5379 Joy Zou 2025-07-31 893 (IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
162e23657e5379 Joy Zou 2025-07-31 894 "pf0900-irq", pf0900);
162e23657e5379 Joy Zou 2025-07-31 895
162e23657e5379 Joy Zou 2025-07-31 896 if (ret != 0)
162e23657e5379 Joy Zou 2025-07-31 897 return dev_err_probe(pf0900->dev, ret, "Failed to request IRQ: %d\n",
162e23657e5379 Joy Zou 2025-07-31 898 pf0900->irq);
162e23657e5379 Joy Zou 2025-07-31 899 /*
162e23657e5379 Joy Zou 2025-07-31 900 * The PWRUP_M is unmasked by default. When the device enter in RUN state,
162e23657e5379 Joy Zou 2025-07-31 901 * it will assert the PWRUP_I interrupt and assert the INTB pin to inform
162e23657e5379 Joy Zou 2025-07-31 902 * the MCU that it has finished the power up sequence properly.
162e23657e5379 Joy Zou 2025-07-31 903 */
162e23657e5379 Joy Zou 2025-07-31 904 ret = regmap_write_bits(pf0900->regmap, PF0900_REG_STATUS1_INT, PF0900_IRQ_PWRUP,
162e23657e5379 Joy Zou 2025-07-31 905 PF0900_IRQ_PWRUP);
162e23657e5379 Joy Zou 2025-07-31 906 if (ret)
162e23657e5379 Joy Zou 2025-07-31 907 return dev_err_probe(&i2c->dev, ret, "Clean PWRUP_I error\n");
162e23657e5379 Joy Zou 2025-07-31 908
162e23657e5379 Joy Zou 2025-07-31 909 /* mask interrupt PWRUP */
162e23657e5379 Joy Zou 2025-07-31 910 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_STATUS1_MSK, PF0900_IRQ_PWRUP,
162e23657e5379 Joy Zou 2025-07-31 911 PF0900_IRQ_PWRUP);
162e23657e5379 Joy Zou 2025-07-31 912 if (ret)
162e23657e5379 Joy Zou 2025-07-31 913 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 914
162e23657e5379 Joy Zou 2025-07-31 915 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_ILIM_MSK, PF0900_IRQ_SW1_IL |
162e23657e5379 Joy Zou 2025-07-31 916 PF0900_IRQ_SW2_IL | PF0900_IRQ_SW3_IL | PF0900_IRQ_SW4_IL |
162e23657e5379 Joy Zou 2025-07-31 917 PF0900_IRQ_SW5_IL, 0);
162e23657e5379 Joy Zou 2025-07-31 918 if (ret)
162e23657e5379 Joy Zou 2025-07-31 919 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 920
162e23657e5379 Joy Zou 2025-07-31 921 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_UV_MSK, PF0900_IRQ_SW1_UV |
162e23657e5379 Joy Zou 2025-07-31 922 PF0900_IRQ_SW2_UV | PF0900_IRQ_SW3_UV | PF0900_IRQ_SW4_UV |
162e23657e5379 Joy Zou 2025-07-31 923 PF0900_IRQ_SW5_UV, 0);
162e23657e5379 Joy Zou 2025-07-31 924 if (ret)
162e23657e5379 Joy Zou 2025-07-31 925 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 926
162e23657e5379 Joy Zou 2025-07-31 927 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_SW_OV_MSK, PF0900_IRQ_SW1_OV |
162e23657e5379 Joy Zou 2025-07-31 928 PF0900_IRQ_SW2_OV | PF0900_IRQ_SW3_OV | PF0900_IRQ_SW4_OV |
162e23657e5379 Joy Zou 2025-07-31 929 PF0900_IRQ_SW5_OV, 0);
162e23657e5379 Joy Zou 2025-07-31 930 if (ret)
162e23657e5379 Joy Zou 2025-07-31 931 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 932
162e23657e5379 Joy Zou 2025-07-31 933 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_ILIM_MSK, PF0900_IRQ_LDO1_IL |
162e23657e5379 Joy Zou 2025-07-31 934 PF0900_IRQ_LDO2_IL | PF0900_IRQ_LDO3_IL, 0);
162e23657e5379 Joy Zou 2025-07-31 935 if (ret)
162e23657e5379 Joy Zou 2025-07-31 936 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 937
162e23657e5379 Joy Zou 2025-07-31 938 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_UV_MSK, PF0900_IRQ_LDO1_UV |
162e23657e5379 Joy Zou 2025-07-31 939 PF0900_IRQ_LDO2_UV | PF0900_IRQ_LDO3_UV | PF0900_IRQ_VAON_UV, 0);
162e23657e5379 Joy Zou 2025-07-31 940 if (ret)
162e23657e5379 Joy Zou 2025-07-31 941 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 942
162e23657e5379 Joy Zou 2025-07-31 943 ret = regmap_update_bits(pf0900->regmap, PF0900_REG_LDO_OV_MSK, PF0900_IRQ_LDO1_OV |
162e23657e5379 Joy Zou 2025-07-31 944 PF0900_IRQ_LDO2_OV | PF0900_IRQ_LDO3_OV | PF0900_IRQ_VAON_OV, 0);
162e23657e5379 Joy Zou 2025-07-31 945 if (ret)
162e23657e5379 Joy Zou 2025-07-31 946 return dev_err_probe(&i2c->dev, ret, "Unmask irq error\n");
162e23657e5379 Joy Zou 2025-07-31 947
162e23657e5379 Joy Zou 2025-07-31 948 return 0;
162e23657e5379 Joy Zou 2025-07-31 949 }
162e23657e5379 Joy Zou 2025-07-31 950
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-14 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 15:30 drivers/regulator/pf0900-regulator.c:891:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-07-10 14:04 kernel test robot
2026-03-25 3:43 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.