[linux-next:master 5531/13070] sound/soc/codecs/max98927.c:902:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   8ccbda2840b77bb6f029151df5ab92dd04e4f3f8
commit: 4d67dc1998f1890a9d22d03208037075ea9f2562 [5531/13070] ASoC: max98927: Handle reset gpio when probing i2c
config: h8300-randconfig-r024-20211103 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4d67dc1998f1890a9d22d03208037075ea9f2562
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 4d67dc1998f1890a9d22d03208037075ea9f2562
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300 

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

All errors (new ones prefixed by >>):

   sound/soc/codecs/max98927.c: In function 'max98927_i2c_probe':
>> sound/soc/codecs/max98927.c:902:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_regulator_get_optional'? [-Werror=implicit-function-declaration]
     902 |                 = devm_gpiod_get_optional(&i2c->dev, "reset", GPIOD_OUT_HIGH);
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
         |                   devm_regulator_get_optional
>> sound/soc/codecs/max98927.c:902:63: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?
     902 |                 = devm_gpiod_get_optional(&i2c->dev, "reset", GPIOD_OUT_HIGH);
         |                                                               ^~~~~~~~~~~~~~
         |                                                               GPIOF_INIT_HIGH
   sound/soc/codecs/max98927.c:902:63: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/codecs/max98927.c:909:17: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
     909 |                 gpiod_set_value_cansleep(max98927->reset_gpio, 0);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~
         |                 gpio_set_value_cansleep
   cc1: some warnings being treated as errors


vim +902 sound/soc/codecs/max98927.c

   867	
   868		int ret = 0, value;
   869		int reg = 0;
   870		struct max98927_priv *max98927 = NULL;
   871	
   872		max98927 = devm_kzalloc(&i2c->dev,
   873			sizeof(*max98927), GFP_KERNEL);
   874	
   875		if (!max98927) {
   876			ret = -ENOMEM;
   877			return ret;
   878		}
   879		i2c_set_clientdata(i2c, max98927);
   880	
   881		/* update interleave mode info */
   882		if (!of_property_read_u32(i2c->dev.of_node,
   883			"interleave_mode", &value)) {
   884			if (value > 0)
   885				max98927->interleave_mode = true;
   886			else
   887				max98927->interleave_mode = false;
   888		} else
   889			max98927->interleave_mode = false;
   890	
   891		/* regmap initialization */
   892		max98927->regmap
   893			= devm_regmap_init_i2c(i2c, &max98927_regmap);
   894		if (IS_ERR(max98927->regmap)) {
   895			ret = PTR_ERR(max98927->regmap);
   896			dev_err(&i2c->dev,
   897				"Failed to allocate regmap: %d\n", ret);
   898			return ret;
   899		}
   900		
   901		max98927->reset_gpio 
 > 902			= devm_gpiod_get_optional(&i2c->dev, "reset", GPIOD_OUT_HIGH);
   903		if (IS_ERR(max98927->reset_gpio)) {
   904			ret = PTR_ERR(max98927->reset_gpio);
   905			return dev_err_probe(&i2c->dev, ret, "failed to request GPIO reset pin");
   906		}
   907	
   908		if (max98927->reset_gpio) {
 > 909			gpiod_set_value_cansleep(max98927->reset_gpio, 0);
   910			/* Wait for i2c port to be ready */
   911			usleep_range(5000, 6000);
   912		}
   913	
   914		/* Check Revision ID */
   915		ret = regmap_read(max98927->regmap,
   916			MAX98927_R01FF_REV_ID, &reg);
   917		if (ret < 0) {
   918			dev_err(&i2c->dev,
   919				"Failed to read: 0x%02X\n", MAX98927_R01FF_REV_ID);
   920			return ret;
   921		}
   922		dev_info(&i2c->dev, "MAX98927 revisionID: 0x%02X\n", reg);
   923	
   924		/* voltage/current slot configuration */
   925		max98927_slot_config(i2c, max98927);
   926	
   927		/* codec registeration */
   928		ret = devm_snd_soc_register_component(&i2c->dev,
   929			&soc_component_dev_max98927,
   930			max98927_dai, ARRAY_SIZE(max98927_dai));
   931		if (ret < 0)
   932			dev_err(&i2c->dev, "Failed to register component: %d\n", ret);
   933	
   934		return ret;
   935	}
   936	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux