You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/12/04 09:52:35 UTC

[GitHub] kasjer commented on a change in pull request #1541: adp5061: Make charge_control dependency optional

kasjer commented on a change in pull request #1541: adp5061: Make charge_control dependency optional
URL: https://github.com/apache/mynewt-core/pull/1541#discussion_r238591966
 
 

 ##########
 File path: hw/drivers/chg_ctrl/adp5061/include/adp5061/adp5061.h
 ##########
 @@ -49,10 +51,13 @@ struct adp5061_config {
 struct adp5061_dev {
 #if MYNEWT_VAL(BUS_DRIVER_PRESENT)
     struct bus_i2c_node     a_node;
+#if MYNEWT_VAL(ADP5061_USE_CHARGE_CONTROL)
+    struct charge_control   a_chg_ctrl;
+#endif
 #else
     struct os_dev           a_dev;
-#endif
     struct charge_control   a_chg_ctrl;
 
 Review comment:
   No, but a_chg_ctrl has cc_itf filed that is used for addressing, type of interface is also defined in charge_control so there is dependency to package and as you noticed, but charge control integration can be disabled, meaning that driver will not register to it.
   This is result of having i2c/spi interface settings scattered in different places (sensor/charger maybe more).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services