public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.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 12:11:24 +0300	[thread overview]
Message-ID: <20191021091124.GK32742@smile.fi.intel.com> (raw)
In-Reply-To: <20191018195208.94405-1-hdegoede@redhat.com>

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
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
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2019-10-21  9:11 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 [this message]
2019-10-21 12:52   ` Hans de Goede
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=20191021091124.GK32742@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=hdegoede@redhat.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