Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102807250
D31103.id91956.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1010 B
Referenced Files
None
Subscribers
None
D31103.id91956.diff
View Options
Index: sys/dev/iicbus/syr827.c
===================================================================
--- sys/dev/iicbus/syr827.c
+++ sys/dev/iicbus/syr827.c
@@ -64,8 +64,14 @@
#define ID2 0x4
#define ID2_DIE_REV_MASK 0xF
+enum syrtype {
+ SYR827 = 1,
+ SYR828,
+};
+
static struct ofw_compat_data compat_data[] = {
- { "silergy,syr827", 1 },
+ { "silergy,syr827", SYR827 },
+ { "silergy,syr828", SYR828 },
{ NULL, 0 }
};
@@ -241,13 +247,23 @@
static int
syr827_probe(device_t dev)
{
+ int type;
+
if (!ofw_bus_status_okay(dev))
return (ENXIO);
- if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
+ type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ switch (type) {
+ case SYR827:
+ device_set_desc(dev, "Silergy SYR827 regulator");
+ break;
+ case SYR828:
+ device_set_desc(dev, "Silergy SYR828 regulator");
+ break;
+ case 0:
+ default:
return (ENXIO);
-
- device_set_desc(dev, "Silergy SYR827 regulator");
+ }
return (BUS_PROBE_DEFAULT);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 10:52 AM (12 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14696338
Default Alt Text
D31103.id91956.diff (1010 B)
Attached To
Mode
D31103: syr827: add support for matching SYR828 as well (used by GPUs)
Attached
Detach File
Event Timeline
Log In to Comment