mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 20:20:53 +07:00
b7557de41a
Patch from Richard Purdie This patch moves a large chunk of the sharpsl_pm driver to arch/arm/common so that it can be reused on other devices such as the SL-5500 (collie). It also abstracts some functions from the core into the machine and platform specific parts of the driver to aid reuse. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
64 lines
1.3 KiB
C
64 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2004-2005 Richard Purdie
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
*/
|
|
|
|
|
|
/*
|
|
* SharpSL SSP Driver
|
|
*/
|
|
struct corgissp_machinfo {
|
|
int port;
|
|
int cs_lcdcon;
|
|
int cs_ads7846;
|
|
int cs_max1111;
|
|
int clk_lcdcon;
|
|
int clk_ads7846;
|
|
int clk_max1111;
|
|
};
|
|
|
|
void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
|
|
|
|
|
|
/*
|
|
* SharpSL Backlight
|
|
*/
|
|
void corgi_bl_set_intensity(int intensity);
|
|
void spitz_bl_set_intensity(int intensity);
|
|
void akita_bl_set_intensity(int intensity);
|
|
|
|
|
|
/*
|
|
* SharpSL Touchscreen Driver
|
|
*/
|
|
unsigned long corgi_get_hsync_len(void);
|
|
unsigned long spitz_get_hsync_len(void);
|
|
void corgi_put_hsync(void);
|
|
void spitz_put_hsync(void);
|
|
void corgi_wait_hsync(void);
|
|
void spitz_wait_hsync(void);
|
|
|
|
|
|
/*
|
|
* SharpSL Battery/PM Driver
|
|
*/
|
|
|
|
#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
|
|
|
|
/* MAX1111 Channel Definitions */
|
|
#define MAX1111_BATT_VOLT 4u
|
|
#define MAX1111_BATT_TEMP 2u
|
|
#define MAX1111_ACIN_VOLT 6u
|
|
|
|
extern struct battery_thresh spitz_battery_levels_acin[];
|
|
extern struct battery_thresh spitz_battery_levels_noac[];
|
|
void sharpsl_pm_pxa_init(void);
|
|
void sharpsl_pm_pxa_remove(void);
|
|
int sharpsl_pm_pxa_read_max1111(int channel);
|
|
|
|
|