This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ded12149bda7eafa17429d6c0c7e9f1665ccd080
Author: Ricard Rosson <[email protected]>
AuthorDate: Wed Oct 28 08:54:40 2026 +0000

    boards/arm/rp23xx: Share the CYW43439 user LED between boards.
    
    raspberrypi-pico-2-w and pimoroni-pico-plus-2-w carried identical
    copies of rp23xx_userleds.c, which drives the board LED on GPIO 0 of
    the CYW43439, and of rp23xx_extra_gpio.h, which reaches the chip's
    GPIOs.
    
    Move them to the rp23xx common directory as
    src/rp23xx_cyw43439_userleds.c and include/rp23xx_extra_gpio.h.  The
    LED driver is built when RP23XX_INFINEON_CYW43439 is enabled, which
    only the boards that select RP23XX_HAVE_CYW43439 can do.  It gets a
    new name so that it does not clash with the rp23xx_userleds.c of the
    boards with a GPIO LED.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Ricard Rosson <[email protected]>
---
 .../rp23xx/boards/pimoroni-pico-plus-2-w/index.rst |   3 +-
 .../include/rp23xx_extra_gpio.h                    |  12 +-
 boards/arm/rp23xx/common/src/CMakeLists.txt        |   4 +
 boards/arm/rp23xx/common/src/Make.defs             |   4 +
 .../src/rp23xx_cyw43439_userleds.c}                |  13 +-
 .../include/rp23xx_extra_gpio.h                    | 134 ---------------------
 .../pimoroni-pico-plus-2-w/src/CMakeLists.txt      |   7 +-
 .../rp23xx/pimoroni-pico-plus-2-w/src/Make.defs    |   6 +-
 .../src/rp23xx_boardinitialize.c                   |   2 +-
 .../pimoroni-pico-plus-2-w/src/rp23xx_pico.h       |   2 +-
 .../pimoroni-pico-plus-2-w/src/rp23xx_userleds.c   |  94 ---------------
 .../rp23xx/raspberrypi-pico-2-w/src/CMakeLists.txt |   7 +-
 .../arm/rp23xx/raspberrypi-pico-2-w/src/Make.defs  |   6 +-
 .../src/rp23xx_boardinitialize.c                   |   2 +-
 .../rp23xx/raspberrypi-pico-2-w/src/rp23xx_pico.h  |   2 +-
 15 files changed, 33 insertions(+), 265 deletions(-)

diff --git 
a/Documentation/platforms/arm/rp23xx/boards/pimoroni-pico-plus-2-w/index.rst 
b/Documentation/platforms/arm/rp23xx/boards/pimoroni-pico-plus-2-w/index.rst
index 44ec7aa184c..b304a7123b8 100644
--- a/Documentation/platforms/arm/rp23xx/boards/pimoroni-pico-plus-2-w/index.rst
+++ b/Documentation/platforms/arm/rp23xx/boards/pimoroni-pico-plus-2-w/index.rst
@@ -107,7 +107,8 @@ has two consequences:
 
 With ``CONFIG_USERLED`` the LED appears as ``/dev/userleds`` and can be driven
 with the ``leds`` example.  Board code can also reach it, and the CYW43439's
-other two GPIOs, through ``include/rp23xx_extra_gpio.h``:
+other two GPIOs, through
+``boards/arm/rp23xx/common/include/rp23xx_extra_gpio.h``:
 
 ===== ========= ==============================================================
 GPIO  Direction Function
diff --git a/boards/arm/rp23xx/raspberrypi-pico-2-w/include/rp23xx_extra_gpio.h 
b/boards/arm/rp23xx/common/include/rp23xx_extra_gpio.h
similarity index 91%
rename from boards/arm/rp23xx/raspberrypi-pico-2-w/include/rp23xx_extra_gpio.h
rename to boards/arm/rp23xx/common/include/rp23xx_extra_gpio.h
index 1dde222addb..99139b98990 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/include/rp23xx_extra_gpio.h
+++ b/boards/arm/rp23xx/common/include/rp23xx_extra_gpio.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/rp23xx/raspberrypi-pico-2-w/include/rp23xx_extra_gpio.h
+ * boards/arm/rp23xx/common/include/rp23xx_extra_gpio.h
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -20,13 +20,13 @@
  *
  ****************************************************************************/
 
-#ifndef __BOARDS_ARM_RP23XX_RASPBERRYPI_PICO_2_W_INCLUDE_RP23XX_EXTRA_GPIO_H
-#define __BOARDS_ARM_RP23XX_RASPBERRYPI_PICO_2_W_INCLUDE_RP23XX_EXTRA_GPIO_H
+#ifndef __BOARDS_ARM_RP23XX_COMMON_INCLUDE_RP23XX_EXTRA_GPIO_H
+#define __BOARDS_ARM_RP23XX_COMMON_INCLUDE_RP23XX_EXTRA_GPIO_H
 
 /****************************************************************************
  *  These functions control the GPIO pins on the CYW43439 wireless chip, not
- *  the GPIO pins of the RP2350.  The pin assignments for the Pimoroni Pico
- *  Plus 2 W are:
+ *  the GPIO pins of the RP2350.  The pin assignments on the Raspberry Pi
+ *  Pico 2 W and the Pimoroni Pico Plus 2 W are:
  *
  *  GPIO 0 - output - controls the onboard LED
  *  GPIO 1 - output - controls the onboard voltage regulator mode.
@@ -131,4 +131,4 @@ static inline int rp23xx_extra_gpio_get(uint32_t gpio, bool 
*value)
 #endif
 
 #endif /* __ASSEMBLY__ */
-#endif /* __BOARDS_ARM_RP23XX_RASPBERRYPI_PICO_2_W_INCLUDE_RP23XX_EXTRA_GPIO_H 
*/
+#endif /* __BOARDS_ARM_RP23XX_COMMON_INCLUDE_RP23XX_EXTRA_GPIO_H */
diff --git a/boards/arm/rp23xx/common/src/CMakeLists.txt 
b/boards/arm/rp23xx/common/src/CMakeLists.txt
index 3a728d97b63..58973d57fe9 100644
--- a/boards/arm/rp23xx/common/src/CMakeLists.txt
+++ b/boards/arm/rp23xx/common/src/CMakeLists.txt
@@ -114,6 +114,10 @@ if(CONFIG_ARCH_BOARD_COMMON)
     list(APPEND SRCS rp23xx_max6675.c)
   endif()
 
+  if(CONFIG_RP23XX_INFINEON_CYW43439)
+    list(APPEND SRCS rp23xx_cyw43439_userleds.c)
+  endif()
+
   # Firmware blob for the Infineon CYW43439 WiFi chip.  rp23xx_firmware.c
   # .incbin's it, so it has to be staged somewhere on the include path.
   if(CONFIG_IEEE80211_INFINEON_CYW43439)
diff --git a/boards/arm/rp23xx/common/src/Make.defs 
b/boards/arm/rp23xx/common/src/Make.defs
index b5b7b54f4c1..6a4464f11c4 100644
--- a/boards/arm/rp23xx/common/src/Make.defs
+++ b/boards/arm/rp23xx/common/src/Make.defs
@@ -114,6 +114,10 @@ ifeq ($(CONFIG_SENSORS_MAX6675),y)
  CSRCS += rp23xx_max6675.c
 endif
 
+ifeq ($(CONFIG_RP23XX_INFINEON_CYW43439),y)
+CSRCS += rp23xx_cyw43439_userleds.c
+endif
+
 # Firmware blob for the Infineon CYW43439 WiFi chip.  rp23xx_firmware.c
 # .incbin's it, so stage it out of pico_sdk next to rp23xx_firmware.c, which
 # is both on the include path and reachable via VPATH.  This mirrors what
diff --git a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_userleds.c 
b/boards/arm/rp23xx/common/src/rp23xx_cyw43439_userleds.c
similarity index 88%
rename from boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_userleds.c
rename to boards/arm/rp23xx/common/src/rp23xx_cyw43439_userleds.c
index 34085ecb448..466ed7be0ec 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_userleds.c
+++ b/boards/arm/rp23xx/common/src/rp23xx_cyw43439_userleds.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_userleds.c
+ * boards/arm/rp23xx/common/src/rp23xx_cyw43439_userleds.c
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -21,14 +21,15 @@
  ****************************************************************************/
 
 /****************************************************************************
- * The single LED on this board is wired to GPIO 0 of the CYW43439 wireless
- * chip rather than to a pin of the RP2350, so setting it means sending an
- * iovar request over the gSPI bus.  Two consequences:
+ * On boards that select RP23XX_HAVE_CYW43439, the single LED is wired to
+ * GPIO 0 of the CYW43439 wireless chip rather than to a pin of the RP2350,
+ * so setting it means sending an iovar request over the gSPI bus.  Two
+ * consequences:
  *
  *   - The LED only responds once the wireless chip is running, which happens
  *     when wlan0 is brought up.  Before that every write fails with -EIO.
  *   - Writing the LED blocks, so it must not be done from interrupt context.
- *     That is why this board implements the user LED interface only and not
+ *     That is why these boards implement the user LED interface only and not
  *     the CONFIG_ARCH_LEDS auto-LED interface.
  ****************************************************************************/
 
@@ -44,7 +45,7 @@
 
 #include <nuttx/board.h>
 #include <arch/board/board.h>
-#include <arch/board/rp23xx_extra_gpio.h>
+#include "rp23xx_extra_gpio.h"
 
 #if defined(CONFIG_RP23XX_INFINEON_CYW43439) && !defined(CONFIG_ARCH_LEDS)
 
diff --git 
a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/include/rp23xx_extra_gpio.h 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/include/rp23xx_extra_gpio.h
deleted file mode 100644
index 2a598907fde..00000000000
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/include/rp23xx_extra_gpio.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
- * boards/arm/rp23xx/pimoroni-pico-plus-2-w/include/rp23xx_extra_gpio.h
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-#ifndef __BOARDS_ARM_RP23XX_PIMORONI_PICO_PLUS_2_W_INCLUDE_RP23XX_EXTRA_GPIO_H
-#define __BOARDS_ARM_RP23XX_PIMORONI_PICO_PLUS_2_W_INCLUDE_RP23XX_EXTRA_GPIO_H
-
-/****************************************************************************
- *  These functions control the GPIO pins on the CYW43439 wireless chip, not
- *  the GPIO pins of the RP2350.  The pin assignments for the Pimoroni Pico
- *  Plus 2 W are:
- *
- *  GPIO 0 - output - controls the onboard LED
- *  GPIO 1 - output - controls the onboard voltage regulator mode.
- *  GPIO 2 - input  - Reads as non-zero if power supplied by USB or VBUS pin.
- *
- *  These only work once the wireless chip has been activated, which happens
- *  when the wlan0 network interface is brought up.  Until then every access
- *  fails with -EIO.
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#ifndef __ASSEMBLY__
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <assert.h>
-#include <errno.h>
-
-#include <nuttx/wireless/ieee80211/bcmf_gpio.h>
-#include <nuttx/wireless/ieee80211/bcmf_gspi.h>
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#define RP23XX_EXTRA_GPIO_NUM    3     /* Number of extra GPIO pins */
-
-#define RP23XX_EXTRA_GPIO_LED    0     /* Onboard LED               */
-#define RP23XX_EXTRA_GPIO_VREG   1     /* Voltage regulator mode    */
-#define RP23XX_EXTRA_GPIO_VBUS   2     /* VBUS present              */
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-#if defined(__cplusplus)
-extern "C"
-{
-#endif
-
-extern gspi_dev_t *g_cyw43439;
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
- * Name: rp23xx_extra_gpio_put
- *
- * Description:
- *   Change the state of a GPIO pin on the CYW43439.
- *
- * Returned Value:
- *   OK on success, or a negated errno.  -EIO means the wireless chip is not
- *   running yet, which is the case until wlan0 has been brought up.
- *
- ****************************************************************************/
-
-static inline int rp23xx_extra_gpio_put(uint32_t gpio, bool value)
-{
-  DEBUGASSERT(gpio < RP23XX_EXTRA_GPIO_NUM);
-
-  if (g_cyw43439 == NULL)
-    {
-      return -EIO;
-    }
-
-  return bcmf_set_gpio(g_cyw43439->priv, gpio, value);
-}
-
-/****************************************************************************
- * Name: rp23xx_extra_gpio_get
- *
- * Description:
- *   Read the state of a GPIO pin on the CYW43439.
- *
- * Returned Value:
- *   OK on success, or a negated errno.  -EIO means the wireless chip is not
- *   running yet, which is the case until wlan0 has been brought up.
- *
- ****************************************************************************/
-
-static inline int rp23xx_extra_gpio_get(uint32_t gpio, bool *value)
-{
-  DEBUGASSERT(gpio < RP23XX_EXTRA_GPIO_NUM);
-
-  if (g_cyw43439 == NULL)
-    {
-      return -EIO;
-    }
-
-  return bcmf_get_gpio(g_cyw43439->priv, gpio, value);
-}
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* 
__BOARDS_ARM_RP23XX_PIMORONI_PICO_PLUS_2_W_INCLUDE_RP23XX_EXTRA_GPIO_H */
diff --git a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/CMakeLists.txt 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/CMakeLists.txt
index 9c6be9b7053..96bfd1afc97 100644
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/CMakeLists.txt
+++ b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/CMakeLists.txt
@@ -30,7 +30,8 @@ endif()
 # and reaching it means a gSPI bus transaction.  That rules out
 # CONFIG_ARCH_LEDS, whose board_autoled_on() is called from interrupt handlers
 # and from assertion handling, so there is no rp23xx_autoleds.c.  It also means
-# there is no LED at all without the wireless chip.  See rp23xx_userleds.c.
+# there is no LED at all without the wireless chip.  See
+# common/src/rp23xx_cyw43439_userleds.c.
 
 if(CONFIG_ARCH_LEDS)
   message(
@@ -40,10 +41,6 @@ if(CONFIG_ARCH_LEDS)
       "Use CONFIG_USERLED instead.")
 endif()
 
-if(CONFIG_RP23XX_INFINEON_CYW43439)
-  list(APPEND SRCS rp23xx_userleds.c)
-endif()
-
 if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS rp23xx_buttons.c)
 endif()
diff --git a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/Make.defs 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/Make.defs
index 782c88e149a..bb5b4cf3e32 100644
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/Make.defs
+++ b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/Make.defs
@@ -30,7 +30,7 @@ endif
 # CONFIG_ARCH_LEDS, whose board_autoled_on() is called from interrupt handlers
 # and from assertion handling, so there is no rp23xx_autoleds.c.  It also
 # means there is no LED at all without the wireless chip.
-# See src/rp23xx_userleds.c.
+# See common/src/rp23xx_cyw43439_userleds.c.
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 $(error CONFIG_ARCH_LEDS is not supported on this board: the LED hangs off \
@@ -38,10 +38,6 @@ $(error CONFIG_ARCH_LEDS is not supported on this board: the 
LED hangs off \
         Use CONFIG_USERLED instead)
 endif
 
-ifeq ($(CONFIG_RP23XX_INFINEON_CYW43439),y)
-CSRCS += rp23xx_userleds.c
-endif
-
 ifeq ($(CONFIG_ARCH_BUTTONS),y)
   CSRCS += rp23xx_buttons.c
 endif
diff --git 
a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_boardinitialize.c 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_boardinitialize.c
index dfba32a568d..763d8a8df5c 100644
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_boardinitialize.c
+++ b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_boardinitialize.c
@@ -70,7 +70,7 @@ void rp23xx_boardearlyinitialize(void)
 
   /* Nothing to do for the LED: it hangs off the CYW43439 wireless chip
    * rather than an RP2350 pin, and cannot be touched this early.  See
-   * src/rp23xx_userleds.c.
+   * common/src/rp23xx_cyw43439_userleds.c.
    */
 }
 
diff --git a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_pico.h 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_pico.h
index d3c656896d4..0a4362bfe31 100644
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_pico.h
+++ b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_pico.h
@@ -41,7 +41,7 @@
 /* LEDs
  *
  * The board's only LED hangs off GPIO 0 of the CYW43439, see
- * include/rp23xx_extra_gpio.h.  There is no LED on an RP2350 pin.
+ * common/include/rp23xx_extra_gpio.h.  There is no LED on an RP2350 pin.
  */
 
 /* Buttons */
diff --git a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_userleds.c 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_userleds.c
deleted file mode 100644
index 78981bb2cb3..00000000000
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_userleds.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
- * boards/arm/rp23xx/pimoroni-pico-plus-2-w/src/rp23xx_userleds.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * The single LED on this board is wired to GPIO 0 of the CYW43439 wireless
- * chip rather than to a pin of the RP2350, so setting it means sending an
- * iovar request over the gSPI bus.  Two consequences:
- *
- *   - The LED only responds once the wireless chip is running, which happens
- *     when wlan0 is brought up.  Before that every write fails with -EIO.
- *   - Writing the LED blocks, so it must not be done from interrupt context.
- *     That is why this board implements the user LED interface only and not
- *     the CONFIG_ARCH_LEDS auto-LED interface.
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <debug.h>
-
-#include <nuttx/board.h>
-#include <arch/board/board.h>
-#include <arch/board/rp23xx_extra_gpio.h>
-
-#if defined(CONFIG_RP23XX_INFINEON_CYW43439) && !defined(CONFIG_ARCH_LEDS)
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_userled_initialize
- ****************************************************************************/
-
-uint32_t board_userled_initialize(void)
-{
-  /* Nothing to configure -- the LED lives on the wireless chip, which the
-   * board bringup has already set up.
-   */
-
-  return BOARD_NLEDS;
-}
-
-/****************************************************************************
- * Name: board_userled
- ****************************************************************************/
-
-void board_userled(int led, bool ledon)
-{
-  if (led == BOARD_LED1)
-    {
-      int ret = rp23xx_extra_gpio_put(RP23XX_EXTRA_GPIO_LED, ledon);
-
-      if (ret < 0)
-        {
-          lederr("ERROR: cannot reach the LED on the CYW43439: %d\n", ret);
-        }
-    }
-}
-
-/****************************************************************************
- * Name: board_userled_all
- ****************************************************************************/
-
-void board_userled_all(uint32_t ledset)
-{
-  board_userled(BOARD_LED1, (ledset & BOARD_LED1_BIT) != 0);
-}
-
-#endif /* CONFIG_RP23XX_INFINEON_CYW43439 && !CONFIG_ARCH_LEDS */
diff --git a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/CMakeLists.txt 
b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/CMakeLists.txt
index 56aad5eede2..e236bae38a6 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/CMakeLists.txt
+++ b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/CMakeLists.txt
@@ -30,7 +30,8 @@ endif()
 # and reaching it means a gSPI bus transaction.  That rules out
 # CONFIG_ARCH_LEDS, whose board_autoled_on() is called from interrupt handlers
 # and from assertion handling, so there is no rp23xx_autoleds.c.  It also means
-# there is no LED at all without the wireless chip.  See rp23xx_userleds.c.
+# there is no LED at all without the wireless chip.  See
+# common/src/rp23xx_cyw43439_userleds.c.
 
 if(CONFIG_ARCH_LEDS)
   message(
@@ -40,10 +41,6 @@ if(CONFIG_ARCH_LEDS)
       "Use CONFIG_USERLED instead.")
 endif()
 
-if(CONFIG_RP23XX_INFINEON_CYW43439)
-  list(APPEND SRCS rp23xx_userleds.c)
-endif()
-
 # rp23xx_firmware.c, which carries the CYW43439 firmware blob, is built from
 # boards/arm/rp23xx/common/src.
 
diff --git a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/Make.defs 
b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/Make.defs
index a1d6a150de8..e98d49ee248 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/Make.defs
+++ b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/Make.defs
@@ -30,7 +30,7 @@ endif
 # CONFIG_ARCH_LEDS, whose board_autoled_on() is called from interrupt handlers
 # and from assertion handling, so there is no rp23xx_autoleds.c.  It also
 # means there is no LED at all without the wireless chip.
-# See src/rp23xx_userleds.c.
+# See common/src/rp23xx_cyw43439_userleds.c.
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 $(error CONFIG_ARCH_LEDS is not supported on this board: the LED hangs off \
@@ -38,10 +38,6 @@ $(error CONFIG_ARCH_LEDS is not supported on this board: the 
LED hangs off \
         Use CONFIG_USERLED instead)
 endif
 
-ifeq ($(CONFIG_RP23XX_INFINEON_CYW43439),y)
-CSRCS += rp23xx_userleds.c
-endif
-
 DEPPATH += --dep-path board
 VPATH += :board
 CFLAGS += 
${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git 
a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_boardinitialize.c 
b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_boardinitialize.c
index f77454f6077..7de0d9da6ff 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_boardinitialize.c
+++ b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_boardinitialize.c
@@ -70,7 +70,7 @@ void rp23xx_boardearlyinitialize(void)
 
   /* Nothing to do for the LED: it hangs off the CYW43439 wireless chip
    * rather than an RP2350 pin, and cannot be touched this early.  See
-   * src/rp23xx_userleds.c.
+   * common/src/rp23xx_cyw43439_userleds.c.
    */
 }
 
diff --git a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_pico.h 
b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_pico.h
index 5df23d2f243..a4acd462081 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_pico.h
+++ b/boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_pico.h
@@ -41,7 +41,7 @@
 /* LEDs
  *
  * The board's only LED hangs off GPIO 0 of the CYW43439, see
- * include/rp23xx_extra_gpio.h.  There is no LED on an RP2350 pin.
+ * common/include/rp23xx_extra_gpio.h.  There is no LED on an RP2350 pin.
  */
 
 int rp23xx_bringup(void);

Reply via email to