drivers: use node IDs for DEVICE_MMIO.*_INIT

There is nothing wrong with instance numbers and they are
recommended for use whenever possible, but this is an API
design problem because it's not always possible to get nodes
by instance number; in some cases, drivers need to get node
identifiers from node labels, for example.

Change these APIs (which are not yet in any Zephyr release)
to take node IDs instead of instance IDs.

Fixes: #26984

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-08-12 11:57:07 -07:00 committed by Carles Cufí
commit 63c3e153d6
8 changed files with 45 additions and 45 deletions

View file

@ -12,7 +12,7 @@
#include <dt-bindings/interrupt-controller/intel-ioapic.h>
DEVICE_MMIO_TOPLEVEL_STATIC(hpet_regs, 0);
DEVICE_MMIO_TOPLEVEL_STATIC(hpet_regs, DT_DRV_INST(0));
#define HPET_REG32(off) (*(volatile uint32_t *)(long) \
(DEVICE_MMIO_TOPLEVEL_GET(hpet_regs) + (off)))