Page MenuHomeFreeBSD

D23005.diff
No OneTemporary

D23005.diff

Index: head/sys/arm64/rockchip/rk805.c
===================================================================
--- head/sys/arm64/rockchip/rk805.c
+++ head/sys/arm64/rockchip/rk805.c
@@ -413,6 +413,22 @@
}
static int
+rk805_regnode_status(struct regnode *regnode, int *status)
+{
+ struct rk805_reg_sc *sc;
+ uint8_t val;
+
+ sc = regnode_get_softc(regnode);
+
+ *status = 0;
+ rk805_read(sc->base_dev, sc->def->enable_reg, &val, 1);
+ if (val & sc->def->enable_mask)
+ *status = REGULATOR_STATUS_ENABLED;
+
+ return (0);
+}
+
+static int
rk805_regnode_set_voltage(struct regnode *regnode, int min_uvolt,
int max_uvolt, int *udelay)
{
@@ -477,6 +493,7 @@
/* Regulator interface */
REGNODEMETHOD(regnode_init, rk805_regnode_init),
REGNODEMETHOD(regnode_enable, rk805_regnode_enable),
+ REGNODEMETHOD(regnode_status, rk805_regnode_status),
REGNODEMETHOD(regnode_set_voltage, rk805_regnode_set_voltage),
REGNODEMETHOD(regnode_get_voltage, rk805_regnode_get_voltage),
REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage),

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 11:40 PM (22 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14749897
Default Alt Text
D23005.diff (1 KB)

Event Timeline