Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Platform configuration options for DA9063
4 *
5 * Copyright 2012 Dialog Semiconductor Ltd.
6 *
7 * Author: Michal Hajduk, Dialog Semiconductor
8 * Author: Krystian Garbaciak, Dialog Semiconductor
9 */
10
11#ifndef __MFD_DA9063_PDATA_H__
12#define __MFD_DA9063_PDATA_H__
13
14/*
15 * RGB LED configuration
16 */
17/* LED IDs for flags in struct led_info. */
18enum {
19 DA9063_GPIO11_LED,
20 DA9063_GPIO14_LED,
21 DA9063_GPIO15_LED,
22
23 DA9063_LED_NUM
24};
25#define DA9063_LED_ID_MASK 0x3
26
27/* LED polarity for flags in struct led_info. */
28#define DA9063_LED_HIGH_LEVEL_ACTIVE 0x0
29#define DA9063_LED_LOW_LEVEL_ACTIVE 0x4
30
31
32/*
33 * General PMIC configuration
34 */
35/* HWMON ADC channels configuration */
36#define DA9063_FLG_FORCE_IN0_MANUAL_MODE 0x0010
37#define DA9063_FLG_FORCE_IN0_AUTO_MODE 0x0020
38#define DA9063_FLG_FORCE_IN1_MANUAL_MODE 0x0040
39#define DA9063_FLG_FORCE_IN1_AUTO_MODE 0x0080
40#define DA9063_FLG_FORCE_IN2_MANUAL_MODE 0x0100
41#define DA9063_FLG_FORCE_IN2_AUTO_MODE 0x0200
42#define DA9063_FLG_FORCE_IN3_MANUAL_MODE 0x0400
43#define DA9063_FLG_FORCE_IN3_AUTO_MODE 0x0800
44
45/* Disable register caching. */
46#define DA9063_FLG_NO_CACHE 0x0008
47
48struct da9063;
49
50/* DA9063 platform data */
51struct da9063_pdata {
52 int (*init)(struct da9063 *da9063);
53 int irq_base;
54 bool key_power;
55 unsigned flags;
56 struct da9063_regulators_pdata *regulators_pdata;
57 struct led_platform_data *leds_pdata;
58};
59
60#endif /* __MFD_DA9063_PDATA_H__ */