linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] gpiolib: acpi: Print pin number on acpi_gpiochip_alloc_event errors
Date: Mon, 21 Oct 2019 14:52:13 +0200	[thread overview]
Message-ID: <f3294033-8105-8c26-a8e2-3ced55276fdb@redhat.com> (raw)
In-Reply-To: <20191021091124.GK32742@smile.fi.intel.com>

Hi,

On 21-10-2019 11:11, Andy Shevchenko wrote:
> On Fri, Oct 18, 2019 at 09:52:08PM +0200, Hans de Goede wrote:
>> Print pin number on acpi_gpiochip_alloc_event errors, to help debugging
>> these.
> 
> I'm not sure which one is better decimal or hex, perhaps Mika can help me, in any case

They are listed as hex in the dis-assembled DSTD.

Regards,

Hans




> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   drivers/gpio/gpiolib-acpi.c | 9 ++++++---
>>   1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
>> index 609ed16ae933..2911dd6f2625 100644
>> --- a/drivers/gpio/gpiolib-acpi.c
>> +++ b/drivers/gpio/gpiolib-acpi.c
>> @@ -230,19 +230,22 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
>>   	desc = gpiochip_request_own_desc(chip, pin, "ACPI:Event",
>>   					 GPIO_ACTIVE_HIGH, GPIOD_IN);
>>   	if (IS_ERR(desc)) {
>> -		dev_err(chip->parent, "Failed to request GPIO\n");
>> +		dev_err(chip->parent,
>> +			"Failed to request GPIO for pin 0x%02X\n", pin);
>>   		return AE_ERROR;
>>   	}
>>   
>>   	ret = gpiochip_lock_as_irq(chip, pin);
>>   	if (ret) {
>> -		dev_err(chip->parent, "Failed to lock GPIO as interrupt\n");
>> +		dev_err(chip->parent,
>> +			"Failed to lock GPIO pin 0x%02X as interrupt\n", pin);
>>   		goto fail_free_desc;
>>   	}
>>   
>>   	irq = gpiod_to_irq(desc);
>>   	if (irq < 0) {
>> -		dev_err(chip->parent, "Failed to translate GPIO to IRQ\n");
>> +		dev_err(chip->parent,
>> +			"Failed to translate GPIO pin 0x%02X to IRQ\n", pin);
>>   		goto fail_unlock_irq;
>>   	}
>>   
>> -- 
>> 2.23.0
>>
> 


  reply	other threads:[~2019-10-21 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 19:52 [PATCH] gpiolib: acpi: Print pin number on acpi_gpiochip_alloc_event errors Hans de Goede
2019-10-21  9:11 ` Andy Shevchenko
2019-10-21 12:52   ` Hans de Goede [this message]
2019-10-21 13:23     ` Andy Shevchenko
2019-11-14 10:13       ` Hans de Goede
2019-10-21 13:26   ` 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=f3294033-8105-8c26-a8e2-3ced55276fdb@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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).