[andersson:wip/sc8180x-next-20220502 7/29] drivers/phy/qualcomm/phy-qcom-qmp.c:6189: undefined reference to `typec_switch_get_drvdata'

From: kernel test robot
Date: Wed May 04 2022 - 04:04:07 EST


tree: https://github.com/andersson/kernel wip/sc8180x-next-20220502
head: 6199153320a3b7d1dce23ad1ea4d894a86793cb6
commit: 5cc3b17921dda08e833aa7933dc2da40d7e47b43 [7/29] phy: qcom-qmp: Register as a typec switch for orientation detection
config: csky-randconfig-r021-20220501 (https://download.01.org/0day-ci/archive/20220504/202205041511.NkA9shqv-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/andersson/kernel/commit/5cc3b17921dda08e833aa7933dc2da40d7e47b43
git remote add andersson https://github.com/andersson/kernel
git fetch --no-tags andersson wip/sc8180x-next-20220502
git checkout 5cc3b17921dda08e833aa7933dc2da40d7e47b43
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

csky-linux-ld: drivers/phy/qualcomm/phy-qcom-qmp.o: in function `qcom_qmp_phy_typec_switch_set':
>> drivers/phy/qualcomm/phy-qcom-qmp.c:6189: undefined reference to `typec_switch_get_drvdata'
csky-linux-ld: drivers/phy/qualcomm/phy-qcom-qmp.o: in function `qcom_qmp_dp_phy_configure':
drivers/phy/qualcomm/phy-qcom-qmp.c:5065: undefined reference to `typec_switch_get_drvdata'
csky-linux-ld: drivers/phy/qualcomm/phy-qcom-qmp.o: in function `qcom_qmp_phy_typec_switch_register':
>> drivers/phy/qualcomm/phy-qcom-qmp.c:6205: undefined reference to `typec_switch_register'
csky-linux-ld: drivers/phy/qualcomm/phy-qcom-qmp.o: in function `usleep_range':
include/linux/delay.h:67: undefined reference to `typec_switch_register'


vim +6189 drivers/phy/qualcomm/phy-qcom-qmp.c

6183
6184 //#if IS_ENABLED(CONFIG_PHY_QCOM_QMP_TYPEC)
6185 #if 1
6186 static int qcom_qmp_phy_typec_switch_set(struct typec_switch_dev *sw,
6187 enum typec_orientation orientation)
6188 {
> 6189 struct qcom_qmp *qmp = typec_switch_get_drvdata(sw);
6190
6191 qmp->orientation = orientation;
6192
6193 return 0;
6194 }
6195
6196 static int qcom_qmp_phy_typec_switch_register(struct qcom_qmp *qmp, const struct qmp_phy_cfg *cfg)
6197 {
6198 struct typec_switch_desc sw_desc;
6199 struct device *dev = qmp->dev;
6200
6201 if (cfg->has_phy_dp_com_ctrl) {
6202 sw_desc.drvdata = qmp;
6203 sw_desc.fwnode = dev->fwnode;
6204 sw_desc.set = qcom_qmp_phy_typec_switch_set;
> 6205 qmp->sw = typec_switch_register(dev, &sw_desc);
6206 if (IS_ERR(qmp->sw)) {
6207 dev_err(dev, "Error registering typec switch: %ld\n",
6208 PTR_ERR(qmp->sw));
6209 }
6210 }
6211
6212 return 0;
6213 }
6214 #else
6215 static int qcom_qmp_phy_typec_switch_register(struct qcom_qmp *qmp, const struct qmp_phy_cfg *cfg)
6216 {
6217 return 0;
6218 }
6219 #endif
6220

--
0-DAY CI Kernel Test Service
https://01.org/lkp