diff options
author | Philip Rakity <prakity@marvell.com> | 2011-11-25 23:24:03 +0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-11-25 23:24:03 +0400 |
commit | 5ba1fa0ae288e93179d54e3c59b2241eb1709f0c (patch) | |
tree | 0b237478cda62fc1ddd741092c184ec1be815d78 /drivers/power/max8925_power.c | |
parent | 92de378b739115c8afaae5cd3f25159406bb9914 (diff) |
max8925_power: Do not detect ac insert if handled by other code
On brownstone rev 4 ac-insert detect is handled by vbus.
allow the platform code to configure the disabling of insert
by setting no_insert_detect.
Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/max8925_power.c')
-rw-r--r-- | drivers/power/max8925_power.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c index 83b827cf004b..be2d563cb315 100644 --- a/drivers/power/max8925_power.c +++ b/drivers/power/max8925_power.c @@ -79,6 +79,7 @@ struct max8925_power_info { unsigned topoff_threshold:2; unsigned fast_charge:3; unsigned no_temp_support:1; + unsigned no_insert_detect:1; int (*set_charger) (int); }; @@ -365,8 +366,10 @@ static __devinit int max8925_init_charger(struct max8925_chip *chip, int ret; REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_OVP, "ac-ovp"); - REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_F, "ac-remove"); - REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_R, "ac-insert"); + if (!info->no_insert_detect) { + REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_F, "ac-remove"); + REQUEST_IRQ(MAX8925_IRQ_VCHG_DC_R, "ac-insert"); + } REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_OVP, "usb-ovp"); REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_F, "usb-remove"); REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_R, "usb-insert"); @@ -481,6 +484,7 @@ static __devinit int max8925_power_probe(struct platform_device *pdev) info->fast_charge = pdata->fast_charge; info->set_charger = pdata->set_charger; info->no_temp_support = pdata->no_temp_support; + info->no_insert_detect = pdata->no_insert_detect; max8925_init_charger(chip, info); return 0; |