cederom commented on code in PR #16869:
URL: https://github.com/apache/nuttx/pull/16869#discussion_r2287916101


##########
boards/arm/rp2040/common/src/rp2040_common_bringup.c:
##########
@@ -478,17 +482,21 @@ int rp2040_common_bringup(void)
     {
       syslog(LOG_ERR, "Failed to initialize SPI bus 0\n");
     }
-
-  struct adc_dev_s *mcp3008 = mcp3008_initialize(spi);
-  if (mcp3008 == NULL)
-    {
-      syslog(LOG_ERR, "Failed to initialize MCP3008\n");
-    }
-
-  ret = adc_register("/dev/adc1", mcp3008);
-  if (ret < 0)
+  else
     {
-      syslog(LOG_ERR, "Failed to register MCP3008 device driver: %d\n", ret);
+      struct adc_dev_s *mcp3008 = mcp3008_initialize(spi);

Review Comment:
   this actually may be a good idea to remove external ic specific code from 
common rp2040 initialization code.. users may want to add it to their 
application :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to