Linux LED subsystem development
 help / color / mirror / Atom feed
* Re: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
       [not found] <202102280329.hv7RoHLA-lkp@intel.com>
@ 2021-02-28  8:29 ` Pavel Machek
  2021-03-02  7:57   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2021-02-28  8:29 UTC (permalink / raw)
  To: kernel test robot, linux-leds
  Cc: Amireddy Mallikarjuna reddy, kbuild-all, clang-built-linux,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

Hi!

> >> drivers/leds/blink/leds-lgm-sso.c:263:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
>                    gpiod_set_value(led->gpiod, val);
>                    ^
>    drivers/leds/blink/leds-lgm-sso.c:263:3: note: did you mean
>                    'gpio_set_value'?


It looks like missing #include?

While at it, can you do something with Kconfig help text? Move
existing one into comment in the driver, add something useful for end-users.

Thank you,
									Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
  2021-02-28  8:29 ` drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip' Pavel Machek
@ 2021-03-02  7:57   ` Randy Dunlap
  2021-03-02  8:11     ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2021-03-02  7:57 UTC (permalink / raw)
  To: Pavel Machek, kernel test robot, linux-leds
  Cc: Amireddy Mallikarjuna reddy, kbuild-all, clang-built-linux,
	linux-kernel

On 2/28/21 12:29 AM, Pavel Machek wrote:
> Hi!
> 
>>>> drivers/leds/blink/leds-lgm-sso.c:263:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
>>                    gpiod_set_value(led->gpiod, val);
>>                    ^
>>    drivers/leds/blink/leds-lgm-sso.c:263:3: note: did you mean
>>                    'gpio_set_value'?
> 
> 
> It looks like missing #include?
> 
> While at it, can you do something with Kconfig help text? Move
> existing one into comment in the driver, add something useful for end-users.

The .config file does not set/enable GPIOLIB nor OF.

AFAICT, this driver needs the addition of:

#include <linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
#include <linux/of.h>

and the reference to
	gc->of_node           = dev->of_node;
needs to be inside an
#ifdef CONFIG_GPIO/#endif block.

Also, <linux/gpio/driver.h> needs a stub for gpiochip_get_data().

I have most of that ready (it's in the margin) but I can't
send it tonight. Feel free to fix it up however you want to.

-- 
~Randy

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

* Re: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
  2021-03-02  7:57   ` Randy Dunlap
@ 2021-03-02  8:11     ` Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2021-03-02  8:11 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: kernel test robot, linux-leds, Amireddy Mallikarjuna reddy,
	kbuild-all, clang-built-linux, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

Hi!

> >>>> drivers/leds/blink/leds-lgm-sso.c:263:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
> >>                    gpiod_set_value(led->gpiod, val);
> >>                    ^
> >>    drivers/leds/blink/leds-lgm-sso.c:263:3: note: did you mean
> >>                    'gpio_set_value'?
> > 
> > 
> > It looks like missing #include?
> > 
> > While at it, can you do something with Kconfig help text? Move
> > existing one into comment in the driver, add something useful for end-users.
> 
> The .config file does not set/enable GPIOLIB nor OF.
> 
> AFAICT, this driver needs the addition of:
> 
> #include <linux/gpio/consumer.h>
> #include <linux/gpio/driver.h>
> #include <linux/of.h>
> 
> and the reference to
> 	gc->of_node           = dev->of_node;
> needs to be inside an
> #ifdef CONFIG_GPIO/#endif block.
> 
> Also, <linux/gpio/driver.h> needs a stub for gpiochip_get_data().
> 
> I have most of that ready (it's in the margin) but I can't
> send it tonight. Feel free to fix it up however you want to.

Looking forward. I may be confused, but it looks like original
author's email bounces, which is a bad sign.

What I meant... if you take a look at Kconfig help test, it is really
useless.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

end of thread, other threads:[~2021-03-03  2:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202102280329.hv7RoHLA-lkp@intel.com>
2021-02-28  8:29 ` drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip' Pavel Machek
2021-03-02  7:57   ` Randy Dunlap
2021-03-02  8:11     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox