summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-03-18 19:05:08 -0700
committerStefan Agner <stefan.agner@toradex.com>2016-03-18 19:56:48 -0700
commitb5e0328c10eafd9c74ddc7b73fbebf13a6405b34 (patch)
tree810be1870fdbff6db5f0cd9a45fa493d7706ff23
parent9092c091a99b0f466a5f443fb9f28f8a4f073bde (diff)
rn5t567: do not register poweroff
The Colibri iMX7 uses the SNVS_PMIC_ON_REQ signal (connected to the PMIC's PMIC_ON_EXTIN GPIO) to power off the module. The SNVS RTC driver provides a poweroff callback which causes that signal to go low. However, the current PMIC driver registers a poweroff callback earlier and therefor the kernel uses the PMIC poweroff instead of the SNVS RTC poweroff callback. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--drivers/mfd/rn5t567.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/rn5t567.c b/drivers/mfd/rn5t567.c
index 49e829cb28ed..f0a47ab52239 100644
--- a/drivers/mfd/rn5t567.c
+++ b/drivers/mfd/rn5t567.c
@@ -66,6 +66,7 @@ static void rn5t618_power_off(void)
static int rn5t618_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
+ struct device_node *np = i2c->dev.of_node;
struct rn5t618 *priv;
int ret;
@@ -89,7 +90,7 @@ static int rn5t618_i2c_probe(struct i2c_client *i2c,
return ret;
}
- if (!pm_power_off) {
+ if (!pm_power_off && of_device_is_compatible(np, "ricoh,rn5t618")) {
rn5t618_pm_power_off = priv;
pm_power_off = rn5t618_power_off;
}