diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2022-01-14 19:36:03 -0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-01-19 16:47:39 +0000 |
commit | b4c18c18ebf7cf1e602af88c12ef9cb0d6e5ce51 (patch) | |
tree | 1f4a1f1cca8b494e2cf43268c604d10db1c6c4d9 /drivers/regulator | |
parent | 879cf8006475642b747aaaa4d06f7044ab2de794 (diff) | |
download | linux-stable-b4c18c18ebf7cf1e602af88c12ef9cb0d6e5ce51.tar.gz linux-stable-b4c18c18ebf7cf1e602af88c12ef9cb0d6e5ce51.tar.bz2 linux-stable-b4c18c18ebf7cf1e602af88c12ef9cb0d6e5ce51.zip |
regulator: MAX20086: add gpio/consumer.h
max20086-regulator.c needs <linux/gpio/consumer.h> for an enum, some
macros, and a function prototype. (seen on ARCH=m68k)
Adding this header file fixes multiple build errors:
../drivers/regulator/max20086-regulator.c: In function 'max20086_i2c_probe':
../drivers/regulator/max20086-regulator.c:217:26: error: storage size of 'flags' isn't known
217 | enum gpiod_flags flags;
../drivers/regulator/max20086-regulator.c:261:27: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function); did you mean 'GPIOF_INIT_HIGH'?
261 | flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
| ^~~~~~~~~~~~~~
../drivers/regulator/max20086-regulator.c:261:44: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
261 | flags = boot_on ? GPIOD_OUT_HIGH : GPIOD_OUT_LOW;
../drivers/regulator/max20086-regulator.c:262:27: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
262 | chip->ena_gpiod = devm_gpiod_get(chip->dev, "enable", flags);
../drivers/regulator/max20086-regulator.c:217:26: warning: unused variable 'flags' [-Wunused-variable]
217 | enum gpiod_flags flags;
Fixes: bfff546aae50 ("regulator: Add MAX20086-MAX20089 driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Watson Chow <watson.chow@avnet.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20220115033603.24473-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max20086-regulator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/max20086-regulator.c b/drivers/regulator/max20086-regulator.c index 63aa6ec3254a..b8bf76c170fe 100644 --- a/drivers/regulator/max20086-regulator.c +++ b/drivers/regulator/max20086-regulator.c @@ -7,6 +7,7 @@ #include <linux/err.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/module.h> #include <linux/regmap.h> |