All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: MAX20086: add gpio/consumer.h
@ 2022-01-15  3:36 Randy Dunlap
  2022-01-15 16:31 ` Laurent Pinchart
  2022-01-19 18:02 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2022-01-15  3:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Watson Chow, Mark Brown,
	Laurent Pinchart

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>
---
 drivers/regulator/max20086-regulator.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20220114.orig/drivers/regulator/max20086-regulator.c
+++ linux-next-20220114/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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: MAX20086: add gpio/consumer.h
  2022-01-15  3:36 [PATCH] regulator: MAX20086: add gpio/consumer.h Randy Dunlap
@ 2022-01-15 16:31 ` Laurent Pinchart
  2022-01-19 18:02 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2022-01-15 16:31 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, kernel test robot, Watson Chow, Mark Brown

Hi Randy,

Thank you for the patch.

On Fri, Jan 14, 2022 at 07:36:03PM -0800, Randy Dunlap wrote:
> 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>

> ---
>  drivers/regulator/max20086-regulator.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-next-20220114.orig/drivers/regulator/max20086-regulator.c
> +++ linux-next-20220114/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>

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: MAX20086: add gpio/consumer.h
  2022-01-15  3:36 [PATCH] regulator: MAX20086: add gpio/consumer.h Randy Dunlap
  2022-01-15 16:31 ` Laurent Pinchart
@ 2022-01-19 18:02 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-01-19 18:02 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Watson Chow, Laurent Pinchart, kernel test robot

On Fri, 14 Jan 2022 19:36:03 -0800, Randy Dunlap wrote:
> 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;
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-linus

Thanks!

[1/1] regulator: MAX20086: add gpio/consumer.h
      commit: b4c18c18ebf7cf1e602af88c12ef9cb0d6e5ce51

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-19 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-15  3:36 [PATCH] regulator: MAX20086: add gpio/consumer.h Randy Dunlap
2022-01-15 16:31 ` Laurent Pinchart
2022-01-19 18:02 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.