Lines Matching full:pmic
45 struct pmic;
47 int (*fg_battery_check) (struct pmic *p, struct pmic *bat);
48 int (*fg_battery_update) (struct pmic *p, struct pmic *bat);
52 int (*chrg_type) (struct pmic *p);
53 int (*chrg_bat_present) (struct pmic *p);
54 int (*chrg_state) (struct pmic *p, int state, int current);
59 int (*battery_init) (struct pmic *bat, struct pmic *p1,
60 struct pmic *p2, struct pmic *p3);
61 int (*battery_charge) (struct pmic *bat);
63 struct pmic *chrg, *fg, *muic;
66 struct pmic { struct
82 struct pmic *parent; argument
89 * U-Boot PMIC Framework
92 * UCLASS_PMIC - This is designed to provide an I/O interface for PMIC devices.
94 * For the multi-function PMIC devices, this can be used as parent I/O device
101 * | |_ PMIC device (READ/WRITE ops) - UCLASS_PMIC
108 * |_ PMIC device (READ/WRITE ops) - UCLASS_PMIC
111 * We can find two PMIC cases in boards design:
114 * We bind a single PMIC device for each interface, to provide an I/O for
122 * |_ the I2C/SPI driver should bind a device for pmic node:
123 * |_ the PMIC driver should bind devices for its childs:
128 * The same for other device nodes, for multi-interface PMIC.
131 * Each PMIC interface driver should use a different compatible string.
133 * If a PMIC child device driver needs access the PMIC-specific registers,
135 * the parent pmic driver. Like in the example:
142 * To ensure such device relationship, the pmic device driver should also bind
149 * - 'drivers/power/pmic/max77686.c'
153 * struct dm_pmic_ops - PMIC device I/O interface
170 * enum pmic_op_type - used for various pmic devices operation calls,
194 /* drivers/power/pmic-uclass.c */
197 * pmic_bind_children() - bind drivers for given parent pmic, using child info
200 * @pmic - pmic device - the parent of found child's
216 * (pmic - bind automatically by compatible)
219 * (pmic's childs - bind by pmic_bind_children())
229 int pmic_bind_children(struct udevice *pmic, ofnode parent,
233 * pmic_get: get the pmic device using its name
236 * @devp - returned pointer to the pmic device
244 * pmic_reg_count: get the pmic register count
246 * The required pmic device can be obtained by 'pmic_get()'
256 * The required pmic device can be obtained by 'pmic_get()'
258 * @pmic - pointer to the UCLASS_PMIC device
268 * pmic_reg_read() - read a PMIC register value
270 * @dev: PMIC device to read
277 * pmic_reg_write() - write a PMIC register value
279 * @dev: PMIC device to write
287 * pmic_clrsetbits() - clear and set bits in a PMIC register
292 * @dev: PMIC device to update
301 * This structure holds the private data for PMIC uclass
315 int check_reg(struct pmic *p, u32 reg);
316 struct pmic *pmic_alloc(void);
317 struct pmic *pmic_get(const char *s);
318 int pmic_probe(struct pmic *p);
319 int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
320 int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
321 int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);