mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: drivers/ufs/host/ufs-rockchip.c:168:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'em_pd_get'?
Date: Thu, 13 Nov 2025 12:51:03 +0800	[thread overview]
Message-ID: <202511130238.LlA0MKxW-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   24172e0d79900908cf5ebf366600616d29c9b417
commit: d3cbe455d6eb600dee27bf5294f6fe8c2bb06b5f scsi: ufs: rockchip: Initial support for UFS
date:   9 months ago
config: sparc-randconfig-001-20251113 (https://download.01.org/0day-ci/archive/20251113/202511130238.LlA0MKxW-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251113/202511130238.LlA0MKxW-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/202511130238.LlA0MKxW-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/ufs/host/ufs-rockchip.c: In function 'ufs_rockchip_common_init':
>> drivers/ufs/host/ufs-rockchip.c:168:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'em_pd_get'? [-Werror=implicit-function-declaration]
     host->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                      ^~~~~~~~~~~~~~
                      em_pd_get
>> drivers/ufs/host/ufs-rockchip.c:168:48: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_OUT_INIT_LOW'?
     host->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                                                   ^~~~~~~~~~~~~
                                                   GPIOF_OUT_INIT_LOW
   drivers/ufs/host/ufs-rockchip.c:168:48: note: each undeclared identifier is reported only once for each function it appears in
   drivers/ufs/host/ufs-rockchip.c: In function 'ufs_rockchip_device_reset':
>> drivers/ufs/host/ufs-rockchip.c:214:2: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
     gpiod_set_value_cansleep(host->rst_gpio, 1);
     ^~~~~~~~~~~~~~~~~~~~~~~~
     gpio_set_value_cansleep
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LEDS_EXPRESSWIRE
   Depends on [n]: GPIOLIB [=n] || NEW_LEDS [=n] && GPIOLIB [=n]
   Selected by [y]:
   - BACKLIGHT_KTD2801 [=y] && HAS_IOMEM [=y] && BACKLIGHT_CLASS_DEVICE [=y]


vim +168 drivers/ufs/host/ufs-rockchip.c

   127	
   128	static int ufs_rockchip_common_init(struct ufs_hba *hba)
   129	{
   130		struct device *dev = hba->dev;
   131		struct platform_device *pdev = to_platform_device(dev);
   132		struct ufs_rockchip_host *host;
   133		int err;
   134	
   135		host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL);
   136		if (!host)
   137			return -ENOMEM;
   138	
   139		host->ufs_sys_ctrl = devm_platform_ioremap_resource_byname(pdev, "hci_grf");
   140		if (IS_ERR(host->ufs_sys_ctrl))
   141			return dev_err_probe(dev, PTR_ERR(host->ufs_sys_ctrl),
   142					"Failed to map HCI system control registers\n");
   143	
   144		host->ufs_phy_ctrl = devm_platform_ioremap_resource_byname(pdev, "mphy_grf");
   145		if (IS_ERR(host->ufs_phy_ctrl))
   146			return dev_err_probe(dev, PTR_ERR(host->ufs_phy_ctrl),
   147					"Failed to map mphy system control registers\n");
   148	
   149		host->mphy_base = devm_platform_ioremap_resource_byname(pdev, "mphy");
   150		if (IS_ERR(host->mphy_base))
   151			return dev_err_probe(dev, PTR_ERR(host->mphy_base),
   152					"Failed to map mphy base registers\n");
   153	
   154		host->rst = devm_reset_control_array_get_exclusive(dev);
   155		if (IS_ERR(host->rst))
   156			return dev_err_probe(dev, PTR_ERR(host->rst),
   157					"failed to get reset control\n");
   158	
   159		reset_control_assert(host->rst);
   160		udelay(1);
   161		reset_control_deassert(host->rst);
   162	
   163		host->ref_out_clk = devm_clk_get_enabled(dev, "ref_out");
   164		if (IS_ERR(host->ref_out_clk))
   165			return dev_err_probe(dev, PTR_ERR(host->ref_out_clk),
   166					"ref_out clock unavailable\n");
   167	
 > 168		host->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
   169		if (IS_ERR(host->rst_gpio))
   170			return dev_err_probe(dev, PTR_ERR(host->rst_gpio),
   171					"failed to get reset gpio\n");
   172	
   173		err = devm_clk_bulk_get_all_enabled(dev, &host->clks);
   174		if (err)
   175			return dev_err_probe(dev, err, "failed to enable clocks\n");
   176	
   177		host->hba = hba;
   178	
   179		ufshcd_set_variant(hba, host);
   180	
   181		return 0;
   182	}
   183	
   184	static int ufs_rockchip_rk3576_init(struct ufs_hba *hba)
   185	{
   186		struct device *dev = hba->dev;
   187		int ret;
   188	
   189		hba->quirks = UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING;
   190	
   191		/* Enable BKOPS when suspend */
   192		hba->caps |= UFSHCD_CAP_AUTO_BKOPS_SUSPEND;
   193		/* Enable putting device into deep sleep */
   194		hba->caps |= UFSHCD_CAP_DEEPSLEEP;
   195		/* Enable devfreq of UFS */
   196		hba->caps |= UFSHCD_CAP_CLK_SCALING;
   197		/* Enable WriteBooster */
   198		hba->caps |= UFSHCD_CAP_WB_EN;
   199	
   200		/* Set the default desired pm level in case no users set via sysfs */
   201		ufs_rockchip_set_pm_lvl(hba);
   202	
   203		ret = ufs_rockchip_common_init(hba);
   204		if (ret)
   205			return dev_err_probe(dev, ret, "ufs common init fail\n");
   206	
   207		return 0;
   208	}
   209	
   210	static int ufs_rockchip_device_reset(struct ufs_hba *hba)
   211	{
   212		struct ufs_rockchip_host *host = ufshcd_get_variant(hba);
   213	
 > 214		gpiod_set_value_cansleep(host->rst_gpio, 1);
   215		usleep_range(20, 25);
   216	
   217		gpiod_set_value_cansleep(host->rst_gpio, 0);
   218		usleep_range(20, 25);
   219	
   220		return 0;
   221	}
   222	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-11-13  4:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202511130238.LlA0MKxW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.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

all inboxes | Powered by JetHome®