Commit graph

7 commits

Author SHA1 Message Date
Andy Sinclair b46e2f3d8a drivers: regulator: fake: Added is_enabled property
Added is_enabled devicetree property to fake regulator.
Allows testing of init behaviour when regulator is enabled
in hardware.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-05 09:43:17 -05:00
Ryan McClelland 97efd21ce9 tests: drivers: regulator: add api test for active discharge
Add tests for active discharge apis not being implemented.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-29 09:43:39 +01:00
Andy Sinclair f6aa1c4321 drivers: regulator: Added ship mode to API
Added ship mode entry function to common regulator driver

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-07-19 09:30:22 +00:00
Gerard Marull-Paretas 1eb683a514 device: remove redundant init functions
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Gerard Marull-Paretas 7feb008c85 drivers: regulator: common: allow to specify on by default
Some regulators are enabled by default, however, such condition cannot
be captured now by the regulator driver API. Refactor
regulator_common_init_enable to regulator_common_init (enable removed,
as it also sets mode) and add a new argument to specify such condition.
With this change, regulator_disable() and regulator_is_enabled() work as
expected without a first call to regulator_enable().

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-09 16:19:09 +00:00
Gerard Marull-Paretas 1ca1f25918 drivers: regulator: add get_mode API
Add a new API to query the configured regulator mode. Updated fake
driver and API tests.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-27 13:12:55 +01:00
Gerard Marull-Paretas 1080afa680 drivers: regulator: add fake driver
Add FFF-based fake regulator driver. This driver can be used as a stub
or mock in testing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-20 10:15:29 +00:00