mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Pavel Machek <pavel@ucw.cz>, kernel test robot <lkp@intel.com>,
	linux-leds@vger.kernel.org
Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com>,
	kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: Re: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
Date: Mon, 1 Mar 2021 23:57:18 -0800	[thread overview]
Message-ID: <c4071c07-e882-96ca-a8fb-34ad1525305f@infradead.org> (raw)
In-Reply-To: <20210228082913.GA27151@amd>

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

  reply	other threads:[~2021-03-02  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27 19:17 kernel test robot
2021-02-28  8:29 ` Pavel Machek
2021-03-02  7:57   ` Randy Dunlap [this message]
2021-03-02  8:11     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4071c07-e882-96ca-a8fb-34ad1525305f@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mallikarjunax.reddy@linux.intel.com \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®