Commit b5e17d9b authored by Mark A. Greer's avatar Mark A. Greer Committed by Samuel Ortiz

NFC: trf7970a: Rename TRF7970A_ST_OFF to TRF7970A_ST_RF_OFF

Rename the 'TRF7970A_ST_OFF' state to 'TRF7970A_ST_RF_OFF'
to make it clear that this state means that the RF is
off and not the entire device.
Signed-off-by: default avatarMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 0a1de842
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
(ISO15693_REQ_FLAG_SUB_CARRIER | ISO15693_REQ_FLAG_DATA_RATE) (ISO15693_REQ_FLAG_SUB_CARRIER | ISO15693_REQ_FLAG_DATA_RATE)
enum trf7970a_state { enum trf7970a_state {
TRF7970A_ST_OFF, TRF7970A_ST_RF_OFF,
TRF7970A_ST_IDLE, TRF7970A_ST_IDLE,
TRF7970A_ST_IDLE_RX_BLOCKED, TRF7970A_ST_IDLE_RX_BLOCKED,
TRF7970A_ST_WAIT_FOR_TX_FIFO, TRF7970A_ST_WAIT_FOR_TX_FIFO,
...@@ -686,7 +686,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id) ...@@ -686,7 +686,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id)
mutex_lock(&trf->lock); mutex_lock(&trf->lock);
if (trf->state == TRF7970A_ST_OFF) { if (trf->state == TRF7970A_ST_RF_OFF) {
mutex_unlock(&trf->lock); mutex_unlock(&trf->lock);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -863,7 +863,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf) ...@@ -863,7 +863,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf)
trf7970a_write(trf, TRF7970A_CHIP_STATUS_CTRL, trf->chip_status_ctrl); trf7970a_write(trf, TRF7970A_CHIP_STATUS_CTRL, trf->chip_status_ctrl);
trf->aborting = false; trf->aborting = false;
trf->state = TRF7970A_ST_OFF; trf->state = TRF7970A_ST_RF_OFF;
pm_runtime_mark_last_busy(trf->dev); pm_runtime_mark_last_busy(trf->dev);
pm_runtime_put_autosuspend(trf->dev); pm_runtime_put_autosuspend(trf->dev);
...@@ -899,7 +899,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) ...@@ -899,7 +899,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on)
if (on) { if (on) {
switch (trf->state) { switch (trf->state) {
case TRF7970A_ST_OFF: case TRF7970A_ST_RF_OFF:
ret = trf7970a_switch_rf_on(trf); ret = trf7970a_switch_rf_on(trf);
break; break;
case TRF7970A_ST_IDLE: case TRF7970A_ST_IDLE:
...@@ -913,7 +913,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) ...@@ -913,7 +913,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on)
} }
} else { } else {
switch (trf->state) { switch (trf->state) {
case TRF7970A_ST_OFF: case TRF7970A_ST_RF_OFF:
break; break;
default: default:
dev_err(trf->dev, "%s - Invalid request: %d %d\n", dev_err(trf->dev, "%s - Invalid request: %d %d\n",
...@@ -1045,7 +1045,7 @@ static int trf7970a_in_configure_hw(struct nfc_digital_dev *ddev, int type, ...@@ -1045,7 +1045,7 @@ static int trf7970a_in_configure_hw(struct nfc_digital_dev *ddev, int type,
mutex_lock(&trf->lock); mutex_lock(&trf->lock);
if (trf->state == TRF7970A_ST_OFF) { if (trf->state == TRF7970A_ST_RF_OFF) {
ret = trf7970a_switch_rf_on(trf); ret = trf7970a_switch_rf_on(trf);
if (ret) if (ret)
goto err_unlock; goto err_unlock;
...@@ -1348,7 +1348,7 @@ static int trf7970a_probe(struct spi_device *spi) ...@@ -1348,7 +1348,7 @@ static int trf7970a_probe(struct spi_device *spi)
if (!trf) if (!trf)
return -ENOMEM; return -ENOMEM;
trf->state = TRF7970A_ST_OFF; trf->state = TRF7970A_ST_RF_OFF;
trf->dev = &spi->dev; trf->dev = &spi->dev;
trf->spi = spi; trf->spi = spi;
...@@ -1507,7 +1507,7 @@ static int trf7970a_pm_runtime_suspend(struct device *dev) ...@@ -1507,7 +1507,7 @@ static int trf7970a_pm_runtime_suspend(struct device *dev)
dev_dbg(dev, "Runtime suspend\n"); dev_dbg(dev, "Runtime suspend\n");
if (trf->state != TRF7970A_ST_OFF) { if (trf->state != TRF7970A_ST_RF_OFF) {
dev_dbg(dev, "Can't suspend - not in OFF state (%d)\n", dev_dbg(dev, "Can't suspend - not in OFF state (%d)\n",
trf->state); trf->state);
return -EBUSY; return -EBUSY;
......
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