lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
From
Date
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

\
 
 \ /
  Last update: 2021-03-02 16:40    [W:0.044 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site