linux/drivers/nfc/st-nci
Christophe Ricard de72dbc52c nfc: st-nci: spi: Change ST_NCI_GPIO_NAME_RESET to match DT
Since
commit 10cf4899f8 ("gpiolib: tighten up ACPI legacy gpio lookups")

If _DSD properties are available in an ACPI node, we are not
allowed to fallback to _CRS data to retrieve gpio properties.
This was causing us to fail if uicc-present and/or ese-present
are defined.

To be consistent with devicetree change ST_NCI_GPIO_NAME_RESET
content to reset so that acpi_find_gpio in drivers/gpio/gpiolib.c
will look for reset-gpios. In the mean time the ACPI table needs
to be fixed as follow (Tested on Minnowboard Max):

Device (NFC1)
{
    Name (_ADR, Zero)  // _ADR: Address
    Name (_HID, "SMO2101")  // _HID: Hardware ID
    Name (_CID, "SMO2101")  // _CID: Compatible ID
    Name (_DDN, "SMO NFC")  // _DDN: DOS Device Name
    Name (_UID, One)  // _UID: Unique ID
    Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
    {
        Name (SBUF, ResourceTemplate ()
        {
             SpiSerialBus (0, PolarityLow, FourWireMode, 8,
                           ControllerInitiated, 4000000, ClockPolarityLow,
                           ClockPhaseFirst, "\\_SB.SPI1",
                           0x00, ResourceConsumer, ,)
             GpioInt (Edge, ActiveHigh, ExclusiveAndWake, PullNone, 0x0000,
                      "\\_SB.GPO2", 0x00, ResourceConsumer, ,)
             {   // Pin list
                 0x0001
             }
             GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                     "\\_SB.GPO2", 0x00, ResourceConsumer, ,)
             {   // Pin list
                 0x0002,
             }
        })
        Name (_DSD, Package (0x02)
        {
             ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
             Package (0x03)
             {
                 Package (0x02) { "uicc-present", 1 },
                 Package (0x02) { "ese-present", 1 },
                 Package (0x02) { "reset-gpios", Package(0x04) { ^NFC1, 1, 0, 0} },
             }
        })
        Return (SBUF) /* \_SB_.SPI1.NFC1._CRS.SBUF */
    }
    Method (_STA, 0, NotSerialized)  // _STA: Status
    {
        Return (0x0F)
    }
}

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-05-04 01:27:24 +02:00
..
core.c NFC: st-nci: Add ese-present/uicc-present dts properties 2015-10-27 03:55:10 +01:00
i2c.c nfc: st-nci: i2c: Change ST_NCI_GPIO_NAME_RESET to match DT 2016-05-04 01:26:44 +02:00
Kconfig NFC: st-nci: Auto-select core module 2015-12-29 19:06:19 +01:00
Makefile NFC: st-nci: Replace st21nfcb by st_nci in makefile 2015-10-27 03:55:15 +01:00
ndlc.c nfc: st-nci: Remove useless #include "ndlc.h" 2015-12-29 19:06:13 +01:00
ndlc.h NFC: st-nci: Add ese-present/uicc-present dts properties 2015-10-27 03:55:10 +01:00
se.c nfc: st-nci: Add support for HCI event connectivity 2015-12-29 19:06:20 +01:00
spi.c nfc: st-nci: spi: Change ST_NCI_GPIO_NAME_RESET to match DT 2016-05-04 01:27:24 +02:00
st-nci.h NFC: st-nci: Add ese-present/uicc-present dts properties 2015-10-27 03:55:10 +01:00
vendor_cmds.c NFC: st-nci: Add support for proprietary commands 2015-10-27 03:55:01 +01:00