diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-12-01 15:18:24 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-15 17:04:16 -0800 |
commit | 5ce373d219536927c2121ab397a4cf01ecf9fc28 (patch) | |
tree | 94a23555cc2e795d4093460f11610f6f94e0cd23 | |
parent | 0fc5f9bad189e49d473da8e9ddd08a9bd45eac4d (diff) |
mfd: max8907c: Natively register pm_power_off
Instead of forcing the board files to register this themselves, just add
a bool to the platform data to let the board files opt into this.
Change-Id: I4993275f31b0539c62249830d6a1180fb2719df8
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-on: http://git-master/r/83600
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
-rw-r--r-- | drivers/mfd/max8907c.c | 6 | ||||
-rw-r--r-- | include/linux/mfd/max8907c.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/max8907c.c b/drivers/mfd/max8907c.c index f87524ee860b..2c5774295164 100644 --- a/drivers/mfd/max8907c.c +++ b/drivers/mfd/max8907c.c @@ -152,12 +152,12 @@ int max8907c_set_bits(struct i2c_client *i2c, u8 reg, u8 mask, u8 val) EXPORT_SYMBOL_GPL(max8907c_set_bits); static struct i2c_client *max8907c_client = NULL; -int max8907c_power_off(void) +static void max8907c_power_off(void) { if (!max8907c_client) - return -EINVAL; + return; - return max8907c_set_bits(max8907c_client, MAX8907C_REG_RESET_CNFG, + max8907c_set_bits(max8907c_client, MAX8907C_REG_RESET_CNFG, MAX8907C_MASK_POWER_OFF, 0x40); } diff --git a/include/linux/mfd/max8907c.h b/include/linux/mfd/max8907c.h index 76dbdcc03046..48014b0485c5 100644 --- a/include/linux/mfd/max8907c.h +++ b/include/linux/mfd/max8907c.h @@ -240,6 +240,7 @@ struct max8907c_platform_data { struct platform_device **subdevs; int irq_base; int (*max8907c_setup)(void); + bool use_power_off; }; int max8907c_reg_read(struct i2c_client *i2c, u8 reg); @@ -252,7 +253,6 @@ int max8907c_irq_init(struct max8907c *chip, int irq, int irq_base); void max8907c_irq_free(struct max8907c *chip); int max8907c_suspend(struct i2c_client *i2c, pm_message_t state); int max8907c_resume(struct i2c_client *i2c); -int max8907c_power_off(void); void max8907c_deep_sleep(int enter); int max8907c_pwr_en_config(void); int max8907c_pwr_en_attach(void); |