From b5e0328c10eafd9c74ddc7b73fbebf13a6405b34 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 18 Mar 2016 19:05:08 -0700 Subject: 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 --- drivers/mfd/rn5t567.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3