Skip to content

Commit

Permalink
NFC: trf7970a: Remove support for 'vin-voltage-override' DT property
Browse files Browse the repository at this point in the history
The 'vin-voltage-override' DT property is used by the trf7970a
driver to override the voltage presented to the driver by the
regulator subsystem.  This is unnecessary as properly specifying
the regulator chain via DT properties will accomplish the same
thing.  Therefore, remove support for 'vin-voltage-override'.

Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Mark Greer authored and Samuel Ortiz committed Jun 18, 2017
1 parent fcc652f commit a34631c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 0 additions & 2 deletions Documentation/devicetree/bindings/net/nfc/trf7970a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.
- autosuspend-delay: Specify autosuspend delay in milliseconds.
- vin-voltage-override: Specify voltage of VIN pin in microvolts.
- irq-status-read-quirk: Specify that the trf7970a being used has the
"IRQ Status Read" erratum.
- en2-rf-quirk: Specify that the trf7970a being used has the "EN2 RF"
Expand All @@ -40,7 +39,6 @@ Example (for ARM-based BeagleBone with TRF7970A on SPI1):
ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>,
<&gpio2 5 GPIO_ACTIVE_LOW>;
vin-supply = <&ldo3_reg>;
vin-voltage-override = <5000000>;
vdd-io-supply = <&ldo2_reg>;
autosuspend-delay = <30000>;
irq-status-read-quirk;
Expand Down
11 changes: 1 addition & 10 deletions drivers/nfc/trf7970a.c
Original file line number Diff line number Diff line change
Expand Up @@ -2005,12 +2005,6 @@ static int trf7970a_get_autosuspend_delay(struct device_node *np)
return autosuspend_delay;
}

static int trf7970a_get_vin_voltage_override(struct device_node *np,
u32 *vin_uvolts)
{
return of_property_read_u32(np, "vin-voltage-override", vin_uvolts);
}

static int trf7970a_probe(struct spi_device *spi)
{
struct device_node *np = spi->dev.of_node;
Expand Down Expand Up @@ -2108,10 +2102,7 @@ static int trf7970a_probe(struct spi_device *spi)
goto err_destroy_lock;
}

ret = trf7970a_get_vin_voltage_override(np, &uvolts);
if (ret)
uvolts = regulator_get_voltage(trf->regulator);

uvolts = regulator_get_voltage(trf->regulator);
if (uvolts > 4000000)
trf->chip_status_ctrl = TRF7970A_CHIP_STATUS_VRS5_3;

Expand Down

0 comments on commit a34631c

Please sign in to comment.