Introduce a Kconfig variable that the SoC can set to indicate the number of instances in Device Tree. This also fixes the accuracy of the Elkhart Lake instance count where the code was previously assuming up to 12 instances even though DT lists 15 nodes. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
29 lines
575 B
Plaintext
29 lines
575 B
Plaintext
# Copyright (c) 2018 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# This option signifies whether DesignWare I2C compatible HW is
|
|
# available
|
|
config HAS_I2C_DW
|
|
bool
|
|
|
|
menuconfig I2C_DW
|
|
bool "Design Ware I2C support"
|
|
depends on HAS_I2C_DW
|
|
help
|
|
Enable the Design Ware I2C driver
|
|
|
|
if I2C_DW
|
|
|
|
config I2C_DW_CLOCK_SPEED
|
|
int "Set the clock speed for I2C"
|
|
default 32
|
|
|
|
config I2C_DW_MAX_INSTANCES
|
|
int "Maximum number of supported driver instances"
|
|
range 1 32
|
|
default 12
|
|
help
|
|
The maximum number of supported driver instances in device tree.
|
|
|
|
endif # I2C_DW
|