diff --git a/app/app.overlay b/app/app.overlay index e06cda0..d535d52 100644 --- a/app/app.overlay +++ b/app/app.overlay @@ -1,10 +1,10 @@ /* - * Copyright (c) 2022-2024 Henrik Brix Andersen + * Copyright (c) 2022-2025 Henrik Brix Andersen * * SPDX-License-Identifier: Apache-2.0 */ -&zephyr_udc0 { +/ { gs_usb0: gs_usb0 { compatible = "gs_usb"; label = "gs_usb"; diff --git a/dts/bindings/usb/gs_usb.yaml b/dts/bindings/usb/gs_usb.yaml index 51e15d0..34df7c7 100644 --- a/dts/bindings/usb/gs_usb.yaml +++ b/dts/bindings/usb/gs_usb.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Henrik Brix Andersen +# Copyright (c) 2022-2025 Henrik Brix Andersen # SPDX-License-Identifier: Apache-2.0 description: Geschwister Schneider USB/CAN @@ -7,8 +7,6 @@ compatible: "gs_usb" include: base.yaml -on-bus: usb - properties: label: description: | diff --git a/subsys/usb/device/class/gs_usb.c b/subsys/usb/device/class/gs_usb.c index 30e23f0..18747bb 100644 --- a/subsys/usb/device/class/gs_usb.c +++ b/subsys/usb/device/class/gs_usb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Henrik Brix Andersen + * Copyright (c) 2022-2025 Henrik Brix Andersen * * SPDX-License-Identifier: Apache-2.0 */ @@ -1515,10 +1515,6 @@ static int gs_usb_init(const struct device *dev) } #define GS_USB_DEVICE_DEFINE(inst) \ - BUILD_ASSERT(DT_INST_ON_BUS(inst, usb), \ - "node " DT_NODE_PATH( \ - DT_DRV_INST(inst)) " is not assigned to a USB device controller"); \ - \ NET_BUF_POOL_FIXED_DEFINE(gs_usb_pool_##inst, CONFIG_USB_DEVICE_GS_USB_POOL_SIZE, \ GS_USB_HOST_FRAME_MAX_SIZE, 0, NULL); \ \ diff --git a/subsys/usb/device_next/class/gs_usb.c b/subsys/usb/device_next/class/gs_usb.c index cff266c..06b5d62 100644 --- a/subsys/usb/device_next/class/gs_usb.c +++ b/subsys/usb/device_next/class/gs_usb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Henrik Brix Andersen + * Copyright (c) 2022-2025 Henrik Brix Andersen * * SPDX-License-Identifier: Apache-2.0 */ @@ -1727,10 +1727,6 @@ struct usbd_class_api gs_usb_api = { } #define USBD_GS_USB_DT_DEVICE_DEFINE(n) \ - BUILD_ASSERT(DT_INST_ON_BUS(n, usb), \ - "node " DT_NODE_PATH( \ - DT_DRV_INST(n)) " is not assigned to a USB device controller"); \ - \ GS_USB_DEFINE_DESCRIPTOR(n); \ \ USBD_DEFINE_CLASS(gs_usb_##n, &gs_usb_api, (void *)DEVICE_DT_GET(DT_DRV_INST(n)), \ diff --git a/tests/subsys/usb/gs_usb/cxx/app.overlay b/tests/subsys/usb/gs_usb/cxx/app.overlay index be54e2c..1441eb1 100644 --- a/tests/subsys/usb/gs_usb/cxx/app.overlay +++ b/tests/subsys/usb/gs_usb/cxx/app.overlay @@ -1,10 +1,10 @@ /* - * Copyright (c) 2024 Henrik Brix Andersen + * Copyright (c) 2024-2025 Henrik Brix Andersen * * SPDX-License-Identifier: Apache-2.0 */ -&zephyr_udc0 { +/ { gs_usb0: gs_usb0 { compatible = "gs_usb"; }; diff --git a/tests/subsys/usb/gs_usb/host/app.overlay b/tests/subsys/usb/gs_usb/host/app.overlay index 2cc3c82..8eeff1b 100644 --- a/tests/subsys/usb/gs_usb/host/app.overlay +++ b/tests/subsys/usb/gs_usb/host/app.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Henrik Brix Andersen + * Copyright (c) 2022-2025 Henrik Brix Andersen * * SPDX-License-Identifier: Apache-2.0 */ @@ -24,9 +24,7 @@ status = "okay"; compatible = "zephyr,can-loopback"; }; -}; -&zephyr_udc0 { gs_usb0: gs_usb0 { compatible = "gs_usb"; };