From: Hans de Goede <hdegoede@redhat.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Chen-Yu Tsai <wens@csie.org>
Cc: linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v2] extcon: int3496: Set the id pin to direction-input if necessary
Date: Mon, 13 Mar 2017 11:51:34 +0100 [thread overview]
Message-ID: <5a55cc63-335f-37c3-4a2f-9d2f60d8895b@redhat.com> (raw)
In-Reply-To: <58C674C0.3010001@samsung.com>
Hi,
On 13-03-17 11:30, Chanwoo Choi wrote:
> Hi,
>
> On 2017년 03월 13일 17:40, 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 if
>> necessary.
>>
>> 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
>>
>> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> Changes in v2:
>> -Warn about firmware bug when the dsdt's IoRestriction does not allow input
>> ---
>> drivers/extcon/extcon-intel-int3496.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
>> index b8ac947..18801eb 100644
>> --- a/drivers/extcon/extcon-intel-int3496.c
>> +++ b/drivers/extcon/extcon-intel-int3496.c
>> @@ -113,6 +113,10 @@ static int int3496_probe(struct platform_device *pdev)
>> dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
>> return ret;
>> }
>
> Need to add one blank line at here.
I grouped it together with the earlier error check since it is still
checking the returned gpiodesc is valid, but if you prefer to add a line
that is fine by me.
>
>> + if (gpiod_get_direction(data->gpio_usb_id) != GPIOF_DIR_IN) {
>> + dev_warn(dev, "firmware bug USB ID GPIO not in input mode, fixing\n");
>
> The length of warning comment is over 80 char.
Which is allowed, try running checkpatch.pl on the patch. log messages may
cross the 80 char limit, to avoid splitting them over multiple lines which
would make grepping for them hard.
> We need to reduce the length of comment.
Nope, not needed, as said this is allowed.
> I modify the comment as following: If you ok, I'll apply it.
> "ID pin isn't in input mode due to firmware bug"
I prefer my original text which better describes what is happening
and as said before, the text going over the 80 char limit is allowed.
Regards,
Hans
>
> Or if you make new comment under 80 char, please send v3 patch.
>
>> + gpiod_direction_input(data->gpio_usb_id);
>> + }
>>
>> data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id);
>> if (data->usb_id_irq < 0) {
>>
>
next prev parent reply other threads:[~2017-03-13 10:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170313084009epcas2p2c9790c6378225f66cc8cacbb82f2ba41@epcas2p2.samsung.com>
2017-03-13 8:40 ` Hans de Goede
2017-03-13 10:30 ` Chanwoo Choi
2017-03-13 10:51 ` Hans de Goede [this message]
2017-03-13 11:03 ` Chanwoo Choi
2017-03-13 11:10 ` Andy Shevchenko
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=5a55cc63-335f-37c3-4a2f-9d2f60d8895b@redhat.com \
--to=hdegoede@redhat.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=cw00.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=wens@csie.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
all inboxes | Powered by JetHome®