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 and DA9063L 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 */
40 /* LDOs on both DA9063 and DA9063L */
47 /* DA9063-only LDOs */
56 /* Regulators platform data */
57 struct da9063_regulator_data {
59 struct regulator_init_data *initdata;
62 struct da9063_regulators_pdata {
63 unsigned n_regulators;
64 struct da9063_regulator_data *regulator_data;
69 * RGB LED configuration
71 /* LED IDs for flags in struct led_info. */
79 #define DA9063_LED_ID_MASK 0x3
81 /* LED polarity for flags in struct led_info. */
82 #define DA9063_LED_HIGH_LEVEL_ACTIVE 0x0
83 #define DA9063_LED_LOW_LEVEL_ACTIVE 0x4
87 * General PMIC configuration
89 /* HWMON ADC channels configuration */
90 #define DA9063_FLG_FORCE_IN0_MANUAL_MODE 0x0010
91 #define DA9063_FLG_FORCE_IN0_AUTO_MODE 0x0020
92 #define DA9063_FLG_FORCE_IN1_MANUAL_MODE 0x0040
93 #define DA9063_FLG_FORCE_IN1_AUTO_MODE 0x0080
94 #define DA9063_FLG_FORCE_IN2_MANUAL_MODE 0x0100
95 #define DA9063_FLG_FORCE_IN2_AUTO_MODE 0x0200
96 #define DA9063_FLG_FORCE_IN3_MANUAL_MODE 0x0400
97 #define DA9063_FLG_FORCE_IN3_AUTO_MODE 0x0800
99 /* Disable register caching. */
100 #define DA9063_FLG_NO_CACHE 0x0008
104 /* DA9063 platform data */
105 struct da9063_pdata {
106 int (*init)(struct da9063 *da9063);
110 struct da9063_regulators_pdata *regulators_pdata;
111 struct led_platform_data *leds_pdata;
114 #endif /* __MFD_DA9063_PDATA_H__ */