CC: [email protected]
CC: [email protected]
TO: Mark Brown <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git 
asoc-gpiolib-deps
head:   8d32dc434279b927663e6cf549712c8b4e42c9e3
commit: a775038d1ad6dc883e0b5e5c9d1b8a2a7c8b7ff0 [5/6] ASoC: zl38060: Remove 
spurious gpiolib select
:::::: branch date: 29 hours ago
:::::: commit date: 29 hours ago
config: arc-randconfig-c004-20220131 
(https://download.01.org/0day-ci/archive/20220204/[email protected]/config)
compiler: arc-elf-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/broonie/misc.git/commit/?id=a775038d1ad6dc883e0b5e5c9d1b8a2a7c8b7ff0
        git remote add broonie-misc 
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
        git fetch --no-tags broonie-misc asoc-gpiolib-deps
        git checkout a775038d1ad6dc883e0b5e5c9d1b8a2a7c8b7ff0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross 
O=build_dir ARCH=arc SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

   sound/soc/codecs/tlv320adc3xxx.c: In function 'adc3xxx_i2c_probe':
>> sound/soc/codecs/tlv320adc3xxx.c:1209:28: error: implicit declaration of 
>> function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? 
>> [-Werror=implicit-function-declaration]
    1209 |         adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", 
GPIOD_OUT_LOW);
         |                            ^~~~~~~~~~~~~~
         |                            devm_gpio_free
>> sound/soc/codecs/tlv320adc3xxx.c:1209:57: error: 'GPIOD_OUT_LOW' undeclared 
>> (first use in this function); did you mean 'GPIOF_INIT_LOW'?
    1209 |         adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", 
GPIOD_OUT_LOW);
         |                                                         ^~~~~~~~~~~~~
         |                                                         
GPIOF_INIT_LOW
   sound/soc/codecs/tlv320adc3xxx.c:1209:57: note: each undeclared identifier 
is reported only once for each function it appears in
>> sound/soc/codecs/tlv320adc3xxx.c:1257:9: error: implicit declaration of 
>> function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? 
>> [-Werror=implicit-function-declaration]
    1257 |         gpiod_set_value_cansleep(adc3xxx->rst_pin, 1);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
         |         gpio_set_value_cansleep
   cc1: some warnings being treated as errors


vim +1209 sound/soc/codecs/tlv320adc3xxx.c

e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1196  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1197  static int 
adc3xxx_i2c_probe(struct i2c_client *i2c,
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1198                             
const struct i2c_device_id *id)
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1199  {
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1200        struct device *dev = 
&i2c->dev;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1201        struct adc3xxx *adc3xxx 
= NULL;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1202        int ret;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1203  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1204        adc3xxx = 
devm_kzalloc(dev, sizeof(struct adc3xxx), GFP_KERNEL);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1205        if (!adc3xxx)
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1206                return -ENOMEM;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1207        adc3xxx->dev = dev;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1208  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15 @1209        adc3xxx->rst_pin = 
devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1210        if 
(IS_ERR(adc3xxx->rst_pin)) {
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1211                return 
dev_err_probe(dev, PTR_ERR(adc3xxx->rst_pin),
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1212                                
     "Failed to request rst_pin\n");
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1213        }
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1214  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1215        adc3xxx->mclk = 
devm_clk_get(dev, NULL);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1216        if 
(IS_ERR(adc3xxx->mclk)) {
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1217                /*
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1218                 * The chip 
itself supports running off the BCLK either
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1219                 * directly or 
via the PLL, but the driver does not (yet), so
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1220                 * having a 
specified mclk is required. Otherwise, we could
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1221                 * use the lack 
of a clocks property to indicate when BCLK is
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1222                 * intended as 
the clock source.
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1223                 */
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1224                return 
dev_err_probe(dev, PTR_ERR(adc3xxx->mclk),
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1225                                
     "Failed to acquire MCLK\n");
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1226        } else if 
(adc3xxx->mclk) {
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1227                ret = 
clk_prepare_enable(adc3xxx->mclk);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1228                if (ret < 0)
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1229                        return 
ret;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1230                dev_dbg(dev, 
"Enabled MCLK, freq %lu Hz\n", clk_get_rate(adc3xxx->mclk));
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1231        }
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1232  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1233        ret = 
adc3xxx_parse_dt_gpio(adc3xxx, "ti,dmdin-gpio1", &adc3xxx->gpio_cfg[0]);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1234        if (ret < 0)
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1235                goto 
err_unprepare_mclk;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1236        ret = 
adc3xxx_parse_dt_gpio(adc3xxx, "ti,dmclk-gpio2", &adc3xxx->gpio_cfg[1]);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1237        if (ret < 0)
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1238                goto 
err_unprepare_mclk;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1239        ret = 
adc3xxx_parse_dt_micbias(adc3xxx, "ti,micbias1-vg", &adc3xxx->micbias_vg[0]);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1240        if (ret < 0)
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1241                goto 
err_unprepare_mclk;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1242        ret = 
adc3xxx_parse_dt_micbias(adc3xxx, "ti,micbias2-vg", &adc3xxx->micbias_vg[1]);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1243        if (ret < 0)
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1244                goto 
err_unprepare_mclk;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1245  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1246        adc3xxx->regmap = 
devm_regmap_init_i2c(i2c, &adc3xxx_regmap);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1247        if 
(IS_ERR(adc3xxx->regmap)) {
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1248                ret = 
PTR_ERR(adc3xxx->regmap);
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1249                goto 
err_unprepare_mclk;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1250        }
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1251  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1252        i2c_set_clientdata(i2c, 
adc3xxx);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1253  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1254        adc3xxx->type = 
id->driver_data;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1255  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1256        /* Reset codec chip */
e9a3b57efd28fe Ricard Wanderlof 2021-12-15 @1257        
gpiod_set_value_cansleep(adc3xxx->rst_pin, 1);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1258        usleep_range(2000, 
100000); /* Requirement: > 10 ns (datasheet p13) */
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1259        
gpiod_set_value_cansleep(adc3xxx->rst_pin, 0);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1260  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1261        /* Potentially set up 
pins used as GPIOs */
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1262        
adc3xxx_init_gpio(adc3xxx);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1263  
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1264        ret = 
snd_soc_register_component(dev,
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1265                        
&soc_component_dev_adc3xxx, &adc3xxx_dai, 1);
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1266        if (ret < 0) {
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1267                dev_err(dev, 
"Failed to register codec: %d\n", ret);
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1268                goto 
err_unprepare_mclk;
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1269        }
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1270  
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1271        return 0;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1272  
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1273  err_unprepare_mclk:
8a2d8e4fed6d58 Yang Yingliang   2021-12-23  1274        
clk_disable_unprepare(adc3xxx->mclk);
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1275        return ret;
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1276  }
e9a3b57efd28fe Ricard Wanderlof 2021-12-15  1277  

:::::: The code at line 1209 was first introduced by commit
:::::: e9a3b57efd28fe889a98171bdc1e9e0dd7eb9a50 ASoC: codec: tlv320adc3xxx: New 
codec driver

:::::: TO: Ricard Wanderlof <[email protected]>
:::::: CC: Mark Brown <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to