Commit bd9d5232 authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz

nfc: st21nfca: set is_ese_present and is_uicc_present properly

When they're present, set is_ese_present and set is_uicc_present
to the value describe in their package description.

So far is_ese_present and is_uicc_present was set to true if their
property was present.
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 2a196975
...@@ -510,6 +510,7 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client) ...@@ -510,6 +510,7 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
const struct acpi_device_id *id; const struct acpi_device_id *id;
struct gpio_desc *gpiod_ena; struct gpio_desc *gpiod_ena;
struct device *dev; struct device *dev;
u8 tmp;
if (!client) if (!client)
return -EINVAL; return -EINVAL;
...@@ -533,10 +534,18 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client) ...@@ -533,10 +534,18 @@ static int st21nfca_hci_i2c_acpi_request_resources(struct i2c_client *client)
phy->irq_polarity = irq_get_trigger_type(client->irq); phy->irq_polarity = irq_get_trigger_type(client->irq);
phy->se_status.is_ese_present = phy->se_status.is_ese_present = false;
device_property_present(dev, "ese-present"); phy->se_status.is_uicc_present = false;
phy->se_status.is_uicc_present =
device_property_present(dev, "uicc-present"); if (device_property_present(dev, "ese-present")) {
device_property_read_u8(dev, "ese-present", &tmp);
phy->se_status.is_ese_present = tmp;
}
if (device_property_present(dev, "uicc-present")) {
device_property_read_u8(dev, "uicc-present", &tmp);
phy->se_status.is_uicc_present = tmp;
}
return 0; return 0;
} }
......
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