Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103025624
D23005.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D23005.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D23005: rk805: Add regnode_status method
Attached
Detach File
Event Timeline
Log In to Comment