Commit graph

7 commits

Author SHA1 Message Date
Kumar Gala dc3e86e7dc drivers: i2c: Update drivers to use devicetree Kconfig symbol
Update i2c drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-28 16:12:43 -05:00
Kumar Gala 287acdbb9d i2c: sam0: Set driver Kconfig default based on devicetree
Change Kconfig default to be based on if the devicetree has the
atmel,i2c-sam0 driver enabled.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-01 15:05:55 -05:00
Gerard Marull-Paretas 95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Ulf Magnusson 378d6b137a kconfig: Replace non-defconfig single-symbol 'if's with 'depends on'
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.

Will do the defconfigs separately in case there are any complaints
there.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-12 10:32:34 -06:00
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
Kumar Gala 669e0f3b32 i2c: Move how we set HAS_DTS_I2C
Now that all I2C drivers utilize DTS we can select HAS_DTS_I2C in a
common place and don't need to do it per driver.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-10-23 11:31:32 -05:00
Derek Hageman 46730e1f57 drivers: i2c: Add SAM0 I2C driver
This adds a SERCOM I2C driver for SAM0 series chips.

Tested with a SAMD21 chip on a SSD1306 display and a MLX90393
sensor.  Only compile tested for SAMD20 and SAMR21.

Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-05-07 08:42:24 -04:00