blob: b70286d60dee2e5f3e81e3e2e229a9a1fe62a130 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/*
* max77828.h - Driver for the Maxim 77828
*
* Copyright (C) 2011 Samsung Electrnoics
* Seoyoung Jeong <seo0.jeong@samsung.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* This driver is based on max8997.h
*
* MAX77828 has Flash LED, SVC LED, Haptic, MUIC devices.
* The devices share the same I2C bus and included in
* this mfd driver.
*/
#ifndef __MAX77828_H__
#define __MAX77828_H__
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define MFD_DEV_NAME "max77828"
#define M2SH(m) ((m) & 0x0F ? ((m) & 0x03 ? ((m) & 0x01 ? 0 : 1) : ((m) & 0x04 ? 2 : 3)) : \
((m) & 0x30 ? ((m) & 0x10 ? 4 : 5) : ((m) & 0x40 ? 6 : 7)))
struct max77828_haptic_platform_data {
u16 max_timeout;
u16 duty;
u16 period;
u16 reg2;
char *regulator_name;
unsigned int pwm_id;
void (*init_hw) (void);
void (*motor_en) (bool);
};
struct max77828_platform_data {
/* IRQ */
int irq_base;
int irq_gpio;
bool wakeup;
/* haptic motor data */
struct max77828_haptic_platform_data *haptic_data;
struct mfd_cell *sub_devices;
int num_subdevs;
};
struct max77828
{
struct regmap *regmap;
};
#endif /* __MAX77828_H__ */
|