mirror of
https://github.com/opnsense/src.git
synced 2026-02-17 17:49:34 -05:00
ds3231: allow configuration via hints on FDT systems
MFC after: 10 days
This commit is contained in:
parent
b416345d5b
commit
1256067c5c
1 changed files with 6 additions and 3 deletions
|
|
@ -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…
Reference in a new issue