Lines Matching full:syscon
53 #include <dev/syscon/syscon.h>
57 static uint32_t simple_mfd_syscon_read_4(struct syscon *syscon,
59 static int simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t offset,
61 static int simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset,
67 device_get_nameunit((_sc)->dev), "syscon", MTX_SPIN)
83 simple_mfd_syscon_read_4(struct syscon *syscon, bus_size_t offset) in simple_mfd_syscon_read_4() argument
88 sc = device_get_softc(syscon->pdev); in simple_mfd_syscon_read_4()
95 simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t offset, in simple_mfd_syscon_write_4() argument
100 sc = device_get_softc(syscon->pdev); in simple_mfd_syscon_write_4()
107 simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset, in simple_mfd_syscon_modify_4() argument
113 sc = device_get_softc(syscon->pdev); in simple_mfd_syscon_modify_4()
123 simple_mfd_syscon_get_handle(device_t dev, struct syscon **syscon) in simple_mfd_syscon_get_handle() argument
128 *syscon = sc->syscon; in simple_mfd_syscon_get_handle()
129 if (*syscon == NULL) in simple_mfd_syscon_get_handle()
208 if (ofw_bus_is_compatible(dev, "syscon")) { in simple_mfd_attach()
218 sc->syscon = syscon_create_ofw_node(dev, in simple_mfd_attach()
220 if (sc->syscon == NULL) { in simple_mfd_attach()
222 "Failed to create/register syscon\n"); in simple_mfd_attach()
236 if (ofw_bus_is_compatible(dev, "syscon")) { in simple_mfd_detach()
237 if (sc->syscon != NULL) { in simple_mfd_detach()
238 syscon_unregister(sc->syscon); in simple_mfd_detach()
239 free(sc->syscon, M_SYSCON); in simple_mfd_detach()
302 /* syscon interface */