From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483AbdCMH1z (ORCPT ); Mon, 13 Mar 2017 03:27:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbdCMH1t (ORCPT ); Mon, 13 Mar 2017 03:27:49 -0400 Subject: Re: [PATCH 2/2] extcon: int3496: Explicitly set the id pin to direction-input To: Andy Shevchenko References: <20170310205209.16370-1-hdegoede@redhat.com> <20170310205209.16370-2-hdegoede@redhat.com> Cc: MyungJoo Ham , Chanwoo Choi , "linux-kernel@vger.kernel.org" , Andy Shevchenko From: Hans de Goede Message-ID: Date: Mon, 13 Mar 2017 08:27:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 13 Mar 2017 07:27:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10-03-17 23:11, Andy Shevchenko wrote: > On Fri, Mar 10, 2017 at 10:52 PM, Hans de Goede wrote: >> With the new more strict ACPI gpio code the dsdt's IoRestriction >> flags are honored on gpiod_get, but in some dsdt's it is wrong, >> so explicitly call gpiod_direction_input on the id gpio. >> >> This fixes the following errors when the int3496 code is used >> together with the new more strict ACPI gpio code: >> >> [ 2382.484415] gpio gpiochip1: (INT33FF:01): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ >> [ 2382.484425] gpio gpiochip1: (INT33FF:01): unable to lock HW IRQ 3 for IRQ >> [ 2382.484429] genirq: Failed to request resources for INT3496:00 (irq 174) on irqchip chv-gpio >> [ 2382.484518] intel-int3496 INT3496:00: can't request IRQ for USB ID GPIO: -22 >> [ 2382.500359] intel-int3496: probe of INT3496:00 failed with error -22 > > Because my patches are not yet upstreamed I think this would be postponed. > I can take it into my branch and send together with the rest. What do you think? It does not hurt to get it upstream already and merging patch-sets generally is a lot easier if they do not span multiple subsystems. So I think it would be better to get it upstream already as preparation for your series. > >> --- a/drivers/extcon/extcon-intel-int3496.c >> +++ b/drivers/extcon/extcon-intel-int3496.c >> @@ -113,6 +113,7 @@ static int int3496_probe(struct platform_device *pdev) >> dev_err(dev, "can't request USB ID GPIO: %d\n", ret); >> return ret; >> } > > It would be nice to check the direction here and complain to the user > loudly the firmware has a bug. Ok, I will send a v2 doing this. > >> + gpiod_direction_input(data->gpio_usb_id); > Regards, Hans