drivers: regulator: drop regulator_count_modes
The regulator_count_modes was an API that was not useful. Unlike with voltages where the interface guarantees they are zero-indexed, modes can take an arbitrary identifier. So counting supported modes doesn't provide any useful information such as if a mode is allowed. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
9a73be82c4
commit
aab28d735f
2 changed files with 0 additions and 35 deletions
|
@ -271,18 +271,6 @@ static unsigned int regulator_pca9420_count_voltages(const struct device *dev)
|
|||
config->desc->num_ranges);
|
||||
}
|
||||
|
||||
/**
|
||||
* Part of the extended regulator consumer API
|
||||
* Counts the number of modes supported by a regulator
|
||||
*/
|
||||
static int regulator_pca9420_count_modes(const struct device *dev)
|
||||
{
|
||||
const struct regulator_pca9420_config *config = dev->config;
|
||||
const struct regulator_pca9420_common_config *cconfig = config->parent->config;
|
||||
|
||||
return cconfig->allowed_modes_cnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Part of the extended regulator consumer API
|
||||
* Returns the supported voltage in uV for a given selector value
|
||||
|
@ -548,7 +536,6 @@ static const struct regulator_driver_api api = {
|
|||
.enable = regulator_pca9420_enable,
|
||||
.disable = regulator_pca9420_disable,
|
||||
.count_voltages = regulator_pca9420_count_voltages,
|
||||
.count_modes = regulator_pca9420_count_modes,
|
||||
.list_voltages = regulator_pca9420_list_voltages,
|
||||
.is_supported_voltage = regulator_pca9420_is_supported_voltage,
|
||||
.set_voltage = regulator_pca9420_set_voltage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue