[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511190432.xfs91BVq-lkp@intel.com>
Date: Wed, 19 Nov 2025 04:58:36 +0800
From: kernel test robot <lkp@...el.com>
To: Lakshay Piplani <lakshay.piplani@....com>,
alexandre.belloni@...tlin.com, linux-rtc@...r.kernel.org,
linux-kernel@...r.kernel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, devicetree@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, pankit.garg@....com,
vikash.bansal@....com, priyanka.jain@....com,
shashank.rebbapragada@....com,
Lakshay Piplani <lakshay.piplani@....com>,
Daniel Aguirre <daniel.aguirre@....com>
Subject: Re: [PATCH v6 2/2] rtc: Add NXP PCF85053 driver support
Hi Lakshay,
kernel test robot noticed the following build errors:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on linus/master v6.18-rc6 next-20251118]
[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/Lakshay-Piplani/rtc-Add-NXP-PCF85053-driver-support/20251113-134432
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20251113054243.4045820-2-lakshay.piplani%40nxp.com
patch subject: [PATCH v6 2/2] rtc: Add NXP PCF85053 driver support
config: sparc64-randconfig-001-20251119 (https://download.01.org/0day-ci/archive/20251119/202511190432.xfs91BVq-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511190432.xfs91BVq-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511190432.xfs91BVq-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/rtc/rtc-pcf85053.c: In function 'pcf85053_probe':
>> drivers/rtc/rtc-pcf85053.c:616:14: error: implicit declaration of function 'i2c_check_functionality' [-Wimplicit-function-declaration]
616 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C |
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/rtc/rtc-pcf85053.c: At top level:
>> drivers/rtc/rtc-pcf85053.c:729:1: warning: data definition has no type or storage class
729 | module_i2c_driver(pcf85053_driver);
| ^~~~~~~~~~~~~~~~~
>> drivers/rtc/rtc-pcf85053.c:729:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Wimplicit-int]
>> drivers/rtc/rtc-pcf85053.c:729:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
>> drivers/rtc/rtc-pcf85053.c:720:26: warning: 'pcf85053_driver' defined but not used [-Wunused-variable]
720 | static struct i2c_driver pcf85053_driver = {
| ^~~~~~~~~~~~~~~
vim +/i2c_check_functionality +616 drivers/rtc/rtc-pcf85053.c
608
609 static int pcf85053_probe(struct i2c_client *client)
610 {
611 struct pcf85053 *pcf85053;
612 const struct pcf85053_config *config;
613 const char *iface = NULL;
614 int err;
615
> 616 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C |
617 I2C_FUNC_SMBUS_BYTE |
618 I2C_FUNC_SMBUS_BLOCK_DATA))
619 return -ENODEV;
620
621 pcf85053 = devm_kzalloc(&client->dev, sizeof(struct pcf85053),
622 GFP_KERNEL);
623 if (!pcf85053)
624 return -ENOMEM;
625
626 config = i2c_get_match_data(client);
627 if (!config)
628 return -ENODEV;
629
630 pcf85053->regmap = devm_regmap_init_i2c(client, &config->regmap);
631 if (IS_ERR(pcf85053->regmap))
632 return PTR_ERR(pcf85053->regmap);
633
634 i2c_set_clientdata(client, pcf85053);
635
636 pcf85053->client = client;
637 device_set_wakeup_capable(&client->dev, 1);
638
639 pcf85053->is_primary = true;
640
641 if (of_property_read_string(client->dev.of_node, "nxp,interface", &iface))
642 return dev_err_probe(&client->dev, -EINVAL,
643 "Missing mandatory property: nxp,interface\n");
644 if (!strcmp(iface, "primary"))
645 pcf85053->is_primary = true;
646 else if (!strcmp(iface, "secondary"))
647 pcf85053->is_primary = false;
648 else
649 return dev_err_probe(&client->dev, -EINVAL,
650 "Invalid value for nxp,interface: %s\n", iface);
651
652 if (pcf85053->is_primary) {
653 unsigned int ctrl;
654 int err;
655
656 err = regmap_read(pcf85053->regmap, PCF85053_REG_CTRL, &ctrl);
657 if (err)
658 return err;
659
660 if (of_property_read_bool(client->dev.of_node, "nxp,write-access")) {
661 if (!(ctrl & PCF85053_BIT_TWO)) {
662 err = regmap_update_bits(pcf85053->regmap, PCF85053_REG_CTRL,
663 PCF85053_BIT_TWO, PCF85053_BIT_TWO);
664 if (err)
665 return err;
666 }
667 dev_dbg(&client->dev, "Ownership set: TWO=1 (primary writes)\n");
668 } else {
669 /* TWO (Time Write Ownership) bit defaults to 0 (Secondary) */
670 dev_dbg(&client->dev, "Default ownership set: TWO=0 (secondary writes)\n");
671 }
672 }
673
674 pcf85053->rtc = devm_rtc_allocate_device(&client->dev);
675 if (IS_ERR(pcf85053->rtc))
676 return PTR_ERR(pcf85053->rtc);
677
678 pcf85053->rtc->ops = &pcf85053_rtc_ops;
679 pcf85053->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
680 pcf85053->rtc->range_max = RTC_TIMESTAMP_END_2099;
681 clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, pcf85053->rtc->features);
682 clear_bit(RTC_FEATURE_ALARM, pcf85053->rtc->features);
683
684 if (config->has_alarms && client->irq > 0) {
685 err = devm_request_threaded_irq(&client->dev, client->irq,
686 NULL, pcf85053_irq,
687 IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
688 "pcf85053", client);
689 if (err) {
690 dev_err(&client->dev, "unable to request IRQ %d\n", client->irq);
691 } else {
692 set_bit(RTC_FEATURE_ALARM, pcf85053->rtc->features);
693 device_init_wakeup(&client->dev, true);
694 err = dev_pm_set_wake_irq(&client->dev, client->irq);
695 if (err)
696 dev_err(&client->dev, "failed to enable irq wake\n");
697 }
698 }
699
700 #ifdef CONFIG_COMMON_CLK
701 /* register clk in common clk framework */
702 pcf85053_clkout_register_clk(pcf85053);
703 #endif
704
705 return devm_rtc_register_device(pcf85053->rtc);
706 }
707
708 static const struct i2c_device_id pcf85053_id[] = {
709 { "pcf85053", .driver_data = (kernel_ulong_t)&config_pcf85053 },
710 { }
711 };
712 MODULE_DEVICE_TABLE(i2c, pcf85053_id);
713
714 static const struct of_device_id pcf85053_of_match[] = {
715 { .compatible = "nxp,pcf85053", .data = &config_pcf85053 },
716 {}
717 };
718 MODULE_DEVICE_TABLE(of, pcf85053_of_match);
719
> 720 static struct i2c_driver pcf85053_driver = {
721 .driver = {
722 .name = "rtc-pcf85053",
723 .of_match_table = of_match_ptr(pcf85053_of_match),
724 },
725 .probe = pcf85053_probe,
726 .id_table = pcf85053_id,
727 };
728
> 729 module_i2c_driver(pcf85053_driver);
730
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists