From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] i2c: mux: pca954x needs gpiolib
Date: Thu, 05 Jun 2014 12:56:08 +0200 [thread overview]
Message-ID: <6840846.92XabYdCA4@avalon> (raw)
In-Reply-To: <17059569.EZXzqhtzTf@wuerfel>
Hi Arnd,
On Thursday 05 June 2014 12:44:47 Arnd Bergmann wrote:
> commit 4807e8459bce ("i2c: mux: pca954x: Use the descriptor-based GPIO
> API") moved this driver over to the gpio descriptor API, which means
> we now have a dependency on GPIOLIB and get this build error when
> it is disabled:
>
> i2c/muxes/i2c-mux-pca954x.c: In function 'pca954x_probe':
> i2c/muxes/i2c-mux-pca954x.c:204:2: error: implicit declaration of function
> 'devm_gpiod_get' [-Werror=implicit-function-declaration] gpio =
> devm_gpiod_get(&client->dev, "reset");
> ^
> i2c/muxes/i2c-mux-pca954x.c:204:7: warning: assignment makes pointer from
> integer without a cast [enabled by default] gpio =
> devm_gpiod_get(&client->dev, "reset");
> ^
> i2c/muxes/i2c-mux-pca954x.c:206:3: error: implicit declaration of function
> 'gpiod_direction_output' [-Werror=implicit-function-declaration]
> gpiod_direction_output(gpio, 0);
> ^
>
> This adds the dependency in Kconfig as we do for other similar drivers.
I've sent "i2c: pca954x: Fix compilation without CONFIG_GPIOLIB" yesterday,
which fixes the compilation issue by including <linux/gpio/consumer.h>. When
CONFIG_GPIOLIB isn't set the header defines stub functions, keeping the driver
usable without GPIOLIB support.
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Cc: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
>
> diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
> index f7f9865b..f6d313e 100644
> --- a/drivers/i2c/muxes/Kconfig
> +++ b/drivers/i2c/muxes/Kconfig
> @@ -40,6 +40,7 @@ config I2C_MUX_PCA9541
>
> config I2C_MUX_PCA954x
> tristate "Philips PCA954x I2C Mux/switches"
> + depends on GPIOLIB
> help
> If you say yes here you get support for the Philips PCA954x
> I2C mux/switch devices.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-06-05 10:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 10:44 [PATCH] i2c: mux: pca954x needs gpiolib Arnd Bergmann
2014-06-05 10:56 ` Laurent Pinchart [this message]
2014-06-05 11:24 ` Arnd Bergmann
2014-06-05 11:36 ` Laurent Pinchart
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=6840846.92XabYdCA4@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).