Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160065137
D30290.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
D30290.diff
View Options
diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c
--- a/sys/arm/allwinner/axp81x.c
+++ b/sys/arm/allwinner/axp81x.c
@@ -850,6 +850,22 @@
return (0);
}
+static int
+axp8xx_regnode_status(struct regnode *regnode, int *status)
+{
+ struct axp8xx_reg_sc *sc;
+ uint8_t val;
+
+ sc = regnode_get_softc(regnode);
+
+ *status = 0;
+ axp8xx_read(sc->base_dev, sc->def->enable_reg, &val, 1);
+ if (val & sc->def->enable_mask)
+ *status = REGULATOR_STATUS_ENABLED;
+
+ return (0);
+}
+
static int
axp8xx_regnode_set_voltage(struct regnode *regnode, int min_uvolt,
int max_uvolt, int *udelay)
@@ -899,6 +915,7 @@
/* Regulator interface */
REGNODEMETHOD(regnode_init, axp8xx_regnode_init),
REGNODEMETHOD(regnode_enable, axp8xx_regnode_enable),
+ REGNODEMETHOD(regnode_status, axp8xx_regnode_status),
REGNODEMETHOD(regnode_set_voltage, axp8xx_regnode_set_voltage),
REGNODEMETHOD(regnode_get_voltage, axp8xx_regnode_get_voltage),
REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 22, 1:25 AM (6 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34170184
Default Alt Text
D30290.diff (1 KB)
Attached To
Mode
D30290: arm64: allwinner: axp81x: Add support for regnode_status
Attached
Detach File
Event Timeline
Log In to Comment