From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433AbbHLURE (ORCPT ); Wed, 12 Aug 2015 16:17:04 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:41174 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752376AbbHLUQx (ORCPT ); Wed, 12 Aug 2015 16:16:53 -0400 Date: Wed, 12 Aug 2015 22:16:42 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Stephen Rothwell Cc: Linus Walleij , Chanwoo Choi , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: Re: linux-next: build failure after merge of the gpio tree Message-ID: <20150812201642.GW9999@pengutronix.de> References: <20150812181045.0d290caa@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150812181045.0d290caa@canb.auug.org.au> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Aug 12, 2015 at 06:10:45PM +1000, Stephen Rothwell wrote: > After merging the gpio tree, today's linux-next build (powerpc > allyesconfig) failed like this: > > drivers/extcon/extcon-palmas.c:211:25: error: too few arguments to function 'devm_gpiod_get_optional' > palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id"); > ^ > In file included from /home/sfr/next/next/include/asm-generic/gpio.h:13:0, > from /home/sfr/next/next/include/linux/gpio.h:51, > from /home/sfr/next/next/include/linux/of_gpio.h:20, > from /home/sfr/next/next/include/linux/mfd/palmas.h:24, > from /home/sfr/next/next/drivers/extcon/extcon-palmas.c:28: > /home/sfr/next/next/include/linux/gpio/consumer.h:80:32: note: declared here > struct gpio_desc *__must_check devm_gpiod_get_optional(struct device *dev, > ^ > > Caused by commit > > b17d1bf16cc7 ("gpio: make flags mandatory for gpiod_get functions") > > interacting with commit > > 92b7cb5dc885 ("extcon: palmas: Support GPIO based USB ID detection") that commit is not correct. After palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id"); it does palmas_usb->gpio_id_irq = gpiod_to_irq(palmas_usb->id_gpiod); without setting the gpio to input. So the right fix is not to add GPIOD_ASIS but GPIOD_IN. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |