unsigned int gpio_reset;
unsigned int irq_polarity;
-
- int powered;
};
#define I2C_DUMP_SKB(info, skb) \
gpio_set_value(phy->gpio_reset, 0);
usleep_range(10000, 15000);
gpio_set_value(phy->gpio_reset, 1);
- phy->powered = 1;
usleep_range(80000, 85000);
return 0;
{
struct st21nfcb_i2c_phy *phy = phy_id;
- phy->powered = 0;
/* reset chip in order to flush clf */
gpio_set_value(phy->gpio_reset, 0);
usleep_range(10000, 15000);
if (phy->ndlc->hard_fault)
return IRQ_HANDLED;
- if (!phy->powered) {
+ if (!phy->ndlc->powered) {
st21nfcb_nci_i2c_disable(phy);
return IRQ_HANDLED;
}
{
/* toggle reset pin */
ndlc->ops->enable(ndlc->phy_id);
+ ndlc->powered = 1;
return 0;
}
EXPORT_SYMBOL(ndlc_open);
{
/* toggle reset pin */
ndlc->ops->disable(ndlc->phy_id);
+ ndlc->powered = 0;
}
EXPORT_SYMBOL(ndlc_close);
ndlc->ops = phy_ops;
ndlc->phy_id = phy_id;
ndlc->dev = dev;
+ ndlc->powered = 0;
*ndlc_id = ndlc;