Lines Matching refs:machinfo
181 int i = sharpsl_pm.machinfo->bat_levels - 1; in get_percentage()
182 …int bl_status = sharpsl_pm.machinfo->backlight_get_status ? sharpsl_pm.machinfo->backlight_get_sta… in get_percentage()
186 …thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_acin_bl : sharpsl_pm.machinfo->bat_levels_aci… in get_percentage()
188 …thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_noac_bl : sharpsl_pm.machinfo->bat_levels_noa… in get_percentage()
201 high_thresh = sharpsl_pm.machinfo->status_high_acin; in get_apm_status()
202 low_thresh = sharpsl_pm.machinfo->status_low_acin; in get_apm_status()
204 high_thresh = sharpsl_pm.machinfo->status_high_noac; in get_apm_status()
205 low_thresh = sharpsl_pm.machinfo->status_low_noac; in get_apm_status()
224 if (!sharpsl_pm.machinfo) in sharpsl_battery_thread()
227 …sharpsl_pm.battstat.ac_status = (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN) ? APM_AC_O… in sharpsl_battery_thread()
230 if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON) in sharpsl_battery_thread()
235 voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); in sharpsl_battery_thread()
240 voltage = sharpsl_pm.machinfo->bat_levels_noac[0].voltage; in sharpsl_battery_thread()
300 sharpsl_pm.machinfo->charge(0); in sharpsl_charge_off()
310 sharpsl_pm.machinfo->charge(0); in sharpsl_charge_error()
318 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) { in sharpsl_charge_toggle()
327 sharpsl_pm.machinfo->charge(0); in sharpsl_charge_toggle()
329 sharpsl_pm.machinfo->charge(1); in sharpsl_charge_toggle()
336 int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); in sharpsl_ac_timer()
365 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) { in sharpsl_chrg_full_timer()
400 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) { in sharpsl_fatal_isr()
405 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL)) { in sharpsl_fatal_isr()
496 sharpsl_pm.machinfo->measure_temp(1); in sharpsl_check_battery_temp()
498 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_TEMP); in sharpsl_check_battery_temp()
499 sharpsl_pm.machinfo->measure_temp(0); in sharpsl_check_battery_temp()
505 if (val > sharpsl_pm.machinfo->charge_on_temp) { in sharpsl_check_battery_temp()
519 sharpsl_pm.machinfo->charge(0); in sharpsl_check_battery_voltage()
520 sharpsl_pm.machinfo->discharge(1); in sharpsl_check_battery_voltage()
523 if (sharpsl_pm.machinfo->discharge1) in sharpsl_check_battery_voltage()
524 sharpsl_pm.machinfo->discharge1(1); in sharpsl_check_battery_voltage()
528 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); in sharpsl_check_battery_voltage()
532 if (sharpsl_pm.machinfo->discharge1) in sharpsl_check_battery_voltage()
533 sharpsl_pm.machinfo->discharge1(0); in sharpsl_check_battery_voltage()
535 sharpsl_pm.machinfo->discharge(0); in sharpsl_check_battery_voltage()
540 if (val < sharpsl_pm.machinfo->charge_on_volt) in sharpsl_check_battery_voltage()
552 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_ACIN_VOLT); in sharpsl_ac_check()
559 …if ((temp > sharpsl_pm.machinfo->charge_acin_high) || (temp < sharpsl_pm.machinfo->charge_acin_low… in sharpsl_ac_check()
600 …if ((sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG) && (sharpsl_pm.machinfo->read_devdata(SHARPSL_STA… in corgi_goto_sleep()
607 sharpsl_pm.machinfo->presuspend(); in corgi_goto_sleep()
627 sharpsl_pm.machinfo->postsuspend(); in corgi_goto_sleep()
634 …if (!sharpsl_pm.machinfo->should_wakeup(!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE) && alarm_enable… in corgi_enter_suspend()
648 if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || in corgi_enter_suspend()
649 (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL))) { in corgi_enter_suspend()
670 if (sharpsl_pm.machinfo->earlyresume) in corgi_pxa_pm_enter()
671 sharpsl_pm.machinfo->earlyresume(); in corgi_pxa_pm_enter()
681 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_error()
707 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
709 sharpsl_pm.machinfo->charge(1); in sharpsl_off_charge_battery()
727 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
729 sharpsl_pm.machinfo->charge(1); in sharpsl_off_charge_battery()
737 if (sharpsl_pm.machinfo->charger_wakeup()) in sharpsl_off_charge_battery()
742 if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_CHRGFULL)) { in sharpsl_off_charge_battery()
745 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
747 sharpsl_pm.machinfo->charge(1); in sharpsl_off_charge_battery()
760 if (sharpsl_pm.machinfo->charger_wakeup()) in sharpsl_off_charge_battery()
771 if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_CHRGFULL)) { in sharpsl_off_charge_battery()
774 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
830 sharpsl_pm.machinfo = pdev->dev.platform_data; in sharpsl_pm_probe()
840 sharpsl_pm.machinfo->init(); in sharpsl_pm_probe()
842 gpio_request(sharpsl_pm.machinfo->gpio_acin, "AC IN"); in sharpsl_pm_probe()
843 gpio_direction_input(sharpsl_pm.machinfo->gpio_acin); in sharpsl_pm_probe()
844 gpio_request(sharpsl_pm.machinfo->gpio_batfull, "Battery Full"); in sharpsl_pm_probe()
845 gpio_direction_input(sharpsl_pm.machinfo->gpio_batfull); in sharpsl_pm_probe()
846 gpio_request(sharpsl_pm.machinfo->gpio_batlock, "Battery Lock"); in sharpsl_pm_probe()
847 gpio_direction_input(sharpsl_pm.machinfo->gpio_batlock); in sharpsl_pm_probe()
850 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_acin); in sharpsl_pm_probe()
855 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock); in sharpsl_pm_probe()
860 if (sharpsl_pm.machinfo->gpio_fatal) { in sharpsl_pm_probe()
861 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal); in sharpsl_pm_probe()
867 if (sharpsl_pm.machinfo->batfull_irq) { in sharpsl_pm_probe()
869 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull); in sharpsl_pm_probe()
900 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr); in sharpsl_pm_remove()
901 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr); in sharpsl_pm_remove()
903 if (sharpsl_pm.machinfo->gpio_fatal) in sharpsl_pm_remove()
904 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr); in sharpsl_pm_remove()
906 if (sharpsl_pm.machinfo->batfull_irq) in sharpsl_pm_remove()
907 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr); in sharpsl_pm_remove()
909 gpio_free(sharpsl_pm.machinfo->gpio_batlock); in sharpsl_pm_remove()
910 gpio_free(sharpsl_pm.machinfo->gpio_batfull); in sharpsl_pm_remove()
911 gpio_free(sharpsl_pm.machinfo->gpio_acin); in sharpsl_pm_remove()
913 if (sharpsl_pm.machinfo->exit) in sharpsl_pm_remove()
914 sharpsl_pm.machinfo->exit(); in sharpsl_pm_remove()