gustavonihei commented on pull request #3475:
URL: https://github.com/apache/incubator-nuttx/pull/3475#issuecomment-815300125


   > I think that I tried to enforce was to include the name of the directory 
where a configuration is defined OR part of the name of the configuration that 
enables this one. You will see that most but not all configurations follow this 
convention. CONFIG_INPUT, for example, does not. Per that convention, it should 
be CONFIG_DRIVERS_INPUT. Then all of the top level configurations defined in 
that directory should be CONFIG_INPUT_*. So for example, CONFIG_TOUCHSCREEN 
should be CONFIG_INPUT_TOUCHSCREEN.
   > 
   > This has the advantage that (1) by the name of the configuration, you 
(usually) know which Konfig file it is defined in and (2) it prevents 
configuration naming collisions. Kconfig variable name collisions are 
especially nasty because usually not error is generated when the redundant 
names are used.
   
   I usually find myself spending some time to discover where a given config is 
defined, so I agree that we can improve this with a convention. 
   Although it may not reflect the directory structure, I believe that 
following the CONFIG_<SUBSYSTEM>_* template is more intuitive, like 
`CONFIG_INPUT_*` and `CONFIG_NX_*`. 
   Drivers could be classified as SUBSYSTEM, so we'd have 
`CONFIG_DRIVERS_<CLASS>_`. As an example, `MAX11802` could be redefined as 
`CONFIG_DRIVERS_INPUT_MAX11802`.
   It will be a big refactor of our Kconfig system.


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to