drivers: regulator: move consumer.h to regulator.h

In Zephyr all regulator APIs are consumer APIs. There's no point in
adding a separate header file. Our current implementation is also
inconsistent with Linux, where enable/disable are also part of the
consumer.h API.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-11-11 11:33:57 +01:00 committed by Carles Cufí
commit 74e40f88ae
5 changed files with 145 additions and 179 deletions

View file

@ -7,17 +7,13 @@
* @file
* @brief PMIC Regulator Driver
* This driver implements the regulator API within Zephyr, and additionally
* implements support for a broader API. Most consumers will want to use
* the API provided in drivers/regulator/consumer.h to manipulate the voltage
* levels of the regulator device.
* manipulate.
* implements support for a broader API.
*/
#define DT_DRV_COMPAT regulator_pmic
#include <zephyr/kernel.h>
#include <zephyr/drivers/regulator.h>
#include <zephyr/drivers/regulator/consumer.h>
#include <zephyr/dt-bindings/regulator/pmic_i2c.h>
#include <zephyr/drivers/i2c.h>
#include <errno.h>

View file

@ -8,9 +8,6 @@
#include <zephyr/shell/shell.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/drivers/regulator.h>
#if CONFIG_REGULATOR_PMIC
#include <zephyr/drivers/regulator/consumer.h>
#endif
LOG_MODULE_REGISTER(regulator_shell, CONFIG_REGULATOR_LOG_LEVEL);