blob: c67c16ba8649a00b2ea7ca3007aa6d835530ffa6 [file] [log] [blame]
Krzysztof Kozlowskid7d8d7a2018-08-07 18:11:23 +02001/* SPDX-License-Identifier: GPL-2.0+ */
Chanwoo Choi83871c02012-05-14 22:50:39 +02002/*
3 * max77693.h - Driver for the Maxim 77693
4 *
5 * Copyright (C) 2012 Samsung Electrnoics
6 * SangYoung Son <hello.son@samsung.com>
7 *
8 * This program is not provided / owned by Maxim Integrated Products.
9 *
Chanwoo Choi83871c02012-05-14 22:50:39 +020010 * This driver is based on max8997.h
11 *
12 * MAX77693 has PMIC, Charger, Flash LED, Haptic, MUIC devices.
13 * The devices share the same I2C bus and included in
14 * this mfd driver.
15 */
16
17#ifndef __LINUX_MFD_MAX77693_H
18#define __LINUX_MFD_MAX77693_H
19
Krzysztof Kozlowskieb2d90c2015-03-26 11:35:59 +010020/* MAX77693 regulator IDs */
Jonghwa Lee80b022e2013-06-25 10:08:38 +090021enum max77693_regulators {
22 MAX77693_ESAFEOUT1 = 0,
23 MAX77693_ESAFEOUT2,
24 MAX77693_CHARGER,
25 MAX77693_REG_MAX,
26};
27
Chanwoo Choif8457d572012-10-08 14:41:49 +090028struct max77693_reg_data {
29 u8 addr;
30 u8 data;
31};
32
33struct max77693_muic_platform_data {
34 struct max77693_reg_data *init_data;
35 int num_init_data;
Chanwoo Choi297620f2012-12-26 13:10:11 +090036
37 int detcable_delay_ms;
Chanwoo Choi2b757992012-12-06 21:27:56 +090038
39 /*
40 * Default usb/uart path whether UART/USB or AUX_UART/AUX_USB
41 * h/w path of COMP2/COMN1 on CONTROL1 register.
42 */
43 int path_usb;
44 int path_uart;
Chanwoo Choif8457d572012-10-08 14:41:49 +090045};
46
Jacek Anaszewskia0bc60722014-08-22 11:06:18 +020047/* MAX77693 led flash */
48
49/* triggers */
50enum max77693_led_trigger {
51 MAX77693_LED_TRIG_OFF,
52 MAX77693_LED_TRIG_FLASH,
53 MAX77693_LED_TRIG_TORCH,
54 MAX77693_LED_TRIG_EXT,
55 MAX77693_LED_TRIG_SOFT,
56};
57
58/* trigger types */
59enum max77693_led_trigger_type {
60 MAX77693_LED_TRIG_TYPE_EDGE,
61 MAX77693_LED_TRIG_TYPE_LEVEL,
62};
63
64/* boost modes */
65enum max77693_led_boost_mode {
66 MAX77693_LED_BOOST_NONE,
67 MAX77693_LED_BOOST_ADAPTIVE,
68 MAX77693_LED_BOOST_FIXED,
69};
70
Jacek Anaszewskia0bc60722014-08-22 11:06:18 +020071/* MAX77693 */
72
Chanwoo Choi83871c02012-05-14 22:50:39 +020073struct max77693_platform_data {
Chanwoo Choif8457d572012-10-08 14:41:49 +090074 /* muic data */
75 struct max77693_muic_platform_data *muic_data;
Jacek Anaszewskia0bc60722014-08-22 11:06:18 +020076 struct max77693_led_platform_data *led_data;
Chanwoo Choi83871c02012-05-14 22:50:39 +020077};
78#endif /* __LINUX_MFD_MAX77693_H */