2 * Copyright (C) 2012 Samsung Electronics
3 * Alim Akhtar <alim.akhtar@samsung.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 enum max77686_regnum
{
67 * struct max77686_para - max77686 register parameters
68 * @param vol_addr i2c address of the given buck/ldo register
69 * @param vol_bitpos bit position to be set or clear within register
70 * @param vol_bitmask bit mask value
71 * @param reg_enaddr control register address, which enable the given
73 * @param reg_enbitpos bit position to be enabled
74 * @param reg_enbiton value to be written to buck/ldo to make it ON
75 * @param reg_enbitoff value to be written to buck/ldo to make it OFF
76 * @param vol_min minimum voltage level supported by given buck/ldo
77 * @param vol_div voltage division value of given buck/ldo
79 struct max77686_para
{
80 enum max77686_regnum regnum
;
93 /* I2C device address for pmic max77686 */
94 #define MAX77686_I2C_ADDR (0x12 >> 1)
102 MAX77686_MV
= 0, /* mili volt */
103 MAX77686_UV
/* micro volt */
107 * This function enables the 32KHz coprocessor clock.
109 * Return 0 if ok, else -1
111 int max77686_enable_32khz_cp(void);
114 * Set the required voltage level of pmic
116 * @param reg register number of buck/ldo to be set
117 * @param volt voltage level to be set
118 * @param enable enable or disable bit
119 * @param volt_units MAX77686_MV or MAX77686_UV, unit of the
122 * @return Return 0 if ok, else -1
124 int max77686_volsetting(enum max77686_regnum reg
, unsigned int volt
,
125 int enable
, int volt_units
);
128 * Disable charging of the RTC backup battery
130 * @return Return 0 if ok, else -1
132 int max77686_disable_backup_batt(void);
134 #endif /* __MAX77686_PMIC_H_ */