From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752585AbbHMATc (ORCPT ); Wed, 12 Aug 2015 20:19:32 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:57427 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751746AbbHMATa (ORCPT ); Wed, 12 Aug 2015 20:19:30 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee68d-f79106d00000728c-0e-55cbe2813f74 Content-transfer-encoding: 8BIT Message-id: <55CBE280.10905@samsung.com> Date: Thu, 13 Aug 2015 09:19:12 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 To: Stephen Rothwell Cc: =?UTF-8?B?VXdlIEtsZWluZS1Lw7ZuaWc=?= , Linus Walleij , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: Re: linux-next: build failure after merge of the gpio tree References: <20150812181045.0d290caa@canb.auug.org.au> <20150812201642.GW9999@pengutronix.de> <20150813090248.5fa3441f@canb.auug.org.au> In-reply-to: <20150813090248.5fa3441f@canb.auug.org.au> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWyRsSkULfx0elQg2n3BCym/FnOZHF51xw2 i4ML2xgteh5pWWzde5Xd4vbEyYwObB6NN26wedy5tofNo/+vgcfxG9uZPD5vkgtgjeKySUnN ySxLLdK3S+DKuDTlAGtBr0jF4rb9LA2MR/i7GDk5JARMJLbM6WeBsMUkLtxbz9bFyMUhJLCC UeL+jn5WmKJbD7YxQySWMkp8+XWVCSTBKyAo8WPyPaBuDg5mAXmJI5eyQcLMAuoSk+Ytgqp/ wCixfO5SRoh6DYmexh6wbSwCqhJnP+wAW8AmoCWx/8UNNhBbVCBMYuX0K2AzRQS0JQ78FgCZ wyxwgVGivWkJWL2w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CrIllxZW5hxglOJiVRHgl95wOFeJNSaysSi3Kjy8qzUktPsRoCvTgRGYp0eR8 YKLJK4k3NDYxM7I0Mje0MDI2VxLnld2wOVRIID2xJDU7NbUgtQimj4mDU6qBcbv4yveP+1iO VVZlZzx7oOgt8tFWc2pAr8sS1okZpv+vi/CK29gq9p/MX5nZzsy7ztlIaVNMwir+V0fPzWko twvat27yhlATgyfzJC+92536YGH5crnFx4rnlByQunjwuVDyjX8Nl2MOdtROnSHzQD1ETuqA uJySzTePr+4K2yqsxNheLnz3VYmlOCPRUIu5qDgRAGdJIpn8AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, On 08/13/2015 08:02 AM, Stephen Rothwell wrote: > Hi Uwe, > > On Wed, 12 Aug 2015 22:16:42 +0200 Uwe Kleine-König wrote: >> >> 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. > > OK, I have fixed my merge fix patch, but can you submit a correct patch > to the extcon tree maintainer, please? I assume it can be fixed in > that tree right now, right? > I'll fix it as Uwe comment as following: --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -208,7 +208,8 @@ static int palmas_usb_probe(struct platform_device *pdev) palmas_usb->wakeup = pdata->wakeup; } - palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id"); + palmas_usb->id_gpiod = + devm_gpiod_get_optional(&pdev->dev, "id", GPIOD_IN); if (IS_ERR(palmas_usb->id_gpiod)) { dev_err(&pdev->dev, "failed to get id gpio\n"); return PTR_ERR(palmas_usb->id_gpiod); I'll send it to LKML and apply it on extcon-next tree. Thanks, Chanwoo Choi