2 * Platform configuration options for DA9063
4 * Copyright 2012 Dialog Semiconductor Ltd.
6 * Author: Michal Hajduk, Dialog Semiconductor
7 * Author: Krystian Garbaciak, Dialog Semiconductor
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
16 #ifndef __MFD_DA9063_PDATA_H__
17 #define __MFD_DA9063_PDATA_H__
19 #include <linux/regulator/machine.h>
22 * Regulator configuration
24 /* DA9063 regulator IDs */
34 /* BCORE1 and BCORE2 in merged mode */
35 DA9063_ID_BCORES_MERGED
,
36 /* BMEM and BIO in merged mode */
37 DA9063_ID_BMEM_BIO_MERGED
,
38 /* When two BUCKs are merged, they cannot be reused separately */
54 /* Regulators platform data */
55 struct da9063_regulator_data
{
57 struct regulator_init_data
*initdata
;
60 struct da9063_regulators_pdata
{
61 unsigned n_regulators
;
62 struct da9063_regulator_data
*regulator_data
;
67 * RGB LED configuration
69 /* LED IDs for flags in struct led_info. */
77 #define DA9063_LED_ID_MASK 0x3
79 /* LED polarity for flags in struct led_info. */
80 #define DA9063_LED_HIGH_LEVEL_ACTIVE 0x0
81 #define DA9063_LED_LOW_LEVEL_ACTIVE 0x4
85 * General PMIC configuration
87 /* HWMON ADC channels configuration */
88 #define DA9063_FLG_FORCE_IN0_MANUAL_MODE 0x0010
89 #define DA9063_FLG_FORCE_IN0_AUTO_MODE 0x0020
90 #define DA9063_FLG_FORCE_IN1_MANUAL_MODE 0x0040
91 #define DA9063_FLG_FORCE_IN1_AUTO_MODE 0x0080
92 #define DA9063_FLG_FORCE_IN2_MANUAL_MODE 0x0100
93 #define DA9063_FLG_FORCE_IN2_AUTO_MODE 0x0200
94 #define DA9063_FLG_FORCE_IN3_MANUAL_MODE 0x0400
95 #define DA9063_FLG_FORCE_IN3_AUTO_MODE 0x0800
97 /* Disable register caching. */
98 #define DA9063_FLG_NO_CACHE 0x0008
102 /* DA9063 platform data */
103 struct da9063_pdata
{
104 int (*init
)(struct da9063
*da9063
);
108 struct da9063_regulators_pdata
*regulators_pdata
;
109 struct led_platform_data
*leds_pdata
;
112 #endif /* __MFD_DA9063_PDATA_H__ */