Voltage and current regulator API

Liam Girdwood


      
     

Mark Brown

Wolfson Microelectronics


      
     

This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For more details see the file COPYING in the source distribution of Linux.


Table of Contents

1. Introduction
Glossary
2. Consumer driver interface
Enabling and disabling
Configuration
Callbacks
3. Regulator driver interface
4. Machine interface
Supplies
Constraints
5. API reference
struct regulator_bulk_data — Data used for bulk regulator operations.
struct regulator_state — regulator state during low power system states
struct regulation_constraints — regulator operating constraints.
struct regulator_consumer_supply — supply -> device mapping
struct regulator_init_data — regulator platform initialisation data.
struct regulator_ops — regulator operations.
struct regulator_desc — Regulator descriptor
regulator_get — lookup and obtain a reference to a regulator.
regulator_get_exclusive — obtain exclusive access to a regulator.
regulator_put — "free" the regulator source
regulator_enable — enable regulator output
regulator_disable — disable regulator output
regulator_force_disable — force disable regulator output
regulator_is_enabled — is the regulator output enabled
regulator_count_voltages — count regulator_list_voltage selectors
regulator_list_voltage — enumerate supported voltages
regulator_set_voltage — set regulator output voltage
regulator_set_voltage_time — get raise/fall time
regulator_sync_voltage — re-apply last regulator output voltage
regulator_get_voltage — get regulator output voltage
regulator_set_current_limit — set regulator output current limit
regulator_get_current_limit — get regulator output current
regulator_set_mode — set regulator operating mode
regulator_get_mode — get regulator operating mode
regulator_set_optimum_mode — set regulator optimum operating mode
regulator_register_notifier — register regulator event notifier
regulator_unregister_notifier — unregister regulator event notifier
regulator_bulk_get — get multiple regulator consumers
regulator_bulk_enable — enable multiple regulator consumers
regulator_bulk_disable — disable multiple regulator consumers
regulator_bulk_free — free multiple regulator consumers
regulator_notifier_call_chain — call regulator event notifier
regulator_mode_to_status — convert a regulator mode into a status
regulator_register — register regulator
regulator_unregister — unregister regulator
regulator_suspend_prepare — prepare regulators for system wide suspend
regulator_suspend_finish — resume regulators from system wide suspend
regulator_has_full_constraints — the system has fully specified constraints
regulator_use_dummy_regulator — Provide a dummy regulator when none is found
rdev_get_drvdata — get rdev regulator driver data
regulator_get_drvdata — get regulator driver data
regulator_set_drvdata — set regulator driver data
rdev_get_id — get regulator ID