netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Marco Giorgi <giorgi.marco.96@disroot.org>, netdev@vger.kernel.org
Cc: u.kleine-koenig@pengutronix.de, davem@davemloft.net,
	michael@walle.cc, kuba@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC net 1/2] nfc: nxp-nci: Fix i2c read on ThinkPad hardware
Date: Wed, 7 Jun 2023 19:45:25 +0200	[thread overview]
Message-ID: <07b33c1e-895e-d7d7-a108-0ee5f2812ffa@linaro.org> (raw)
In-Reply-To: <20230607170009.9458-2-giorgi.marco.96@disroot.org>

On 07/06/2023 19:00, Marco Giorgi wrote:
> Add the IRQ GPIO configuration.

Why? Please include reasons in commit msg. What you are doing is quite
easy to see.

> 
> Signed-off-by: Marco Giorgi <giorgi.marco.96@disroot.org>
> ---
>  drivers/nfc/nxp-nci/i2c.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
> index d4c299be7949..4ba26a958258 100644
> --- a/drivers/nfc/nxp-nci/i2c.c
> +++ b/drivers/nfc/nxp-nci/i2c.c
> @@ -35,6 +35,7 @@ struct nxp_nci_i2c_phy {
>  
>  	struct gpio_desc *gpiod_en;
>  	struct gpio_desc *gpiod_fw;
> +	struct gpio_desc *gpiod_irq;
>  
>  	int hard_fault; /*
>  			 * < 0 if hardware error occurred (e.g. i2c err)
> @@ -254,10 +255,12 @@ static irqreturn_t nxp_nci_i2c_irq_thread_fn(int irq, void *phy_id)
>  	return IRQ_NONE;
>  }
>  
> +static const struct acpi_gpio_params irq_gpios = { 0, 0, false };
>  static const struct acpi_gpio_params firmware_gpios = { 1, 0, false };
>  static const struct acpi_gpio_params enable_gpios = { 2, 0, false };
>  
>  static const struct acpi_gpio_mapping acpi_nxp_nci_gpios[] = {
> +	{ "irq-gpios", &irq_gpios, 1 },
>  	{ "enable-gpios", &enable_gpios, 1 },
>  	{ "firmware-gpios", &firmware_gpios, 1 },
>  	{ }
> @@ -286,6 +289,12 @@ static int nxp_nci_i2c_probe(struct i2c_client *client)
>  	if (r)
>  		dev_dbg(dev, "Unable to add GPIO mapping table\n");
>  
> +	phy->gpiod_irq = devm_gpiod_get(dev, "irq", GPIOD_IN);

Bindings do not allow it. Please update bindings... or not, because they
clearly state that interrupts are already there.

You need to explain what is this.



Best regards,
Krzysztof


  reply	other threads:[~2023-06-07 17:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 17:00 [PATCH RFC net 0/2] nfc: nxp-nci: Fix i2c read on ThinkPad hardware Marco Giorgi
2023-06-07 17:00 ` [PATCH RFC net 1/2] " Marco Giorgi
2023-06-07 17:45   ` Krzysztof Kozlowski [this message]
2023-06-11 16:25     ` Marco Giorgi
2023-06-12  7:15       ` Krzysztof Kozlowski
2023-06-07 17:00 ` [PATCH RFC net 2/2] " Marco Giorgi
2023-06-07 17:46   ` Krzysztof Kozlowski
2023-06-11 16:43     ` Marco Giorgi

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=07b33c1e-895e-d7d7-a108-0ee5f2812ffa@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=davem@davemloft.net \
    --cc=giorgi.marco.96@disroot.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).