Linux Kernel
3.7.1
|
#include <stdarg.h>
#include <linux/mutex.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/cuda.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/pm.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/freezer.h>
#include <linux/syscalls.h>
#include <linux/suspend.h>
#include <linux/cpu.h>
#include <linux/compat.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/sections.h>
#include <asm/irq.h>
#include <asm/pmac_feature.h>
#include <asm/pmac_pfunc.h>
#include <asm/pmac_low_i2c.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/cputable.h>
#include <asm/time.h>
#include <asm/backlight.h>
#include "via-pmu-event.h"
Go to the source code of this file.
Data Structures | |
struct | pmu_private |
struct | pmu_private::rb_entry |
Macros | |
#define | PMU_MINOR 154 |
#define | BATTERY_POLLING_COUNT 2 |
#define | RS 0x200 /* skip between registers */ |
#define | B 0 /* B-side data */ |
#define | A RS /* A-side data */ |
#define | DIRB (2*RS) /* B-side direction (1=output) */ |
#define | DIRA (3*RS) /* A-side direction (1=output) */ |
#define | T1CL (4*RS) /* Timer 1 ctr/latch (low 8 bits) */ |
#define | T1CH (5*RS) /* Timer 1 counter (high 8 bits) */ |
#define | T1LL (6*RS) /* Timer 1 latch (low 8 bits) */ |
#define | T1LH (7*RS) /* Timer 1 latch (high 8 bits) */ |
#define | T2CL (8*RS) /* Timer 2 ctr/latch (low 8 bits) */ |
#define | T2CH (9*RS) /* Timer 2 counter (high 8 bits) */ |
#define | SR (10*RS) /* Shift register */ |
#define | ACR (11*RS) /* Auxiliary control register */ |
#define | PCR (12*RS) /* Peripheral control register */ |
#define | IFR (13*RS) /* Interrupt flag register */ |
#define | IER (14*RS) /* Interrupt enable register */ |
#define | ANH (15*RS) /* A-side data, no handshake */ |
#define | TACK 0x08 /* Transfer acknowledge (input) */ |
#define | TREQ 0x10 /* Transfer request (output) */ |
#define | SR_CTRL 0x1c /* Shift register control bits */ |
#define | SR_EXT 0x0c /* Shift on external clock */ |
#define | SR_OUT 0x10 /* Shift out if 1 */ |
#define | IER_SET 0x80 /* set bits in IER */ |
#define | IER_CLR 0 /* clear bits in IER */ |
#define | SR_INT 0x04 /* Shift register full/empty */ |
#define | CB2_INT 0x08 |
#define | CB1_INT 0x10 /* transition on CB1 input */ |
#define | RB_SIZE 0x10 |
Enumerations | |
enum | pmu_state { idle, sending, intack, reading, reading_intr, locked, idle, sending, intack, reading, reading_intr } |
enum | int_data_state { int_data_empty, int_data_fill, int_data_ready, int_data_flush } |
Functions | |
void | low_sleep_handler (void) |
void | enable_kernel_altivec (void) |
void | enable_kernel_fp (void) |
int __init | find_via_pmu (void) |
arch_initcall (via_pmu_start) | |
device_initcall (via_pmu_dev_init) | |
int | pmu_get_model (void) |
int | pmu_request (struct adb_request *req, void(*done)(struct adb_request *), int nbytes,...) |
int | pmu_queue_request (struct adb_request *req) |
void | pmu_poll (void) |
void | pmu_poll_adb (void) |
void | pmu_wait_complete (struct adb_request *req) |
void | pmu_suspend (void) |
void | pmu_resume (void) |
void | pmu_unlock (void) |
void | pmu_enable_irled (int on) |
void | pmu_restart (void) |
void | pmu_shutdown (void) |
int | pmu_present (void) |
device_initcall (pmu_device_init) | |
EXPORT_SYMBOL (pmu_request) | |
EXPORT_SYMBOL (pmu_queue_request) | |
EXPORT_SYMBOL (pmu_poll) | |
EXPORT_SYMBOL (pmu_poll_adb) | |
EXPORT_SYMBOL (pmu_wait_complete) | |
EXPORT_SYMBOL (pmu_suspend) | |
EXPORT_SYMBOL (pmu_resume) | |
EXPORT_SYMBOL (pmu_unlock) | |
Variables | |
int | pmu_battery_count |
int | pmu_cur_battery |
unsigned int | pmu_power_flags = PMU_PWR_AC_PRESENT |
struct pmu_battery_info | pmu_batteries [PMU_MAX_BATTERIES] |
int | __fake_sleep |
int | asleep |
enum int_data_state |
enum pmu_state |
arch_initcall | ( | via_pmu_start | ) |
device_initcall | ( | via_pmu_dev_init | ) |
device_initcall | ( | pmu_device_init | ) |
EXPORT_SYMBOL | ( | pmu_request | ) |
EXPORT_SYMBOL | ( | pmu_queue_request | ) |
EXPORT_SYMBOL | ( | pmu_poll | ) |
EXPORT_SYMBOL | ( | pmu_poll_adb | ) |
EXPORT_SYMBOL | ( | pmu_wait_complete | ) |
EXPORT_SYMBOL | ( | pmu_suspend | ) |
EXPORT_SYMBOL | ( | pmu_resume | ) |
EXPORT_SYMBOL | ( | pmu_unlock | ) |
int pmu_queue_request | ( | struct adb_request * | req | ) |
int pmu_request | ( | struct adb_request * | req, |
void(*)(struct adb_request *) | done, | ||
int | nbytes, | ||
... | |||
) |
void pmu_wait_complete | ( | struct adb_request * | req | ) |
struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES] |
unsigned int pmu_power_flags = PMU_PWR_AC_PRESENT |