blob: 92b79305050974f8c6ffe1875287fe4b8a573200 [file] [log] [blame]
Richard Purdie50a5de42005-09-13 01:25:30 -07001/*
Richard Purdieb7557de2006-01-05 20:44:55 +00002 * 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 *
Richard Purdie50a5de42005-09-13 01:25:30 -07008 */
9
Richard Purdieb7557de2006-01-05 20:44:55 +000010
11/*
12 * SharpSL SSP Driver
13 */
Richard Purdie50a5de42005-09-13 01:25:30 -070014struct corgissp_machinfo {
15 int port;
16 int cs_lcdcon;
17 int cs_ads7846;
18 int cs_max1111;
19 int clk_lcdcon;
20 int clk_ads7846;
21 int clk_max1111;
22};
23
24void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
Richard Purdie9fc78962005-09-13 01:25:32 -070025
Richard Purdieb7557de2006-01-05 20:44:55 +000026
Richard Purdie9fc78962005-09-13 01:25:32 -070027/*
Richard Purdie1351e6e2005-09-13 01:25:33 -070028 * SharpSL Backlight
29 */
Richard Purdie1351e6e2005-09-13 01:25:33 -070030void corgi_bl_set_intensity(int intensity);
31void spitz_bl_set_intensity(int intensity);
32void akita_bl_set_intensity(int intensity);
33
Richard Purdieb7557de2006-01-05 20:44:55 +000034
Richard Purdie1351e6e2005-09-13 01:25:33 -070035/*
Richard Purdie9fc78962005-09-13 01:25:32 -070036 * SharpSL Touchscreen Driver
37 */
Richard Purdie9fc78962005-09-13 01:25:32 -070038unsigned long corgi_get_hsync_len(void);
39unsigned long spitz_get_hsync_len(void);
40void corgi_put_hsync(void);
41void spitz_put_hsync(void);
42void corgi_wait_hsync(void);
43void spitz_wait_hsync(void);
Richard Purdie078abcf2005-11-10 17:42:29 +000044
Richard Purdieb7557de2006-01-05 20:44:55 +000045
Richard Purdie078abcf2005-11-10 17:42:29 +000046/*
47 * SharpSL Battery/PM Driver
48 */
49
Richard Purdie078abcf2005-11-10 17:42:29 +000050#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
51
Richard Purdieb7557de2006-01-05 20:44:55 +000052/* MAX1111 Channel Definitions */
53#define MAX1111_BATT_VOLT 4u
54#define MAX1111_BATT_TEMP 2u
55#define MAX1111_ACIN_VOLT 6u
Richard Purdie078abcf2005-11-10 17:42:29 +000056
Richard Purdieb7557de2006-01-05 20:44:55 +000057extern struct battery_thresh spitz_battery_levels_acin[];
58extern struct battery_thresh spitz_battery_levels_noac[];
59void sharpsl_pm_pxa_init(void);
60void sharpsl_pm_pxa_remove(void);
61int sharpsl_pm_pxa_read_max1111(int channel);
62
63