Lines Matching refs:machinfo

185 	int i = sharpsl_pm.machinfo->bat_levels - 1;  in get_percentage()
186 …int bl_status = sharpsl_pm.machinfo->backlight_get_status ? sharpsl_pm.machinfo->backlight_get_sta… in get_percentage()
190 …thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_acin_bl : sharpsl_pm.machinfo->bat_levels_aci… in get_percentage()
192 …thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_noac_bl : sharpsl_pm.machinfo->bat_levels_noa… in get_percentage()
205 high_thresh = sharpsl_pm.machinfo->status_high_acin; in get_apm_status()
206 low_thresh = sharpsl_pm.machinfo->status_low_acin; in get_apm_status()
208 high_thresh = sharpsl_pm.machinfo->status_high_noac; in get_apm_status()
209 low_thresh = sharpsl_pm.machinfo->status_low_noac; in get_apm_status()
230 if (!sharpsl_pm.machinfo) in sharpsl_battery_thread()
233 …sharpsl_pm.battstat.ac_status = (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN) ? APM_AC_O… in sharpsl_battery_thread()
236 if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON) in sharpsl_battery_thread()
241 voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); in sharpsl_battery_thread()
246 voltage = sharpsl_pm.machinfo->bat_levels_noac[0].voltage; in sharpsl_battery_thread()
306 sharpsl_pm.machinfo->charge(0); in sharpsl_charge_off()
316 sharpsl_pm.machinfo->charge(0); in sharpsl_charge_error()
324 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) { in sharpsl_charge_toggle()
333 sharpsl_pm.machinfo->charge(0); in sharpsl_charge_toggle()
335 sharpsl_pm.machinfo->charge(1); in sharpsl_charge_toggle()
342 int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); in sharpsl_ac_timer()
371 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) { in sharpsl_chrg_full_timer()
406 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) { in sharpsl_fatal_isr()
411 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL)) { in sharpsl_fatal_isr()
502 sharpsl_pm.machinfo->measure_temp(1); in sharpsl_check_battery_temp()
504 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_TEMP); in sharpsl_check_battery_temp()
505 sharpsl_pm.machinfo->measure_temp(0); in sharpsl_check_battery_temp()
511 if (val > sharpsl_pm.machinfo->charge_on_temp) { in sharpsl_check_battery_temp()
525 sharpsl_pm.machinfo->charge(0); in sharpsl_check_battery_voltage()
526 sharpsl_pm.machinfo->discharge(1); in sharpsl_check_battery_voltage()
529 if (sharpsl_pm.machinfo->discharge1) in sharpsl_check_battery_voltage()
530 sharpsl_pm.machinfo->discharge1(1); in sharpsl_check_battery_voltage()
534 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); in sharpsl_check_battery_voltage()
538 if (sharpsl_pm.machinfo->discharge1) in sharpsl_check_battery_voltage()
539 sharpsl_pm.machinfo->discharge1(0); in sharpsl_check_battery_voltage()
541 sharpsl_pm.machinfo->discharge(0); in sharpsl_check_battery_voltage()
546 if (val < sharpsl_pm.machinfo->charge_on_volt) in sharpsl_check_battery_voltage()
558 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_ACIN_VOLT); in sharpsl_ac_check()
565 …if ((temp > sharpsl_pm.machinfo->charge_acin_high) || (temp < sharpsl_pm.machinfo->charge_acin_low… in sharpsl_ac_check()
606 …if ((sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG) && (sharpsl_pm.machinfo->read_devdata(SHARPSL_STA… in corgi_goto_sleep()
613 sharpsl_pm.machinfo->presuspend(); in corgi_goto_sleep()
633 sharpsl_pm.machinfo->postsuspend(); in corgi_goto_sleep()
640 …if (!sharpsl_pm.machinfo->should_wakeup(!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE) && alarm_enable… in corgi_enter_suspend()
654 if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || in corgi_enter_suspend()
655 (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL))) { in corgi_enter_suspend()
676 if (sharpsl_pm.machinfo->earlyresume) in corgi_pxa_pm_enter()
677 sharpsl_pm.machinfo->earlyresume(); in corgi_pxa_pm_enter()
687 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_error()
713 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
715 sharpsl_pm.machinfo->charge(1); in sharpsl_off_charge_battery()
733 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
735 sharpsl_pm.machinfo->charge(1); in sharpsl_off_charge_battery()
743 if (sharpsl_pm.machinfo->charger_wakeup()) in sharpsl_off_charge_battery()
748 if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_CHRGFULL)) { in sharpsl_off_charge_battery()
751 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
753 sharpsl_pm.machinfo->charge(1); in sharpsl_off_charge_battery()
766 if (sharpsl_pm.machinfo->charger_wakeup()) in sharpsl_off_charge_battery()
777 if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_CHRGFULL)) { in sharpsl_off_charge_battery()
780 sharpsl_pm.machinfo->charge(0); in sharpsl_off_charge_battery()
836 sharpsl_pm.machinfo = pdev->dev.platform_data; in sharpsl_pm_probe()
846 sharpsl_pm.machinfo->init(); in sharpsl_pm_probe()
848 gpio_request(sharpsl_pm.machinfo->gpio_acin, "AC IN"); in sharpsl_pm_probe()
849 gpio_direction_input(sharpsl_pm.machinfo->gpio_acin); in sharpsl_pm_probe()
850 gpio_request(sharpsl_pm.machinfo->gpio_batfull, "Battery Full"); in sharpsl_pm_probe()
851 gpio_direction_input(sharpsl_pm.machinfo->gpio_batfull); in sharpsl_pm_probe()
852 gpio_request(sharpsl_pm.machinfo->gpio_batlock, "Battery Lock"); in sharpsl_pm_probe()
853 gpio_direction_input(sharpsl_pm.machinfo->gpio_batlock); in sharpsl_pm_probe()
856 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_acin); in sharpsl_pm_probe()
861 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock); in sharpsl_pm_probe()
866 if (sharpsl_pm.machinfo->gpio_fatal) { in sharpsl_pm_probe()
867 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal); in sharpsl_pm_probe()
873 if (sharpsl_pm.machinfo->batfull_irq) { in sharpsl_pm_probe()
875 irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull); in sharpsl_pm_probe()
906 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr); in sharpsl_pm_remove()
907 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr); in sharpsl_pm_remove()
909 if (sharpsl_pm.machinfo->gpio_fatal) in sharpsl_pm_remove()
910 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr); in sharpsl_pm_remove()
912 if (sharpsl_pm.machinfo->batfull_irq) in sharpsl_pm_remove()
913 free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr); in sharpsl_pm_remove()
915 gpio_free(sharpsl_pm.machinfo->gpio_batlock); in sharpsl_pm_remove()
916 gpio_free(sharpsl_pm.machinfo->gpio_batfull); in sharpsl_pm_remove()
917 gpio_free(sharpsl_pm.machinfo->gpio_acin); in sharpsl_pm_remove()
919 if (sharpsl_pm.machinfo->exit) in sharpsl_pm_remove()
920 sharpsl_pm.machinfo->exit(); in sharpsl_pm_remove()