---
name: "struct_regulator_desc"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/struct_regulator_desc"
---

# struct\_regulator\_desc(9)

Static regulator descriptor

## NAME

struct\_regulator\_desc - Static regulator descriptor

## SYNOPSIS

```
struct regulator_desc {
  const char * name;
  const char * supply_name;
  const char * of_match;
  const char * regulators_node;
  int (* of_parse_cb) (struct device_node *,const struct regulator_desc *,struct regulator_config *);
  int id;
  unsigned int continuous_voltage_range:1;
  unsigned n_voltages;
  const struct regulator_ops * ops;
  int irq;
  enum regulator_type type;
  struct module * owner;
  unsigned int min_uV;
  unsigned int uV_step;
  unsigned int linear_min_sel;
  int fixed_uV;
  unsigned int ramp_delay;
  int min_dropout_uV;
  const struct regulator_linear_range * linear_ranges;
  int n_linear_ranges;
  const unsigned int * volt_table;
  unsigned int vsel_reg;
  unsigned int vsel_mask;
  unsigned int csel_reg;
  unsigned int csel_mask;
  unsigned int apply_reg;
  unsigned int apply_bit;
  unsigned int enable_reg;
  unsigned int enable_mask;
  unsigned int enable_val;
  unsigned int disable_val;
  bool enable_is_inverted;
  unsigned int bypass_reg;
  unsigned int bypass_mask;
  unsigned int bypass_val_on;
  unsigned int bypass_val_off;
  unsigned int active_discharge_on;
  unsigned int active_discharge_off;
  unsigned int active_discharge_mask;
  unsigned int active_discharge_reg;
  unsigned int enable_time;
  unsigned int off_on_delay;
  unsigned int (* of_map_mode) (unsigned int mode);
};
```

## MEMBERS

name

Identifying name for the regulator.

supply\_name

Identifying the regulator supply

of\_match

Name used to identify regulator in DT.

regulators\_node

Name of node containing regulator definitions in DT.

of\_parse\_cb

Optional callback called only if of\_match is present. Will be called for each regulator parsed from DT, during init\_data parsing. The regulator\_config passed as argument to the callback will be a copy of config passed to regulator\_register, valid only for this particular call. Callback may freely change the config but it cannot store it for later usage. Callback should return 0 on success or negative ERRNO indicating failure.

id

Numerical identifier for the regulator.

continuous\_voltage\_range

Indicates if the regulator can set any voltage within constrains range.

n\_voltages

Number of selectors available for ops.**list\_voltage**.

ops

Regulator operations table.

irq

Interrupt number for the regulator.

type

Indicates if the regulator is a voltage or current regulator.

owner

Module providing the regulator, used for refcounting.

min\_uV

Voltage given by the lowest selector (if linear mapping)

uV\_step

Voltage increase with each selector (if linear mapping)

linear\_min\_sel

Minimal selector for starting linear mapping

fixed\_uV

Fixed voltage of rails.

ramp\_delay

Time to settle down after voltage change (unit: uV/us)

min\_dropout\_uV

The minimum dropout voltage this regulator can handle

linear\_ranges

A constant table of possible voltage ranges.

n\_linear\_ranges

Number of entries in the *linear\_ranges* table.

volt\_table

Voltage mapping table (if table based mapping)

vsel\_reg

Register for selector when using regulator\_regmap\_X\_voltage\_

vsel\_mask

Mask for register bitfield used for selector

csel\_reg

Register for TPS65218 LS3 current regulator

csel\_mask

Mask for TPS65218 LS3 current regulator

apply\_reg

Register for initiate voltage change on the output when using regulator\_set\_voltage\_sel\_regmap

apply\_bit

Register bitfield used for initiate voltage change on the output when using regulator\_set\_voltage\_sel\_regmap

enable\_reg

Register for control when using regmap enable/disable ops

enable\_mask

Mask for control when using regmap enable/disable ops

enable\_val

Enabling value for control when using regmap enable/disable ops

disable\_val

Disabling value for control when using regmap enable/disable ops

enable\_is\_inverted

A flag to indicate set enable\_mask bits to disable when using regulator\_enable\_regmap and friends APIs.

bypass\_reg

Register for control when using regmap set\_bypass

bypass\_mask

Mask for control when using regmap set\_bypass

bypass\_val\_on

Enabling value for control when using regmap set\_bypass

bypass\_val\_off

Disabling value for control when using regmap set\_bypass

active\_discharge\_on

Disabling value for control when using regmap set\_active\_discharge

active\_discharge\_off

Enabling value for control when using regmap set\_active\_discharge

active\_discharge\_mask

Mask for control when using regmap set\_active\_discharge

active\_discharge\_reg

Register for control when using regmap set\_active\_discharge

enable\_time

Time taken for initial enable of regulator (in uS).

off\_on\_delay

guard time (in uS), before re-enabling a regulator

of\_map\_mode

Maps a hardware mode defined in a DeviceTree to a standard mode

## DESCRIPTION

Each regulator registered with the core is described with a structure of this type and a struct regulator\_config. This structure contains the non-varying parts of the regulator description.

## AUTHORS

**Liam Girdwood** \<lrg@slimlogic.co.uk\>

Author.

**Mark Brown** \<broonie@opensource.wolfsonmicro.com\>\
 Wolfson Microelectronics,

Author.

## COPYRIGHT
