[gpio:gpio-descriptors-regulator 14/26] drivers//regulator/lm363x-regulator.c:222:8: error: unknown type name 'gpio_desc'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-regulator
head:   0e78939e6e7091d8e0cb6d259758eab6874145e6
commit: 90b5a23dec6e0f7a89208bd25da9e8a8d28b530f [14/26] regulator: lm363x: Pass descriptor instead of GPIO number
config: x86_64-randconfig-x018-201800 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout 90b5a23dec6e0f7a89208bd25da9e8a8d28b530f
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers//regulator/lm363x-regulator.c:222:8: error: unknown type name 'gpio_desc'
    static gpio_desc *lm363x_regulator_of_get_enable_gpio(struct device *dev, int id)
           ^~~~~~~~~
   drivers//regulator/lm363x-regulator.c: In function 'lm363x_regulator_of_get_enable_gpio':
>> drivers//regulator/lm363x-regulator.c:230:10: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
      return devm_gpiod_get_index_optional(dev, "enable", 0, GPIOD_OUT_LOW);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers//regulator/lm363x-regulator.c:232:10: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
      return devm_gpiod_get_index_optional(dev, "enable", 1, GPIOD_OUT_LOW);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers//regulator/lm363x-regulator.c: In function 'lm363x_regulator_probe':
>> drivers//regulator/lm363x-regulator.c:256:8: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     gpiod = lm363x_regulator_of_get_enable_gpio(dev, id);
           ^
   cc1: some warnings being treated as errors

vim +/gpio_desc +222 drivers//regulator/lm363x-regulator.c

   221	
 > 222	static gpio_desc *lm363x_regulator_of_get_enable_gpio(struct device *dev, int id)
   223	{
   224		/*
   225		 * Check LCM_EN1/2_GPIO is configured.
   226		 * Those pins are used for enabling VPOS/VNEG LDOs.
   227		 */
   228		switch (id) {
   229		case LM3632_LDO_POS:
 > 230			return devm_gpiod_get_index_optional(dev, "enable", 0, GPIOD_OUT_LOW);
   231		case LM3632_LDO_NEG:
   232			return devm_gpiod_get_index_optional(dev, "enable", 1, GPIOD_OUT_LOW);
   233		default:
   234			return NULL;
   235		}
   236	}
   237	
   238	static int lm363x_regulator_probe(struct platform_device *pdev)
   239	{
   240		struct ti_lmu *lmu = dev_get_drvdata(pdev->dev.parent);
   241		struct regmap *regmap = lmu->regmap;
   242		struct regulator_config cfg = { };
   243		struct regulator_dev *rdev;
   244		struct device *dev = &pdev->dev;
   245		int id = pdev->id;
   246		struct gpio_desc *gpiod;
   247		int ret;
   248	
   249		cfg.dev = dev;
   250		cfg.regmap = regmap;
   251	
   252		/*
   253		 * LM3632 LDOs can be controlled by external pin.
   254		 * Register update is required if the pin is used.
   255		 */
 > 256		gpiod = lm363x_regulator_of_get_enable_gpio(dev, id);
   257		if (gpiod) {
   258			cfg.ena_gpiod = gpiod;
   259	
   260			ret = regmap_update_bits(regmap, LM3632_REG_BIAS_CONFIG,
   261						 LM3632_EXT_EN_MASK,
   262						 LM3632_EXT_EN_MASK);
   263			if (ret) {
   264				dev_err(dev, "External pin err: %d\n", ret);
   265				return ret;
   266			}
   267		}
   268	
   269		rdev = devm_regulator_register(dev, &lm363x_regulator_desc[id], &cfg);
   270		if (IS_ERR(rdev)) {
   271			ret = PTR_ERR(rdev);
   272			dev_err(dev, "[%d] regulator register err: %d\n", id, ret);
   273			return ret;
   274		}
   275	
   276		return 0;
   277	}
   278	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux