From: kernel test robot <lkp@intel.com>
To: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>,
"Bjorn Helgaas" <helgaas@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"chaitanya chundru" <quic_krichai@quicinc.com>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
cros-qcom-dts-watchers@chromium.org,
"Jingoo Han" <jingoohan1@gmail.com>,
"Bartosz Golaszewski" <brgl@bgdev.pl>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
quic_vbadigan@quicnic.com, amitk@kernel.org,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
jorge.ramirez@oss.qualcomm.com,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>
Subject: Re: [PATCH v5 8/9] PCI: pwrctrl: Add power control driver for tc9563
Date: Tue, 15 Apr 2025 16:44:03 +0800 [thread overview]
Message-ID: <202504151632.tCoey9d8-lkp@intel.com> (raw)
In-Reply-To: <20250412-qps615_v4_1-v5-8-5b6a06132fec@oss.qualcomm.com>
Hi Krishna,
kernel test robot noticed the following build errors:
[auto build test ERROR on f4d2ef48250ad057e4f00087967b5ff366da9f39]
url: https://github.com/intel-lab-lkp/linux/commits/Krishna-Chaitanya-Chundru/dt-bindings-PCI-Add-binding-for-Toshiba-TC9563-PCIe-switch/20250414-123816
base: f4d2ef48250ad057e4f00087967b5ff366da9f39
patch link: https://lore.kernel.org/r/20250412-qps615_v4_1-v5-8-5b6a06132fec%40oss.qualcomm.com
patch subject: [PATCH v5 8/9] PCI: pwrctrl: Add power control driver for tc9563
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250415/202504151632.tCoey9d8-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250415/202504151632.tCoey9d8-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504151632.tCoey9d8-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:419:2: error: call to undeclared function 'gpiod_set_value'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
419 | gpiod_set_value(ctx->reset_gpio, 1);
| ^
drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:433:2: error: call to undeclared function 'gpiod_set_value'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
433 | gpiod_set_value(ctx->reset_gpio, 0);
| ^
>> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:535:20: error: call to undeclared function 'devm_gpiod_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
535 | ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
| ^
>> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c:535:49: error: use of undeclared identifier 'GPIOD_OUT_HIGH'
535 | ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
| ^
4 errors generated.
vim +/gpiod_set_value +419 drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
416
417 static void tc9563_pwrctrl_power_off(struct tc9563_pwrctrl_ctx *ctx)
418 {
> 419 gpiod_set_value(ctx->reset_gpio, 1);
420
421 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
422 }
423
424 static int tc9563_pwrctrl_bring_up(struct tc9563_pwrctrl_ctx *ctx)
425 {
426 struct tc9563_pwrctrl_cfg *cfg;
427 int ret, i;
428
429 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
430 if (ret < 0)
431 return dev_err_probe(ctx->pwrctrl.dev, ret, "cannot enable regulators\n");
432
433 gpiod_set_value(ctx->reset_gpio, 0);
434
435 /* wait for the internal osc frequency to stablise */
436 usleep_range(10000, 10500);
437
438 ret = tc9563_pwrctrl_assert_deassert_reset(ctx, false);
439 if (ret)
440 goto power_off;
441
442 for (i = 0; i < TC9563_MAX; i++) {
443 cfg = &ctx->cfg[i];
444 ret = tc9563_pwrctrl_disable_port(ctx, i);
445 if (ret) {
446 dev_err(ctx->pwrctrl.dev, "Disabling port failed\n");
447 goto power_off;
448 }
449
450 ret = tc9563_pwrctrl_set_l0s_l1_entry_delay(ctx, i, false, cfg->l0s_delay);
451 if (ret) {
452 dev_err(ctx->pwrctrl.dev, "Setting L0s entry delay failed\n");
453 goto power_off;
454 }
455
456 ret = tc9563_pwrctrl_set_l0s_l1_entry_delay(ctx, i, true, cfg->l1_delay);
457 if (ret) {
458 dev_err(ctx->pwrctrl.dev, "Setting L1 entry delay failed\n");
459 goto power_off;
460 }
461
462 ret = tc9563_pwrctrl_set_tx_amplitude(ctx, i, cfg->tx_amp);
463 if (ret) {
464 dev_err(ctx->pwrctrl.dev, "Setting Tx amplitube failed\n");
465 goto power_off;
466 }
467
468 ret = tc9563_pwrctrl_set_nfts(ctx, i, cfg->nfts);
469 if (ret) {
470 dev_err(ctx->pwrctrl.dev, "Setting nfts failed\n");
471 goto power_off;
472 }
473
474 ret = tc9563_pwrctrl_disable_dfe(ctx, i);
475 if (ret) {
476 dev_err(ctx->pwrctrl.dev, "Disabling DFE failed\n");
477 goto power_off;
478 }
479 }
480
481 ret = tc9563_pwrctrl_assert_deassert_reset(ctx, true);
482 if (!ret)
483 return 0;
484
485 power_off:
486 tc9563_pwrctrl_power_off(ctx);
487 return ret;
488 }
489
490 static int tc9563_pwrctrl_probe(struct platform_device *pdev)
491 {
492 struct pci_host_bridge *bridge = to_pci_host_bridge(pdev->dev.parent);
493 struct pci_dev *pci_dev = to_pci_dev(pdev->dev.parent);
494 struct pci_bus *bus = bridge->bus;
495 struct device *dev = &pdev->dev;
496 enum tc9563_pwrctrl_ports port;
497 struct tc9563_pwrctrl_ctx *ctx;
498 struct device_node *i2c_node;
499 int ret, addr;
500
501 ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
502 if (!ctx)
503 return -ENOMEM;
504
505 ret = of_property_read_u32_index(pdev->dev.of_node, "i2c-parent", 1, &addr);
506 if (ret)
507 return dev_err_probe(dev, ret, "Failed to read i2c-parent property\n");
508
509 i2c_node = of_parse_phandle(dev->of_node, "i2c-parent", 0);
510 ctx->adapter = of_find_i2c_adapter_by_node(i2c_node);
511 of_node_put(i2c_node);
512 if (!ctx->adapter)
513 return dev_err_probe(dev, -EPROBE_DEFER, "Failed to find I2C adapter\n");
514
515 ctx->client = i2c_new_dummy_device(ctx->adapter, addr);
516 if (IS_ERR(ctx->client)) {
517 dev_err(dev, "Failed to create I2C client\n");
518 i2c_put_adapter(ctx->adapter);
519 return PTR_ERR(ctx->client);
520 }
521
522 ctx->supplies[0].supply = "vddc";
523 ctx->supplies[1].supply = "vdd18";
524 ctx->supplies[2].supply = "vdd09";
525 ctx->supplies[3].supply = "vddio1";
526 ctx->supplies[4].supply = "vddio2";
527 ctx->supplies[5].supply = "vddio18";
528 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies);
529 if (ret) {
530 dev_err_probe(dev, ret,
531 "failed to get supply regulator\n");
532 goto remove_i2c;
533 }
534
> 535 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
536 if (IS_ERR(ctx->reset_gpio)) {
537 ret = dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "failed to get reset GPIO\n");
538 goto remove_i2c;
539 }
540
541 pci_pwrctrl_init(&ctx->pwrctrl, dev);
542
543 port = TC9563_USP;
544 ret = tc9563_pwrctrl_parse_device_dt(ctx, pdev->dev.of_node, port);
545 if (ret) {
546 dev_err(dev, "failed to parse device tree properties: %d\n", ret);
547 goto remove_i2c;
548 }
549
550 /*
551 * Downstream ports are always children of the upstream port.
552 * The first node represents DSP1, the second node represents DSP2, and so on.
553 */
554 for_each_child_of_node_scoped(pdev->dev.of_node, child) {
555 ret = tc9563_pwrctrl_parse_device_dt(ctx, child, port++);
556 if (ret)
557 break;
558 /* Embedded ethernet device are under DSP3 */
559 if (port == TC9563_DSP3)
560 for_each_child_of_node_scoped(child, child1) {
561 ret = tc9563_pwrctrl_parse_device_dt(ctx, child1, port++);
562 if (ret)
563 break;
564 }
565 }
566 if (ret) {
567 dev_err(dev, "failed to parse device tree properties: %d\n", ret);
568 goto remove_i2c;
569 }
570
571 if (!pcie_link_is_active(pci_dev) && bridge->ops->stop_link)
572 bridge->ops->stop_link(bus);
573
574 ret = tc9563_pwrctrl_bring_up(ctx);
575 if (ret)
576 goto remove_i2c;
577
578 if (!pcie_link_is_active(pci_dev) && bridge->ops->start_link) {
579 ret = bridge->ops->start_link(bus);
580 if (ret)
581 goto power_off;
582 }
583
584 ret = devm_pci_pwrctrl_device_set_ready(dev, &ctx->pwrctrl);
585 if (ret)
586 goto power_off;
587
588 platform_set_drvdata(pdev, ctx);
589
590 return 0;
591
592 power_off:
593 tc9563_pwrctrl_power_off(ctx);
594 remove_i2c:
595 i2c_unregister_device(ctx->client);
596 i2c_put_adapter(ctx->adapter);
597 return ret;
598 }
599
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-04-15 8:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 1:49 [PATCH v5 0/9] PCI: Enable Power and configure the TC9563 PCIe switch Krishna Chaitanya Chundru
2025-04-12 1:49 ` [PATCH v5 1/9] dt-bindings: PCI: Add binding for Toshiba " Krishna Chaitanya Chundru
2025-04-12 18:12 ` Rob Herring (Arm)
2025-04-12 1:49 ` [PATCH v5 2/9] arm64: dts: qcom: qcs6490-rb3gen2: Add TC9563 PCIe switch node Krishna Chaitanya Chundru
2025-04-13 16:35 ` Dmitry Baryshkov
2025-04-12 1:49 ` [PATCH v5 3/9] PCI: Add new start_link() & stop_link function ops Krishna Chaitanya Chundru
2025-04-18 20:20 ` Bjorn Helgaas
2025-04-12 1:49 ` [PATCH v5 4/9] PCI: dwc: Add host_start_link() & host_start_link() hooks for dwc glue drivers Krishna Chaitanya Chundru
2025-04-15 19:13 ` Frank Li
2025-04-16 4:20 ` Krishna Chaitanya Chundru
2025-04-12 1:49 ` [PATCH v5 5/9] PCI: dwc: Implement .start_link(), .stop_link() hooks Krishna Chaitanya Chundru
2025-04-12 1:49 ` [PATCH v5 6/9] PCI: qcom: Add support for host_stop_link() & host_start_link() Krishna Chaitanya Chundru
2025-04-12 1:49 ` [PATCH v5 7/9] PCI: PCI: Add pcie_link_is_active() to determine if the PCIe link is active Krishna Chaitanya Chundru
2025-04-12 3:52 ` Lukas Wunner
2025-04-13 17:14 ` Lukas Wunner
2025-04-14 4:21 ` Krishna Chaitanya Chundru
2025-04-14 4:23 ` Krishna Chaitanya Chundru
2025-04-12 18:11 ` Rob Herring
2025-04-12 1:49 ` [PATCH v5 8/9] PCI: pwrctrl: Add power control driver for tc9563 Krishna Chaitanya Chundru
2025-04-15 8:44 ` kernel test robot [this message]
2025-04-15 8:55 ` kernel test robot
2025-04-18 20:16 ` Bjorn Helgaas
2025-04-19 3:24 ` Krishna Chaitanya Chundru
2025-06-27 12:17 ` Dmitry Baryshkov
2025-04-12 1:49 ` [PATCH v5 9/9] arm64: defconfig: Enable TC9563 PWRCTL driver Krishna Chaitanya Chundru
2025-04-18 20:00 ` [PATCH v5 0/9] PCI: Enable Power and configure the TC9563 PCIe switch Bjorn Helgaas
2025-04-19 3:26 ` Krishna Chaitanya Chundru
2025-07-01 7:11 ` Dmitry Baryshkov
2025-07-01 7:40 ` Krishna Chaitanya Chundru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202504151632.tCoey9d8-lkp@intel.com \
--to=lkp@intel.com \
--cc=amitk@kernel.org \
--cc=andersson@kernel.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=helgaas@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=jorge.ramirez@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=krzk@kernel.org \
--cc=kw@linux.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lpieralisi@kernel.org \
--cc=lumag@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_krichai@quicinc.com \
--cc=quic_vbadigan@quicnic.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome