ds3231: allow configuration via hints on FDT systems
MFC after: 10 days
This commit is contained in:
parent
b416345d5b
commit
1256067c5c
@ -356,16 +356,19 @@ ds3231_en32khz_sysctl(SYSCTL_HANDLER_ARGS)
|
||||
static int
|
||||
ds3231_probe(device_t dev)
|
||||
{
|
||||
int rc;
|
||||
|
||||
#ifdef FDT
|
||||
if (!ofw_bus_status_okay(dev))
|
||||
return (ENXIO);
|
||||
if (!ofw_bus_is_compatible(dev, "maxim,ds3231"))
|
||||
return (ENXIO);
|
||||
if (ofw_bus_is_compatible(dev, "maxim,ds3231"))
|
||||
rc = BUS_PROBE_DEFAULT;
|
||||
else
|
||||
rc = BUS_PROBE_NOWILDCARD;
|
||||
#endif
|
||||
device_set_desc(dev, "Maxim DS3231 RTC");
|
||||
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
return (rc);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user