Lines Matching +full:current +full:- +full:limit +full:- +full:microamp
2 * Copyright (C) 2014-2015 Samsung Electronics
5 * SPDX-License-Identifier: GPL-2.0+
12 * U-Boot Voltage/Current Regulator
19 * The regulator uclass - is based on uclass platform data which is allocated,
20 * automatically for each regulator device on bind and 'dev->uclass_platdata'
22 * The uclass file: 'drivers/power/regulator/regulator-uclass.c'
24 * The regulator device - is based on driver's model 'struct udevice'.
26 * - devname - the regulator device's name: 'dev->name'
27 * - platname - the device's platdata's name. So in the code it looks like:
28 * 'uc_pdata = dev->uclass_platdata'; 'name = uc_pdata->name'.
30 * The regulator device driver - provide an implementation of uclass operations
31 * pointed by 'dev->driver->ops' as a struct of type 'struct dm_regulator_ops'.
37 * regulator-name = "VDD_MMC_1.8V"; (must be unique for proper bind)
38 * regulator-min-microvolt = <1000000>; (optional)
39 * regulator-max-microvolt = <1000000>; (optional)
40 * regulator-min-microamp = <1000>; (optional)
41 * regulator-max-microamp = <1000>; (optional)
42 * regulator-always-on; (optional)
43 * regulator-boot-on; (optional)
49 * If regulator-name property is not provided, node name will be chosen.
54 * which does the scan on the device node, for the 'regulator-name' constraint.
57 * dm_scan_fdt_dev() - this is usually done automatically for bus devices,
69 * Please do not use the device_bind_by_name() function, since it pass '-1' as
70 * device node offset - and the bind will fail on uclass .post_bind method,
71 * because of missing 'regulator-name' constraint.
74 * Fixed Voltage/Current Regulator
78 * - CONFIG_DM_REGULATOR_FIXED
83 * To bind the fixed voltage regulator device, we usually use a 'simple-bus'
84 * node as a parent. And 'regulator-fixed' for the driver compatible. This is
87 * simple-bus {
88 * compatible = "simple-bus";
89 * #address-cells = <1>;
90 * #size-cells = <0>;
93 * compatible = "regulator-fixed";
94 * regulator-name = "VDD_LED_3.3V";
95 * regulator-min-microvolt = <3300000>;
96 * regulator-max-microvolt = <3300000>;
105 /* enum regulator_type - used for regulator_*() variant calls */
116 * struct dm_regulator_mode - this structure holds an information about
117 * each regulator operation mode. Probably in most cases - an array.
118 * This will be probably a driver-static data, since it is device-specific.
120 * @id - a driver-specific mode id
121 * @register_value - a driver-specific value for its mode id
122 * @name - the name of mode - used for regulator command
139 * struct dm_regulator_uclass_platdata - pointed by dev->uclass_platdata, and
142 * There is no "step" voltage value - so driver should take care of this.
144 * @type - one of 'enum regulator_type'
145 * @mode - pointer to the regulator mode (array if more than one)
146 * @mode_count - number of '.mode' entries
147 * @min_uV* - minimum voltage (micro Volts)
148 * @max_uV* - maximum voltage (micro Volts)
149 * @min_uA* - minimum amperage (micro Amps)
150 * @max_uA* - maximum amperage (micro Amps)
151 * @always_on* - bool type, true or false
152 * @boot_on* - bool type, true or false
154 * @flags: - flags value (see REGULATOR_FLAG_...)
155 * @name** - fdt regulator name - should be taken from the device tree
156 * ctrl_reg: - Control register offset used to enable/disable regulator
157 * volt_reg: - register offset for writing voltage vsel values
160 * * - set automatically on device probe by the uclass's '.pre_probe' method.
161 * ** - set automatically on device bind by the uclass's '.post_bind' method.
191 * get/set_value - get/set output value of the given output number
192 * @dev - regulator device
194 * @uV - set the output value [micro Volts]
203 * The regulator output current function calls operates on a micro Amps.
205 * get/set_current - get/set output current of the given output number
206 * @dev - regulator device
208 * @uA - set the output current [micro Amps]
217 * get/set_enable - get/set enable state of the given output number
218 * @dev - regulator device
220 * @enable - set true - enable or false - disable
221 * @return true/false for get or -errno if fail; 0 / -errno for set.
229 * The 'get/set_mode()' function calls should operate on a driver-
233 * get/set_mode - get/set operation mode of the given output number
234 * @dev - regulator device
236 * @mode_id - set output mode id (struct dm_regulator_mode->id)
248 * @dev - regulator device
249 * @ramp_delay - ramp delay [uV/uS]
258 * @dev - pointer to the regulator device
259 * @modep - pointer to the returned mode info array
260 * @return - count of modep entries on success or negative errno if fail.
267 * @dev - pointer to the regulator device
268 * @return - positive output value [uV] on success or negative errno if fail.
275 * @dev - pointer to the regulator device
276 * @uV - the output value to set [micro Volts]
277 * @return - 0 on success or -errno val if fails
284 * @dev - pointer to the regulator device
285 * @uV - the output suspend value to set [micro Volts]
286 * @return - 0 on success or -errno val if fails
293 * @dev - pointer to the regulator device
294 * @return - positive output value [uV] on success or negative errno if fail.
300 * without any min-,max condition check
302 * @dev - pointer to the regulator device
303 * @uV - the output value to set [micro Volts]
304 * @return - 0 on success or -errno val if fails
311 * @dev - pointer to the regulator device
312 * @return - positive output current [uA] on success or negative errno if fail.
319 * @dev - pointer to the regulator device
320 * @uA - set the output current [micro Amps]
321 * @return - 0 on success or -errno val if fails
328 * @dev - pointer to the regulator device
329 * @return - true/false of enable state or -errno val if fails
336 * @dev - pointer to the regulator device
337 * @enable - set true or false
338 * @return - 0 on success or -errno val if fails
345 * @dev - pointer to the regulator device
346 * @enable - set true or false
347 * @return - 0 on success or -errno val if fails
354 * @dev - pointer to the regulator device
355 * @return - 0 on success or -errno val if fails
362 * @dev - pointer to the regulator device
363 * @return - positive mode 'id' number on success or -errno val if fails
375 * @dev - pointer to the regulator device
376 * @mode_id - mode id to set ('id' field of struct type dm_regulator_mode)
377 * @return - 0 on success or -errno value if fails
387 * regulators_enable_boot_on() - enable regulators needed for boot
390 * only works for regulators which don't have a range for voltage/current,
398 * regulators_enable_state_mem() - enable regulators state mem configure
400 * This sets regulator-state-mem state for all regulators ;
408 * - Enable - will set - if any of: 'always_on' or 'boot_on' is set to true,
410 * - Voltage value - will set - if '.min_uV' and '.max_uV' values are equal
411 * - Current limit - will set - if '.min_uA' and '.max_uA' values are equal
415 * @platname - expected string for dm_regulator_uclass_platdata .name field
416 * @devp - returned pointer to the regulator device - if non-NULL passed
420 * - regulator_get/set_*
430 * @list_platname - an array of expected strings for .name field of each
432 * @list_devp - an array of returned pointers to the successfully setup
433 * regulator devices if non-NULL passed
434 * @verbose - (true/false) print each regulator setup info, or be quiet
438 * - regulator_get/set_*
455 * @devname - expected string for 'dev->name' of regulator device
456 * @devp - returned pointer to the regulator device
460 * - regulator_get/set_*
468 * @platname - expected string for uc_pdata->name of regulator uclass platdata
469 * @devp - returns pointer to the regulator device or NULL on error
473 * - regulator_get/set_*
485 * @dev - device with supply phandle
486 * @supply_name - phandle name of regulator
487 * @devp - returned pointer to the supply device