unify {de,}mangle_poll(), get rid of kernel-side POLL...
[cris-mirror.git] / include / linux / mfd / lp8788-isink.h
blobf38262d21ff10de7f1e84b99fa96376085e33a64
1 /*
2 * TI LP8788 MFD - common definitions for current sinks
4 * Copyright 2012 Texas Instruments
6 * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #ifndef __ISINK_LP8788_H__
15 #define __ISINK_LP8788_H__
17 /* register address */
18 #define LP8788_ISINK_CTRL 0x99
19 #define LP8788_ISINK12_IOUT 0x9A
20 #define LP8788_ISINK3_IOUT 0x9B
21 #define LP8788_ISINK1_PWM 0x9C
22 #define LP8788_ISINK2_PWM 0x9D
23 #define LP8788_ISINK3_PWM 0x9E
25 /* mask bits */
26 #define LP8788_ISINK1_IOUT_M 0x0F /* Addr 9Ah */
27 #define LP8788_ISINK2_IOUT_M 0xF0
28 #define LP8788_ISINK3_IOUT_M 0x0F /* Addr 9Bh */
30 /* 6 bits used for PWM code : Addr 9C ~ 9Eh */
31 #define LP8788_ISINK_MAX_PWM 63
32 #define LP8788_ISINK_SCALE_OFFSET 3
34 static const u8 lp8788_iout_addr[] = {
35 LP8788_ISINK12_IOUT,
36 LP8788_ISINK12_IOUT,
37 LP8788_ISINK3_IOUT,
40 static const u8 lp8788_iout_mask[] = {
41 LP8788_ISINK1_IOUT_M,
42 LP8788_ISINK2_IOUT_M,
43 LP8788_ISINK3_IOUT_M,
46 static const u8 lp8788_pwm_addr[] = {
47 LP8788_ISINK1_PWM,
48 LP8788_ISINK2_PWM,
49 LP8788_ISINK3_PWM,
52 #endif