All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Bongsu Jeon <bongsu.jeon2@gmail.com>
Cc: linux-nfc@lists.01.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bongsu Jeon <bongsu.jeon@samsung.com>
Subject: Re: [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module
Date: Thu, 10 Dec 2020 09:18:22 +0100	[thread overview]
Message-ID: <20201210081822.GA3573@kozik-lap> (raw)
In-Reply-To: <20201208141012.6033-3-bongsu.jeon@samsung.com>

On Tue, Dec 08, 2020 at 11:10:12PM +0900, Bongsu Jeon wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> For the flexible control of interrupt trigger type, remove the hard coded
> interrupt trigger type in the i2c module. The trigger type will be loaded
>  from a dts.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> ---
>  drivers/nfc/s3fwrn5/i2c.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
> index e1bdde105f24..42f1f610ac2c 100644
> --- a/drivers/nfc/s3fwrn5/i2c.c
> +++ b/drivers/nfc/s3fwrn5/i2c.c
> @@ -179,6 +179,8 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
>  				  const struct i2c_device_id *id)
>  {
>  	struct s3fwrn5_i2c_phy *phy;
> +	struct irq_data *irq_data;
> +	unsigned long irqflags;
>  	int ret;
>  
>  	phy = devm_kzalloc(&client->dev, sizeof(*phy), GFP_KERNEL);
> @@ -212,8 +214,11 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
>  	if (ret < 0)
>  		return ret;
>  
> +	irq_data = irq_get_irq_data(client->irq);
> +	irqflags = irqd_get_trigger_type(irq_data) | IRQF_ONESHOT;

This patch is wrong and should not be applied. David, please give few
days to review the patches. :)

The irqd_get_trigger_type is not necessary.

I'll send follow ups to correct this.

Best regards,
Krzysztof


> +
>  	ret = devm_request_threaded_irq(&client->dev, phy->i2c_dev->irq, NULL,
> -		s3fwrn5_i2c_irq_thread_fn, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> +		s3fwrn5_i2c_irq_thread_fn, irqflags,
>  		S3FWRN5_I2C_DRIVER_NAME, phy);
>  	if (ret)
>  		s3fwrn5_remove(phy->common.ndev);
> -- 
> 2.17.1
> 

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: linux-nfc@lists.01.org
Subject: [linux-nfc] Re: [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module
Date: Thu, 10 Dec 2020 09:18:22 +0100	[thread overview]
Message-ID: <20201210081822.GA3573@kozik-lap> (raw)
In-Reply-To: 20201208141012.6033-3-bongsu.jeon@samsung.com

[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]

On Tue, Dec 08, 2020@11:10:12PM +0900, Bongsu Jeon wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> For the flexible control of interrupt trigger type, remove the hard coded
> interrupt trigger type in the i2c module. The trigger type will be loaded
>  from a dts.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> ---
>  drivers/nfc/s3fwrn5/i2c.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
> index e1bdde105f24..42f1f610ac2c 100644
> --- a/drivers/nfc/s3fwrn5/i2c.c
> +++ b/drivers/nfc/s3fwrn5/i2c.c
> @@ -179,6 +179,8 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
>  				  const struct i2c_device_id *id)
>  {
>  	struct s3fwrn5_i2c_phy *phy;
> +	struct irq_data *irq_data;
> +	unsigned long irqflags;
>  	int ret;
>  
>  	phy = devm_kzalloc(&client->dev, sizeof(*phy), GFP_KERNEL);
> @@ -212,8 +214,11 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
>  	if (ret < 0)
>  		return ret;
>  
> +	irq_data = irq_get_irq_data(client->irq);
> +	irqflags = irqd_get_trigger_type(irq_data) | IRQF_ONESHOT;

This patch is wrong and should not be applied. David, please give few
days to review the patches. :)

The irqd_get_trigger_type is not necessary.

I'll send follow ups to correct this.

Best regards,
Krzysztof


> +
>  	ret = devm_request_threaded_irq(&client->dev, phy->i2c_dev->irq, NULL,
> -		s3fwrn5_i2c_irq_thread_fn, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> +		s3fwrn5_i2c_irq_thread_fn, irqflags,
>  		S3FWRN5_I2C_DRIVER_NAME, phy);
>  	if (ret)
>  		s3fwrn5_remove(phy->common.ndev);
> -- 
> 2.17.1
> 

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: linux-nfc@lists.01.org
Subject: Re: [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module
Date: Thu, 10 Dec 2020 09:18:22 +0100	[thread overview]
Message-ID: <20201210081822.GA3573@kozik-lap> (raw)
In-Reply-To: <20201208141012.6033-3-bongsu.jeon@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]

On Tue, Dec 08, 2020 at 11:10:12PM +0900, Bongsu Jeon wrote:
> From: Bongsu Jeon <bongsu.jeon@samsung.com>
> 
> For the flexible control of interrupt trigger type, remove the hard coded
> interrupt trigger type in the i2c module. The trigger type will be loaded
>  from a dts.
> 
> Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
> ---
>  drivers/nfc/s3fwrn5/i2c.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
> index e1bdde105f24..42f1f610ac2c 100644
> --- a/drivers/nfc/s3fwrn5/i2c.c
> +++ b/drivers/nfc/s3fwrn5/i2c.c
> @@ -179,6 +179,8 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
>  				  const struct i2c_device_id *id)
>  {
>  	struct s3fwrn5_i2c_phy *phy;
> +	struct irq_data *irq_data;
> +	unsigned long irqflags;
>  	int ret;
>  
>  	phy = devm_kzalloc(&client->dev, sizeof(*phy), GFP_KERNEL);
> @@ -212,8 +214,11 @@ static int s3fwrn5_i2c_probe(struct i2c_client *client,
>  	if (ret < 0)
>  		return ret;
>  
> +	irq_data = irq_get_irq_data(client->irq);
> +	irqflags = irqd_get_trigger_type(irq_data) | IRQF_ONESHOT;

This patch is wrong and should not be applied. David, please give few
days to review the patches. :)

The irqd_get_trigger_type is not necessary.

I'll send follow ups to correct this.

Best regards,
Krzysztof


> +
>  	ret = devm_request_threaded_irq(&client->dev, phy->i2c_dev->irq, NULL,
> -		s3fwrn5_i2c_irq_thread_fn, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> +		s3fwrn5_i2c_irq_thread_fn, irqflags,
>  		S3FWRN5_I2C_DRIVER_NAME, phy);
>  	if (ret)
>  		s3fwrn5_remove(phy->common.ndev);
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-12-10  8:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 14:10 [PATCH v2 net-next 0/2] nfc: s3fwrn5: Change I2C interrupt trigger to EDGE_RISING Bongsu Jeon
2020-12-08 14:10 ` Bongsu Jeon
2020-12-08 14:10 ` [linux-nfc] " Bongsu Jeon
2020-12-08 14:10 ` [PATCH v2 net-next 1/2] dt-bindings: net: nfc: s3fwrn5: Change I2C interrupt trigger type Bongsu Jeon
2020-12-08 14:10   ` Bongsu Jeon
2020-12-08 14:10   ` [linux-nfc] " Bongsu Jeon
2020-12-08 14:10 ` [PATCH v2 net-next 2/2] nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module Bongsu Jeon
2020-12-08 14:10   ` Bongsu Jeon
2020-12-08 14:10   ` [linux-nfc] " Bongsu Jeon
2020-12-10  8:18   ` Krzysztof Kozlowski [this message]
2020-12-10  8:18     ` Krzysztof Kozlowski
2020-12-10  8:18     ` [linux-nfc] " Krzysztof Kozlowski
2020-12-10  0:52 ` [PATCH v2 net-next 0/2] nfc: s3fwrn5: Change I2C interrupt trigger to EDGE_RISING David Miller

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=20201210081822.GA3573@kozik-lap \
    --to=krzk@kernel.org \
    --cc=bongsu.jeon2@gmail.com \
    --cc=bongsu.jeon@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfc@lists.01.org \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.