Lines Matching full:pmic

46 struct pmic;
48 int (*fg_battery_check) (struct pmic *p, struct pmic *bat);
49 int (*fg_battery_update) (struct pmic *p, struct pmic *bat);
53 int (*chrg_type) (struct pmic *p);
54 int (*chrg_bat_present) (struct pmic *p);
55 int (*chrg_state) (struct pmic *p, int state, int current);
60 int (*battery_init) (struct pmic *bat, struct pmic *p1,
61 struct pmic *p2, struct pmic *p3);
62 int (*battery_charge) (struct pmic *bat);
64 struct pmic *chrg, *fg, *muic;
67 struct pmic { struct
83 struct pmic *parent; argument
90 * U-Boot PMIC Framework
93 * UCLASS_PMIC - This is designed to provide an I/O interface for PMIC devices.
95 * For the multi-function PMIC devices, this can be used as parent I/O device
102 * | |_ PMIC device (READ/WRITE ops) - UCLASS_PMIC
109 * |_ PMIC device (READ/WRITE ops) - UCLASS_PMIC
112 * We can find two PMIC cases in boards design:
115 * We bind a single PMIC device for each interface, to provide an I/O for
123 * |_ the I2C/SPI driver should bind a device for pmic node:
124 * |_ the PMIC driver should bind devices for its childs:
129 * The same for other device nodes, for multi-interface PMIC.
132 * Each PMIC interface driver should use a different compatible string.
134 * If a PMIC child device driver needs access the PMIC-specific registers,
136 * the parent pmic driver. Like in the example:
143 * To ensure such device relationship, the pmic device driver should also bind
150 * - 'drivers/power/pmic/max77686.c'
154 * struct dm_pmic_ops - PMIC device I/O interface
174 * enum pmic_op_type - used for various pmic devices operation calls,
199 /* drivers/power/pmic-uclass.c */
202 * pmic_bind_children() - bind drivers for given parent pmic, using child info
205 * @pmic - pmic device - the parent of found child's
221 * (pmic - bind automatically by compatible)
224 * (pmic's childs - bind by pmic_bind_children())
234 int pmic_bind_children(struct udevice *pmic, ofnode parent,
238 * pmic_get: get the pmic device using its name
241 * @devp - returned pointer to the pmic device
249 * pmic_reg_count: get the pmic register count
251 * The required pmic device can be obtained by 'pmic_get()'
261 * The required pmic device can be obtained by 'pmic_get()'
263 * @pmic - pointer to the UCLASS_PMIC device
273 * pmic_reg_read() - read a PMIC register value
275 * @dev: PMIC device to read
282 * pmic_reg_write() - write a PMIC register value
284 * @dev: PMIC device to write
292 * pmic_clrsetbits() - clear and set bits in a PMIC register
297 * @dev: PMIC device to update
306 * pmic_suspend() - suspend of PMIC
308 * @dev: PMIC device
314 * pmic_resume() - resume of PMIC
316 * @dev: PMIC device
322 * pmic_shutdown() - power off supplies of PMIC
324 * @dev: PMIC device to update
335 int check_reg(struct pmic *p, u32 reg);
336 struct pmic *pmic_alloc(void);
337 struct pmic *pmic_get(const char *s);
338 int pmic_probe(struct pmic *p);
339 int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
340 int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
341 int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);