1/*
2 * Copyright (c) 2004-2005 Richard Purdie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */
9
10#include <asm/hardware/sharpsl_pm.h>
11
12/*
13 * SharpSL SSP Driver
14 */
15struct corgissp_machinfo {
16	int port;
17	int cs_lcdcon;
18	int cs_ads7846;
19	int cs_max1111;
20	int clk_lcdcon;
21	int clk_ads7846;
22	int clk_max1111;
23};
24
25void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
26
27
28/*
29 * SharpSL Backlight
30 */
31void corgi_bl_set_intensity(int intensity);
32void spitz_bl_set_intensity(int intensity);
33void akita_bl_set_intensity(int intensity);
34
35
36/*
37 * SharpSL Touchscreen Driver
38 */
39unsigned long corgi_get_hsync_len(void);
40unsigned long spitz_get_hsync_len(void);
41void corgi_put_hsync(void);
42void spitz_put_hsync(void);
43void corgi_wait_hsync(void);
44void spitz_wait_hsync(void);
45
46
47/*
48 * SharpSL Battery/PM Driver
49 */
50
51#define READ_GPIO_BIT(x)    (GPLR(x) & GPIO_bit(x))
52
53/* MAX1111 Channel Definitions */
54#define MAX1111_BATT_VOLT   4u
55#define MAX1111_BATT_TEMP   2u
56#define MAX1111_ACIN_VOLT   6u
57
58extern struct battery_thresh spitz_battery_levels_acin[];
59extern struct battery_thresh spitz_battery_levels_noac[];
60void sharpsl_pm_pxa_init(void);
61void sharpsl_pm_pxa_remove(void);
62int sharpsl_pm_pxa_read_max1111(int channel);
63