Commit e3bc6566 authored by David S. Miller's avatar David S. Miller

Merge branch 'nfc-s3fwrn5-Change-I2C-interrupt-trigger-to-EDGE_RISING'

Bongsu Jeon says:

====================
nfc: s3fwrn5: Change I2C interrupt trigger to EDGE_RISING

For stable Samsung's I2C interrupt handling, I changed the interrupt
trigger from IRQ_TYPE_LEVEL_HIGH to IRQ_TYPE_EDGE_RISING and removed
the hard coded interrupt trigger type in the i2c module for the flexible
control.

1/2 is the changed dt binding for the edge rising trigger.
2/2 is to remove the hard coded interrupt trigger type in the i2c module.

ChangeLog:
 v2:
  2/2
   - remove the hard coded interrupt trigger type.

Bongsu Jeon (2):
  dt-bindings: net: nfc: s3fwrn5: Change I2C interrupt trigger to
    EDGE_RISING
  nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c
    module
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e65f3df5 237410fb
......@@ -76,7 +76,7 @@ examples:
reg = <0x27>;
interrupt-parent = <&gpa1>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
interrupts = <3 IRQ_TYPE_EDGE_RISING>;
en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>;
wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>;
......
......@@ -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;
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment