Lines Matching refs:phy

68 	struct st21nfcb_i2c_phy *phy = phy_id;  in st21nfcb_nci_i2c_enable()  local
70 gpio_set_value(phy->gpio_reset, 0); in st21nfcb_nci_i2c_enable()
72 gpio_set_value(phy->gpio_reset, 1); in st21nfcb_nci_i2c_enable()
73 phy->powered = 1; in st21nfcb_nci_i2c_enable()
81 struct st21nfcb_i2c_phy *phy = phy_id; in st21nfcb_nci_i2c_disable() local
83 phy->powered = 0; in st21nfcb_nci_i2c_disable()
85 gpio_set_value(phy->gpio_reset, 0); in st21nfcb_nci_i2c_disable()
87 gpio_set_value(phy->gpio_reset, 1); in st21nfcb_nci_i2c_disable()
98 struct st21nfcb_i2c_phy *phy = phy_id; in st21nfcb_nci_i2c_write() local
99 struct i2c_client *client = phy->i2c_dev; in st21nfcb_nci_i2c_write()
103 if (phy->ndlc->hard_fault != 0) in st21nfcb_nci_i2c_write()
104 return phy->ndlc->hard_fault; in st21nfcb_nci_i2c_write()
135 static int st21nfcb_nci_i2c_read(struct st21nfcb_i2c_phy *phy, in st21nfcb_nci_i2c_read() argument
141 struct i2c_client *client = phy->i2c_dev; in st21nfcb_nci_i2c_read()
190 struct st21nfcb_i2c_phy *phy = phy_id; in st21nfcb_nci_irq_thread_fn() local
195 if (!phy || !phy->ndlc || irq != phy->i2c_dev->irq) { in st21nfcb_nci_irq_thread_fn()
200 client = phy->i2c_dev; in st21nfcb_nci_irq_thread_fn()
203 if (phy->ndlc->hard_fault) in st21nfcb_nci_irq_thread_fn()
206 if (!phy->powered) { in st21nfcb_nci_irq_thread_fn()
207 st21nfcb_nci_i2c_disable(phy); in st21nfcb_nci_irq_thread_fn()
211 r = st21nfcb_nci_i2c_read(phy, &skb); in st21nfcb_nci_irq_thread_fn()
215 ndlc_recv(phy->ndlc, skb); in st21nfcb_nci_irq_thread_fn()
229 struct st21nfcb_i2c_phy *phy = i2c_get_clientdata(client); in st21nfcb_nci_i2c_of_request_resources() local
253 phy->gpio_reset = gpio; in st21nfcb_nci_i2c_of_request_resources()
255 phy->irq_polarity = irq_get_trigger_type(client->irq); in st21nfcb_nci_i2c_of_request_resources()
269 struct st21nfcb_i2c_phy *phy = i2c_get_clientdata(client); in st21nfcb_nci_i2c_request_resources() local
279 phy->gpio_reset = pdata->gpio_reset; in st21nfcb_nci_i2c_request_resources()
280 phy->irq_polarity = pdata->irq_polarity; in st21nfcb_nci_i2c_request_resources()
283 phy->gpio_reset, GPIOF_OUT_INIT_HIGH, "clf_reset"); in st21nfcb_nci_i2c_request_resources()
295 struct st21nfcb_i2c_phy *phy; in st21nfcb_nci_i2c_probe() local
307 phy = devm_kzalloc(&client->dev, sizeof(struct st21nfcb_i2c_phy), in st21nfcb_nci_i2c_probe()
309 if (!phy) in st21nfcb_nci_i2c_probe()
312 phy->i2c_dev = client; in st21nfcb_nci_i2c_probe()
314 i2c_set_clientdata(client, phy); in st21nfcb_nci_i2c_probe()
336 r = ndlc_probe(phy, &i2c_phy_ops, &client->dev, in st21nfcb_nci_i2c_probe()
338 &phy->ndlc); in st21nfcb_nci_i2c_probe()
346 phy->irq_polarity | IRQF_ONESHOT, in st21nfcb_nci_i2c_probe()
347 ST21NFCB_NCI_DRIVER_NAME, phy); in st21nfcb_nci_i2c_probe()
356 struct st21nfcb_i2c_phy *phy = i2c_get_clientdata(client); in st21nfcb_nci_i2c_remove() local
360 ndlc_remove(phy->ndlc); in st21nfcb_nci_i2c_remove()