From: kernel test robot <lkp@intel.com>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>,
alexandre.belloni@bootlin.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
jdelvare@suse.com, linux@roeck-us.net,
antoniu.miclaus@analog.com, noname.nuno@gmail.com
Cc: oe-kbuild-all@lists.linux.dev, linux-rtc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hwmon@vger.kernel.org,
Ibrahim Tilki <Ibrahim.Tilki@analog.com>,
Zeynep Arslanbenzer <Zeynep.Arslanbenzer@analog.com>,
Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: Re: [PATCH v6 1/2] drivers: rtc: add max313xx series rtc driver
Date: Sat, 3 Feb 2024 15:07:45 +0800 [thread overview]
Message-ID: <202402031414.zapkL312-lkp@intel.com> (raw)
In-Reply-To: <20240202025241.834283-2-chris.packham@alliedtelesis.co.nz>
Hi Chris,
kernel test robot noticed the following build warnings:
[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on robh/for-next linus/master v6.8-rc2 next-20240202]
[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/Chris-Packham/drivers-rtc-add-max313xx-series-rtc-driver/20240202-105538
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20240202025241.834283-2-chris.packham%40alliedtelesis.co.nz
patch subject: [PATCH v6 1/2] drivers: rtc: add max313xx series rtc driver
config: i386-randconfig-063-20240203 (https://download.01.org/0day-ci/archive/20240203/202402031414.zapkL312-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/202402031414.zapkL312-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/202402031414.zapkL312-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/rtc/rtc-max313xx.c:546:21: sparse: sparse: symbol 'max313xx_nvmem_cfg' was not declared. Should it be static?
>> drivers/rtc/rtc-max313xx.c:656:22: sparse: sparse: symbol 'max313xx_clk_init' was not declared. Should it be static?
vim +/max313xx_nvmem_cfg +546 drivers/rtc/rtc-max313xx.c
545
> 546 struct nvmem_config max313xx_nvmem_cfg = {
547 .reg_read = max313xx_nvmem_reg_read,
548 .reg_write = max313xx_nvmem_reg_write,
549 .word_size = 8,
550 };
551
552 static unsigned long max313xx_clkout_recalc_rate(struct clk_hw *hw,
553 unsigned long parent_rate)
554 {
555 struct max313xx *rtc = clk_hw_to_max313xx(hw);
556 const struct clkout_cfg *clkout = rtc->chip->clkout;
557 unsigned int freq_mask;
558 unsigned int reg;
559 int ret;
560
561 ret = regmap_read(rtc->regmap, clkout->reg, ®);
562 if (ret)
563 return 0;
564
565 freq_mask = __roundup_pow_of_two(clkout->freq_size) - 1;
566
567 return clkout->freq_avail[(reg >> clkout->freq_pos) & freq_mask];
568 }
569
570 static long max313xx_clkout_round_rate(struct clk_hw *hw, unsigned long rate,
571 unsigned long *prate)
572 {
573 struct max313xx *rtc = clk_hw_to_max313xx(hw);
574 struct clkout_cfg *clkout = rtc->chip->clkout;
575 int index;
576
577 index = find_closest(rate, clkout->freq_avail, clkout->freq_size);
578 return clkout->freq_avail[index];
579 }
580
581 static int max313xx_clkout_set_rate(struct clk_hw *hw, unsigned long rate,
582 unsigned long parent_rate)
583 {
584 struct max313xx *rtc = clk_hw_to_max313xx(hw);
585 struct clkout_cfg *clkout = rtc->chip->clkout;
586 unsigned int freq_mask;
587 int index;
588
589 index = find_closest(rate, clkout->freq_avail, clkout->freq_size);
590 freq_mask = __roundup_pow_of_two(clkout->freq_size) - 1;
591
592 return regmap_update_bits(rtc->regmap, clkout->reg,
593 freq_mask << clkout->freq_pos,
594 index << clkout->freq_pos);
595 }
596
597 static int max313xx_clkout_enable(struct clk_hw *hw)
598 {
599 struct max313xx *rtc = clk_hw_to_max313xx(hw);
600 struct clkout_cfg *clkout = rtc->chip->clkout;
601
602 if (clkout->en_invert)
603 return regmap_clear_bits(rtc->regmap, clkout->reg,
604 clkout->en_bit);
605
606 return regmap_set_bits(rtc->regmap, clkout->reg, clkout->en_bit);
607 }
608
609 static void max313xx_clkout_disable(struct clk_hw *hw)
610 {
611 struct max313xx *rtc = clk_hw_to_max313xx(hw);
612 struct clkout_cfg *clkout = rtc->chip->clkout;
613
614 switch (rtc->id) {
615 case ID_MAX31331:
616 case ID_MAX31334:
617 if (rtc->irq > 0) {
618 dev_err(rtc->rtc->dev.parent,
619 "clkout cannot be disabled when IRQ is requested");
620 return;
621 }
622 break;
623 default:
624 break;
625 }
626
627 if (clkout->en_invert)
628 regmap_set_bits(rtc->regmap, clkout->reg, clkout->en_bit);
629 else
630 regmap_clear_bits(rtc->regmap, clkout->reg, clkout->en_bit);
631 }
632
633 static int max313xx_clkout_is_enabled(struct clk_hw *hw)
634 {
635 struct max313xx *rtc = clk_hw_to_max313xx(hw);
636 struct clkout_cfg *clkout = rtc->chip->clkout;
637 unsigned int reg;
638 int ret;
639
640 ret = regmap_read(rtc->regmap, clkout->reg, ®);
641 if (ret)
642 return ret;
643
644 return !!(reg & clkout->en_bit) ^ clkout->en_invert;
645 }
646
647 static const struct clk_ops max313xx_clkout_ops = {
648 .recalc_rate = max313xx_clkout_recalc_rate,
649 .round_rate = max313xx_clkout_round_rate,
650 .set_rate = max313xx_clkout_set_rate,
651 .enable = max313xx_clkout_enable,
652 .disable = max313xx_clkout_disable,
653 .is_enabled = max313xx_clkout_is_enabled,
654 };
655
> 656 struct clk_init_data max313xx_clk_init = {
657 .name = "max313xx-clkout",
658 .ops = &max313xx_clkout_ops,
659 };
660
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2024-02-03 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240202025241.834283-2-chris.packham@alliedtelesis.co.nz>
2024-02-03 7:07 ` kernel test robot [this message]
2024-02-04 2:25 ` [PATCH v6 1/2] drivers: rtc: add max313xx series rtc driver kernel test robot
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=202402031414.zapkL312-lkp@intel.com \
--to=lkp@intel.com \
--cc=Ibrahim.Tilki@analog.com \
--cc=Zeynep.Arslanbenzer@analog.com \
--cc=alexandre.belloni@bootlin.com \
--cc=antoniu.miclaus@analog.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=noname.nuno@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).