summaryrefslogtreecommitdiff
path: root/screen.h
blob: f5a15d4accbc430a930f694251fb3ca5167330d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef SCREEN_H
#define SCREEN_H

#include <curses.h>

enum colors {
	BLACK   = COLOR_BLACK,
	RED     = COLOR_RED,
	GREEN   = COLOR_GREEN,
	YELLOW  = COLOR_YELLOW,
	BLUE    = COLOR_BLUE,
	MAGENTA = COLOR_MAGENTA,
	CYAN    = COLOR_CYAN,
	WHITE   = COLOR_WHITE,
};

#define COLOR_MASK(fg, bg) ((fg) + (bg) * (COLOR_WHITE + 1))
#define COLOR(fg, bg) COLOR_PAIR(COLOR_MASK((fg), (bg)))
#define INIT_COLOR(fg, bg) init_pair(COLOR_MASK((fg), (bg)), (fg), (bg))
#define COLOR_ON(fg, bg) attron(COLOR(fg, bg))
#define COLOR_OFF(fg, bg) attroff(COLOR(fg, bg))

extern WINDOW *screen_init(bool israw);
extern void screen_end(void);

#endif /* SCREEN_H */
t;contact@paulk.fr>2016-02-05 19:42:18 +0100 committerMark Brown <broonie@kernel.org>2016-02-05 18:57:08 +0000 commit690f44badf2f44b8ec09098118b74f789f95e2c8 (patch) tree624763eb5b055bb2fdc90cda6d144b3ccc5614d1 /Documentation parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
regulator: lp872x: Remove warning about invalid DVS GPIO
Some devices don't hook the DVS pin to a GPIO but to ground or VCC. In those cases, it is not a problem to have no DVS GPIO provided, as the current code will already switch to software-only DVS selection: When the DVS GPIO is invalid, lp872x_init_dvs jumps to the set_default_dvs_mode label, which instructs the chip not to use the DVS pin at all and do it all in software instead (by clearing the LP8720_EXT_DVS_M bit in the LP872X_GENERAL_CFG register). That is reflected later in the code, when setting the bucks (the DVS pin only applies to the bucks) by checking for the LP8720_EXT_DVS_M bit on the LP872X_GENERAL_CFG register (in lp872x_select_buck_vout_addr) to decide whether to use software or hardware DVS selection. Thus, there is no need to print a warning when the DVS GPIO is invalid. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation')