diff options
author | Olof Johansson <olof@lixom.net> | 2012-10-07 10:22:32 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-10-07 10:22:32 -0400 |
commit | 0b33162ec5ce4316effd95374768b59dc6f63326 (patch) | |
tree | 67ba1e5bcb9e3ef3cdd7f48f406983387c5421af /arch/arm/mach-pxa/sharpsl_pm.c | |
parent | a4ee7770c4a0eefda655bf1e19ba0eb48da828a6 (diff) | |
parent | 45ef6ac6f5d4d4ea441a042fee3790b3f33cba73 (diff) |
Merge branch 'late/fixes' into fixes
This is a series from Arnd that fixes a number of compiler warnings
when building defconfigs on ARM.
* late/fixes:
ARM: footbridge: nw_gpio_lock is raw_spin_lock
ARM: mv78xx0: correct addr_map_cfg __initdata annotation
ARM: footbridge: remove RTC_IRQ definition
ARM: soc: dependency warnings for errata
ARM: ks8695: __arch_virt_to_dma type handling
ARM: rpc: check device_register return code in ecard_probe
ARM: davinci: don't mark da850_register_cpufreq as __init
ARM: iop13xx: fix iq81340sc_atux_map_irq prototype
ARM: iop13xx: mark iop13xx_scan_bus as __devinit
ARM: mv78xx0: mark mv78xx0_timer_init as __init_refok
ARM: s3c24xx: fix multiple section mismatch warnings
ARM: at91: unused variable in at91_pm_verify_clocks
ARM: at91: skip at91_io_desc definition for NOMMU
ARM: pxa: work around duplicate definition of GPIO24_SSP1_SFRM
ARM: pxa: remove sharpsl_fatal_check function
ARM: pxa: define palmte2_pxa_keys conditionally
ARM: pxa: Wunused-result warning in viper board file
ARM: shark: fix shark_pci_init return code
Fixed trivial conflicts in arch/arm/mach-at91/setup.c.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-pxa/sharpsl_pm.c')
-rw-r--r-- | arch/arm/mach-pxa/sharpsl_pm.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 5a406f794798..ec55c575ed19 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #ifdef CONFIG_PM | 55 | #ifdef CONFIG_PM |
56 | static int sharpsl_off_charge_battery(void); | 56 | static int sharpsl_off_charge_battery(void); |
57 | static int sharpsl_check_battery_voltage(void); | 57 | static int sharpsl_check_battery_voltage(void); |
58 | static int sharpsl_fatal_check(void); | ||
59 | #endif | 58 | #endif |
60 | static int sharpsl_check_battery_temp(void); | 59 | static int sharpsl_check_battery_temp(void); |
61 | static int sharpsl_ac_check(void); | 60 | static int sharpsl_ac_check(void); |
@@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state) | |||
686 | return 0; | 685 | return 0; |
687 | } | 686 | } |
688 | 687 | ||
689 | /* | ||
690 | * Check for fatal battery errors | ||
691 | * Fatal returns -1 | ||
692 | */ | ||
693 | static int sharpsl_fatal_check(void) | ||
694 | { | ||
695 | int buff[5], temp, i, acin; | ||
696 | |||
697 | dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n"); | ||
698 | |||
699 | /* Check AC-Adapter */ | ||
700 | acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); | ||
701 | |||
702 | if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { | ||
703 | sharpsl_pm.machinfo->charge(0); | ||
704 | udelay(100); | ||
705 | sharpsl_pm.machinfo->discharge(1); /* enable discharge */ | ||
706 | mdelay(SHARPSL_WAIT_DISCHARGE_ON); | ||
707 | } | ||
708 | |||
709 | if (sharpsl_pm.machinfo->discharge1) | ||
710 | sharpsl_pm.machinfo->discharge1(1); | ||
711 | |||
712 | /* Check battery : check inserting battery ? */ | ||
713 | for (i = 0; i < 5; i++) { | ||
714 | buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); | ||
715 | mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT); | ||
716 | } | ||
717 | |||
718 | if (sharpsl_pm.machinfo->discharge1) | ||
719 | sharpsl_pm.machinfo->discharge1(0); | ||
720 | |||
721 | if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { | ||
722 | udelay(100); | ||
723 | sharpsl_pm.machinfo->charge(1); | ||
724 | sharpsl_pm.machinfo->discharge(0); | ||
725 | } | ||
726 | |||
727 | temp = get_select_val(buff); | ||
728 | dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %ld\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT)); | ||
729 | |||
730 | if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) || | ||
731 | (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt))) | ||
732 | return -1; | ||
733 | return 0; | ||
734 | } | ||
735 | |||
736 | static int sharpsl_off_charge_error(void) | 688 | static int sharpsl_off_charge_error(void) |
737 | { | 689 | { |
738 | dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n"); | 690 | dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n"); |