Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * TI LP8788 MFD - common definitions for current sinks
0004  *
0005  * Copyright 2012 Texas Instruments
0006  *
0007  * Author: Milo(Woogyom) Kim <milo.kim@ti.com>
0008  */
0009 
0010 #ifndef __ISINK_LP8788_H__
0011 #define __ISINK_LP8788_H__
0012 
0013 /* register address */
0014 #define LP8788_ISINK_CTRL       0x99
0015 #define LP8788_ISINK12_IOUT     0x9A
0016 #define LP8788_ISINK3_IOUT      0x9B
0017 #define LP8788_ISINK1_PWM       0x9C
0018 #define LP8788_ISINK2_PWM       0x9D
0019 #define LP8788_ISINK3_PWM       0x9E
0020 
0021 /* mask bits */
0022 #define LP8788_ISINK1_IOUT_M        0x0F    /* Addr 9Ah */
0023 #define LP8788_ISINK2_IOUT_M        0xF0
0024 #define LP8788_ISINK3_IOUT_M        0x0F    /* Addr 9Bh */
0025 
0026 /* 6 bits used for PWM code : Addr 9C ~ 9Eh */
0027 #define LP8788_ISINK_MAX_PWM        63
0028 #define LP8788_ISINK_SCALE_OFFSET   3
0029 
0030 static const u8 lp8788_iout_addr[] = {
0031     LP8788_ISINK12_IOUT,
0032     LP8788_ISINK12_IOUT,
0033     LP8788_ISINK3_IOUT,
0034 };
0035 
0036 static const u8 lp8788_iout_mask[] = {
0037     LP8788_ISINK1_IOUT_M,
0038     LP8788_ISINK2_IOUT_M,
0039     LP8788_ISINK3_IOUT_M,
0040 };
0041 
0042 static const u8 lp8788_pwm_addr[] = {
0043     LP8788_ISINK1_PWM,
0044     LP8788_ISINK2_PWM,
0045     LP8788_ISINK3_PWM,
0046 };
0047 
0048 #endif