diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2014-09-02 18:12:34 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-07 17:13:44 -0400 |
commit | b5e17d9b5bd7e53696bce21e38eec5b9bb8abb88 (patch) | |
tree | f97638ec29bfd1079c0e36a8e291bfa4b9896204 /drivers/nfc/trf7970a.c | |
parent | 0a1de84205d3fe7baa3d013ebf703416b1919ecc (diff) |
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: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/trf7970a.c')
-rw-r--r-- | drivers/nfc/trf7970a.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 8c2fb62982c4..cda854b98cf3 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c | |||
@@ -332,7 +332,7 @@ | |||
332 | (ISO15693_REQ_FLAG_SUB_CARRIER | ISO15693_REQ_FLAG_DATA_RATE) | 332 | (ISO15693_REQ_FLAG_SUB_CARRIER | ISO15693_REQ_FLAG_DATA_RATE) |
333 | 333 | ||
334 | enum trf7970a_state { | 334 | enum trf7970a_state { |
335 | TRF7970A_ST_OFF, | 335 | TRF7970A_ST_RF_OFF, |
336 | TRF7970A_ST_IDLE, | 336 | TRF7970A_ST_IDLE, |
337 | TRF7970A_ST_IDLE_RX_BLOCKED, | 337 | TRF7970A_ST_IDLE_RX_BLOCKED, |
338 | TRF7970A_ST_WAIT_FOR_TX_FIFO, | 338 | TRF7970A_ST_WAIT_FOR_TX_FIFO, |
@@ -686,7 +686,7 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id) | |||
686 | 686 | ||
687 | mutex_lock(&trf->lock); | 687 | mutex_lock(&trf->lock); |
688 | 688 | ||
689 | if (trf->state == TRF7970A_ST_OFF) { | 689 | if (trf->state == TRF7970A_ST_RF_OFF) { |
690 | mutex_unlock(&trf->lock); | 690 | mutex_unlock(&trf->lock); |
691 | return IRQ_NONE; | 691 | return IRQ_NONE; |
692 | } | 692 | } |
@@ -863,7 +863,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf) | |||
863 | trf7970a_write(trf, TRF7970A_CHIP_STATUS_CTRL, trf->chip_status_ctrl); | 863 | trf7970a_write(trf, TRF7970A_CHIP_STATUS_CTRL, trf->chip_status_ctrl); |
864 | 864 | ||
865 | trf->aborting = false; | 865 | trf->aborting = false; |
866 | trf->state = TRF7970A_ST_OFF; | 866 | trf->state = TRF7970A_ST_RF_OFF; |
867 | 867 | ||
868 | pm_runtime_mark_last_busy(trf->dev); | 868 | pm_runtime_mark_last_busy(trf->dev); |
869 | pm_runtime_put_autosuspend(trf->dev); | 869 | pm_runtime_put_autosuspend(trf->dev); |
@@ -899,7 +899,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) | |||
899 | 899 | ||
900 | if (on) { | 900 | if (on) { |
901 | switch (trf->state) { | 901 | switch (trf->state) { |
902 | case TRF7970A_ST_OFF: | 902 | case TRF7970A_ST_RF_OFF: |
903 | ret = trf7970a_switch_rf_on(trf); | 903 | ret = trf7970a_switch_rf_on(trf); |
904 | break; | 904 | break; |
905 | case TRF7970A_ST_IDLE: | 905 | case TRF7970A_ST_IDLE: |
@@ -913,7 +913,7 @@ static int trf7970a_switch_rf(struct nfc_digital_dev *ddev, bool on) | |||
913 | } | 913 | } |
914 | } else { | 914 | } else { |
915 | switch (trf->state) { | 915 | switch (trf->state) { |
916 | case TRF7970A_ST_OFF: | 916 | case TRF7970A_ST_RF_OFF: |
917 | break; | 917 | break; |
918 | default: | 918 | default: |
919 | dev_err(trf->dev, "%s - Invalid request: %d %d\n", | 919 | 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 | 1045 | ||
1046 | mutex_lock(&trf->lock); | 1046 | mutex_lock(&trf->lock); |
1047 | 1047 | ||
1048 | if (trf->state == TRF7970A_ST_OFF) { | 1048 | if (trf->state == TRF7970A_ST_RF_OFF) { |
1049 | ret = trf7970a_switch_rf_on(trf); | 1049 | ret = trf7970a_switch_rf_on(trf); |
1050 | if (ret) | 1050 | if (ret) |
1051 | goto err_unlock; | 1051 | goto err_unlock; |
@@ -1348,7 +1348,7 @@ static int trf7970a_probe(struct spi_device *spi) | |||
1348 | if (!trf) | 1348 | if (!trf) |
1349 | return -ENOMEM; | 1349 | return -ENOMEM; |
1350 | 1350 | ||
1351 | trf->state = TRF7970A_ST_OFF; | 1351 | trf->state = TRF7970A_ST_RF_OFF; |
1352 | trf->dev = &spi->dev; | 1352 | trf->dev = &spi->dev; |
1353 | trf->spi = spi; | 1353 | trf->spi = spi; |
1354 | 1354 | ||
@@ -1507,7 +1507,7 @@ static int trf7970a_pm_runtime_suspend(struct device *dev) | |||
1507 | 1507 | ||
1508 | dev_dbg(dev, "Runtime suspend\n"); | 1508 | dev_dbg(dev, "Runtime suspend\n"); |
1509 | 1509 | ||
1510 | if (trf->state != TRF7970A_ST_OFF) { | 1510 | if (trf->state != TRF7970A_ST_RF_OFF) { |
1511 | dev_dbg(dev, "Can't suspend - not in OFF state (%d)\n", | 1511 | dev_dbg(dev, "Can't suspend - not in OFF state (%d)\n", |
1512 | trf->state); | 1512 | trf->state); |
1513 | return -EBUSY; | 1513 | return -EBUSY; |