Lines Matching +full:system +full:- +full:regulator
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * driver.h -- SoC Regulator driver support.
9 * Regulator Driver Interface.
18 #include <linux/regulator/consumer.h>
37 /* The regulator is enabled but not regulating */
62 * struct regulator_ops - regulator operations.
64 * @enable: Configure the regulator as enabled.
65 * @disable: Configure the regulator as disabled.
66 * @is_enabled: Return 1 if the regulator is enabled, 0 if not.
69 * @set_voltage: Set the voltage for the regulator within the range specified.
71 * @set_voltage_sel: Set the voltage for the regulator using the specified
74 * @get_voltage: Return the currently configured voltage for the regulator;
75 * return -ENOTRECOVERABLE if regulator can't be read at
78 * regulator; return -ENOTRECOVERABLE if regulator can't
81 * if the selector indicates a voltage that is unusable on this system;
85 * @set_current_limit: Configure a limit for a current-limited regulator.
87 * @get_current_limit: Get the configured limit for a current-limited regulator.
93 * REGULATOR_SEVERITY_PROT should automatically shut down the regulator(s).
94 * REGULATOR_SEVERITY_ERR should indicate that over-current situation is
112 * @set_mode: Set the configured operating mode for the regulator.
113 * @get_mode: Get the configured operating mode for the regulator.
114 * @get_error_flags: Get the current error(s) for the regulator.
115 * @get_status: Return actual (not as-configured) status of regulator, as a
117 * @get_optimum_mode: Get the most efficient operating mode for the regulator
119 * @set_load: Set the load for the regulator.
121 * @set_bypass: Set the regulator in bypass mode.
122 * @get_bypass: Get the regulator bypass mode state.
124 * @enable_time: Time taken for the regulator voltage output voltage to
126 * @set_ramp_delay: Set the ramp delay for the regulator. The driver should
128 * @set_voltage_time: Time taken for the regulator voltage output voltage
132 * @set_voltage_time_sel: Time taken for the regulator voltage output voltage
136 * @set_soft_start: Enable soft start for the regulator.
138 * @set_suspend_voltage: Set the voltage for the regulator when the system
140 * @set_suspend_enable: Mark the regulator as enabled when the system is
142 * @set_suspend_disable: Mark the regulator as disabled when the system is
144 * @set_suspend_mode: Set the operating mode for the regulator when the
145 * system is suspended.
146 * @resume: Resume operation of suspended regulator.
147 * @set_pull_down: Configure the regulator to pull down when the regulator
150 * This struct describes regulator operations which can be implemented by
151 * regulator chip drivers.
158 /* get/set regulator voltage */
166 /* get/set regulator current */
182 /* enable/disable regulator */
187 /* get/set regulator operating mode (defined in consumer.h) */
191 /* retrieve current error flags on the regulator */
194 /* Time taken to enable or set voltage on the regulator */
205 /* report regulator status ... most other accessors report
212 /* get most efficient regulator operating mode for load */
215 /* set the load on the regulator */
222 /* the operations below are for configuration of regulator state when
225 /* set regulator suspend voltage */
228 /* enable/disable regulator in suspend state */
232 /* set regulator suspend operating mode (defined in consumer.h) */
249 * struct regulator_desc - Static regulator descriptor
251 * Each regulator registered with the core is described with a
253 * structure contains the non-varying parts of the regulator
256 * @name: Identifying name for the regulator.
257 * @supply_name: Identifying the regulator supply
258 * @of_match: Name used to identify regulator in DT.
261 * @regulators_node: Name of node containing regulator definitions in DT.
263 * Will be called for each regulator parsed from DT, during
271 * @id: Numerical identifier for the regulator.
272 * @ops: Regulator operations table.
273 * @irq: Interrupt number for the regulator.
274 * @type: Indicates if the regulator is a voltage or current regulator.
275 * @owner: Module providing the regulator, used for refcounting.
277 * @continuous_voltage_range: Indicates if the regulator can set any
287 * @min_dropout_uV: The minimum dropout voltage this regulator can handle
304 * set directly), if >0 then the regulator API will ramp the
340 * @ramp_reg: Register for controlling the regulator ramp-rate.
341 * @ramp_mask: Bitmask for the ramp-rate control register.
342 * @ramp_delay_table: Table for mapping the regulator ramp-rate values. Values
346 * @enable_time: Time taken for initial enable of regulator (in uS).
347 * @off_on_delay: guard time (in uS), before re-enabling a regulator
350 * the regulator was actually enabled. Max upto enable_time.
430 * struct regulator_config - Dynamic regulator descriptor
432 * Each regulator registered with the core is described with a
434 * contains the runtime variable parts of the regulator description.
436 * @dev: struct device for the regulator
438 * @driver_data: private regulator data
443 * @ena_gpiod: GPIO controlling regulator enable.
456 * struct regulator_err_state - regulator error/notification status
458 * @rdev: Regulator which status the struct indicates.
459 * @notifs: Events which have occurred on the regulator.
460 * @errors: Errors which are active on the regulator.
471 * struct regulator_irq_data - regulator error/notification status data
485 * reporting regulator status to core.
495 * struct regulator_irq_desc - notification sender for IRQ based events.
499 * best to shut-down regulator(s) or reboot the SOC if error
504 * @reread_ms: The time which is waited before attempting to re-read status
505 * at the worker if IC reading fails. Immediate re-read is done
507 * @irq_off_ms: The time which IRQ is kept disabled before re-evaluating the
521 * disabling the regulator. If protection succeeded this may
524 * @map_event: Driver callback to map IRQ status into regulator devices with
530 * fatal_cnt times the core will call die() callback or power-off
531 * the system as a last resort to protect the HW.
533 * re-enabling IRQ. If implemented this should clear the error
536 * assumed to be cleared and IRQ is re-enabled.
540 * callback or if die() is not populated then attempt to power-off
541 * the system as a last resort to protect the HW.
543 * and IRQ will be re-enabled. Returning REGULATOR_ERROR_ON
549 * re-evaluated and re-sent.
551 * This structure is used for registering regulator IRQ notification helper.
570 * Return values for regulator IRQ helpers.
581 * Describes coupling of regulators. Each regulator should have
583 * When a new coupled regulator is resolved, n_resolved is
596 * Voltage / Current regulator class device. One for each
597 * regulator.
599 * This should *not* be used directly by anything except the regulator
625 struct regulator *supply; /* for tree */
640 /* time when this regulator was disabled last time */
720 * Helper functions intended to be used by regulator drivers prior registering