~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-pxa/sharpsl_pm.h

Version: ~ [ linux-5.1-rc6 ] ~ [ linux-5.0.9 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.36 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.113 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.170 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.178 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.138 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.65 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

** Warning: Cannot open xref database.

1 /* 2 * SharpSL Battery/PM Driver 3 * 4 * Copyright (c) 2004-2005 Richard Purdie 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 * 10 */ 11 #ifndef _MACH_SHARPSL_PM 12 #define _MACH_SHARPSL_PM 13 14 struct sharpsl_charger_machinfo { 15 void (*init)(void); 16 void (*exit)(void); 17 int gpio_acin; 18 int gpio_batfull; 19 int batfull_irq; 20 int gpio_batlock; 21 int gpio_fatal; 22 void (*discharge)(int); 23 void (*discharge1)(int); 24 void (*charge)(int); 25 void (*measure_temp)(int); 26 void (*presuspend)(void); 27 void (*postsuspend)(void); 28 void (*earlyresume)(void); 29 unsigned long (*read_devdata)(int); 30 #define SHARPSL_BATT_VOLT 1 31 #define SHARPSL_BATT_TEMP 2 32 #define SHARPSL_ACIN_VOLT 3 33 #define SHARPSL_STATUS_ACIN 4 34 #define SHARPSL_STATUS_LOCK 5 35 #define SHARPSL_STATUS_CHRGFULL 6 36 #define SHARPSL_STATUS_FATAL 7 37 bool (*charger_wakeup)(void); 38 int (*should_wakeup)(unsigned int resume_on_alarm); 39 void (*backlight_limit)(int); 40 int (*backlight_get_status) (void); 41 int charge_on_volt; 42 int charge_on_temp; 43 int charge_acin_high; 44 int charge_acin_low; 45 int fatal_acin_volt; 46 int fatal_noacin_volt; 47 int bat_levels; 48 struct battery_thresh *bat_levels_noac; 49 struct battery_thresh *bat_levels_acin; 50 struct battery_thresh *bat_levels_noac_bl; 51 struct battery_thresh *bat_levels_acin_bl; 52 int status_high_acin; 53 int status_low_acin; 54 int status_high_noac; 55 int status_low_noac; 56 }; 57 58 struct battery_thresh { 59 int voltage; 60 int percentage; 61 }; 62 63 struct battery_stat { 64 int ac_status; /* APM AC Present/Not Present */ 65 int mainbat_status; /* APM Main Battery Status */ 66 int mainbat_percent; /* Main Battery Percentage Charge */ 67 int mainbat_voltage; /* Main Battery Voltage */ 68 }; 69 70 struct sharpsl_pm_status { 71 struct device *dev; 72 struct timer_list ac_timer; 73 struct timer_list chrg_full_timer; 74 75 int charge_mode; 76 #define CHRG_ERROR (-1) 77 #define CHRG_OFF (0) 78 #define CHRG_ON (1) 79 #define CHRG_DONE (2) 80 81 unsigned int flags; 82 #define SHARPSL_SUSPENDED (1 << 0) /* Device is Suspended */ 83 #define SHARPSL_ALARM_ACTIVE (1 << 1) /* Alarm is for charging event (not user) */ 84 #define SHARPSL_BL_LIMIT (1 << 2) /* Backlight Intensity Limited */ 85 #define SHARPSL_APM_QUEUED (1 << 3) /* APM Event Queued */ 86 #define SHARPSL_DO_OFFLINE_CHRG (1 << 4) /* Trigger the offline charger */ 87 88 int full_count; 89 unsigned long charge_start_time; 90 struct sharpsl_charger_machinfo *machinfo; 91 struct battery_stat battstat; 92 }; 93 94 extern struct sharpsl_pm_status sharpsl_pm; 95 96 extern struct battery_thresh sharpsl_battery_levels_acin[]; 97 extern struct battery_thresh sharpsl_battery_levels_noac[]; 98 99 #define SHARPSL_LED_ERROR 2 100 #define SHARPSL_LED_ON 1 101 #define SHARPSL_LED_OFF 0 102 103 void sharpsl_battery_kick(void); 104 void sharpsl_pm_led(int val); 105 106 /* MAX1111 Channel Definitions */ 107 #define MAX1111_BATT_VOLT 4u 108 #define MAX1111_BATT_TEMP 2u 109 #define MAX1111_ACIN_VOLT 6u 110 int sharpsl_pm_pxa_read_max1111(int channel); 111 112 void corgi_lcd_limit_intensity(int limit); 113 #endif 114

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp