Commit graph

5 commits

Author SHA1 Message Date
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson 46c19ff18f kconfig: drivers: pwm: Remove redundant deps.
drivers/pwm/Kconfig.esp32 is 'source'd within an 'if PWM' in
drivers/pwm/Kconfig.

'if FOO' is just shorthand for adding 'depends on FOO' to each item
within the 'if'. Dependencies on menus work similarly. There are no
"conditional includes" in Kconfig, so 'if FOO' has no special meaning
around a source. Conditional includes wouldn't be possible, because an
if condition could include (directly or indirectly) forward references
to symbols not defined yet.

Tip: When adding a symbol, check its dependencies in the menuconfig
('ninja menuconfig', then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-09 10:04:19 -05:00
Ulf Magnusson f46e391f06 kconfig: pwm: Remove redundant deps. and clean up a bit
- Remove redundant dependencies on the PWM symbol (which show up as
   PWM && PWM in the documentation). The 'source's in
   drivers/pwm/Kconfig are already within an 'if PWM' block.

 - Turn some repeated 'depends on FOO' into 'if FOO' blocks.

 - Turn some 'if FOO's that surround a single symbol into
   'depends on FOO'.

'if FOO' is equivalent to adding a 'depends on FOO' to each symbol
within the 'if'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-01 13:50:06 -06:00
Ulf Magnusson f30b163624 drivers: pwm: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though, and is
inconsistent.

This will make the auto-generated Kconfig documentation have "No
defaults. Implicitly defaults to n." as well, which is clearer than
'default n if ...'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-03 17:11:31 -04:00
Vitor Massaru Iha fbaddfb079 drivers: pwm: Add PWM LED driver for ESP32
This is a initial support for PWM LED controller on ESP32.

Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
2018-02-23 13:13:12 -05:00