tree: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next head: 41493dd4c8b67a3e9857b84f4e59460d09005963 commit: 3991c5c80beaf7eb9bce61e0b2f8f449e351a38e [3/20] i2c: Switch to using gpiod interface for gpio bus recovery config: m32r-m32104ut_defconfig (attached as .config) compiler: m32r-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 3991c5c80beaf7eb9bce61e0b2f8f449e351a38e # save the attached .config to linux build tree make.cross ARCH=m32r Note: the wsa/i2c/for-next HEAD 41493dd4c8b67a3e9857b84f4e59460d09005963 builds fine. It only hurts bisectibility. All error/warnings (new ones prefixed by >>): drivers/i2c/i2c-core-base.c: In function 'get_scl_gpio_value': drivers/i2c/i2c-core-base.c:137:9: error: implicit declaration of function 'gpiod_get_value_cansleep' [-Werror=implicit-function-declaration] return gpiod_get_value_cansleep(adap->bus_recovery_info->scl_gpiod); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-base.c: In function 'set_scl_gpio_value': drivers/i2c/i2c-core-base.c:142:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(adap->bus_recovery_info->scl_gpiod, val); ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/i2c/i2c-core-base.c: In function 'i2c_get_gpios_for_recovery': >> drivers/i2c/i2c-core-base.c:162:19: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration] bri->scl_gpiod = gpio_to_desc(bri->scl_gpio); ^~~~~~~~~~~~ >> drivers/i2c/i2c-core-base.c:162:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion] bri->scl_gpiod = gpio_to_desc(bri->scl_gpio); ^ drivers/i2c/i2c-core-base.c:171:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion] bri->sda_gpiod = gpio_to_desc(bri->sda_gpio); ^ cc1: some warnings being treated as errors vim +/gpio_to_desc +162 drivers/i2c/i2c-core-base.c 133 134 /* i2c bus recovery routines */ 135 static int get_scl_gpio_value(struct i2c_adapter *adap) 136 { > 137 return gpiod_get_value_cansleep(adap->bus_recovery_info->scl_gpiod); 138 } 139 140 static void set_scl_gpio_value(struct i2c_adapter *adap, int val) 141 { > 142 gpiod_set_value_cansleep(adap->bus_recovery_info->scl_gpiod, val); 143 } 144 145 static int get_sda_gpio_value(struct i2c_adapter *adap) 146 { 147 return gpiod_get_value_cansleep(adap->bus_recovery_info->sda_gpiod); 148 } 149 150 static int i2c_get_gpios_for_recovery(struct i2c_adapter *adap) 151 { 152 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; 153 struct device *dev = &adap->dev; 154 int ret = 0; 155 156 ret = gpio_request_one(bri->scl_gpio, GPIOF_OPEN_DRAIN | 157 GPIOF_OUT_INIT_HIGH, "i2c-scl"); 158 if (ret) { 159 dev_warn(dev, "Can't get SCL gpio: %d\n", bri->scl_gpio); 160 return ret; 161 } > 162 bri->scl_gpiod = gpio_to_desc(bri->scl_gpio); 163 164 if (bri->get_sda) { 165 if (gpio_request_one(bri->sda_gpio, GPIOF_IN, "i2c-sda")) { 166 /* work without SDA polling */ 167 dev_warn(dev, "Can't get SDA gpio: %d. Not using SDA polling\n", 168 bri->sda_gpio); 169 bri->get_sda = NULL; 170 } 171 bri->sda_gpiod = gpio_to_desc(bri->sda_gpio); 172 } 173 174 return ret; 175 } 176 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip