Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EAEDC61DA4 for ; Wed, 22 Feb 2023 16:42:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2F25F85B58; Wed, 22 Feb 2023 17:37:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Gi3K8+UY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 67A3A85B19; Wed, 22 Feb 2023 17:35:56 +0100 (CET) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 09D0185B23 for ; Wed, 22 Feb 2023 17:35:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd29.google.com with SMTP id y140so4015121iof.6 for ; Wed, 22 Feb 2023 08:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jdbe1DijsYVoBjdGXBIYXtZHLsUEuZe9BiGv2HhdiP4=; b=Gi3K8+UYx1eHOK8HjGBSbEYbIWikFPn5w6bQY5z2zqEjFKGajaC1QAf86ncRc58wVq 6mfaXzKIngLjlrwMJ5fMdd08F0j18o7ljNCxaBmdm/ouisCw3eWIPK+87XE4KpPzNxSd yJV9YeiLPdpVpYmovQkDPttj9C/VcHPUCIkJg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jdbe1DijsYVoBjdGXBIYXtZHLsUEuZe9BiGv2HhdiP4=; b=j38eV7gZQpDWEDyvLsOLqkZT+RdecjuFCXiCVJXYIbzxxezeKlWOZ2sIHIlGwgjsJZ SHg3uTAQjYbsiVRZkZmNDBg4oeL7aBq2W9mke0sDil4IFa804L5kyjkASnF+KlCnFPL1 EolVnz3OWCSgToCtIgSdztETnqE70LbuUH2866fyYjCxxVoV5m6xgdH6zwVlkCt2bsrf 9Gym1W2PW8mpmyqMgNLV8LHuFNFtTUppbHtFs19P6h1LijqQo+Rd1IEj2UtCKsc95UHI PtaiG7S6xnMXrRuFqd3dL+TuSzk2xlAf4u2F2lmbL1YUz246HPOEAzwOorGnXvFFcbZW Ki5Q== X-Gm-Message-State: AO0yUKWWb3ET5b0KLbpgh6aIK/c1/+JS+HRB9qP2jDciWX/5CWGpYXb6 FJtSi5gnUkap6KYF6fDlVKTIXtDsdlh66C5A X-Google-Smtp-Source: AK7set8o4tDxjYIpnOHUwIcRK9nXNg2rxPURKXoIqC6G2LCN+xKCmMSIQgi1ySeHLZmvnHqzGQeInA== X-Received: by 2002:a5d:8548:0:b0:71f:2e0b:5c64 with SMTP id b8-20020a5d8548000000b0071f2e0b5c64mr1257988ios.3.1677083703354; Wed, 22 Feb 2023 08:35:03 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id z26-20020a056602005a00b00716eb44b97esm2164541ioz.27.2023.02.22.08.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 08:35:02 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heiko Schocher Subject: [PATCH v5 25/44] sandbox: Tidy up I2C options Date: Wed, 22 Feb 2023 09:34:06 -0700 Message-Id: <20230222163425.2043934-26-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230222163425.2043934-1-sjg@chromium.org> References: <20230222163425.2043934-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean At present we enable the sandbox I2C driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass --- (no changes since v1) drivers/i2c/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 3279fef1eb0..1077c331c30 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -47,6 +47,16 @@ config SPL_DM_I2C device (bus child) info is kept as parent platdata. The interface is defined in include/i2c.h. +config TPL_DM_I2C + bool "Enable Driver Model for I2C drivers in TPL" + depends on TPL_DM && DM_I2C + help + Enable driver model for I2C. The I2C uclass interface: probe, read, + write and speed, is implemented with the bus drivers operations, + which provide methods for bus setting and data transfer. Each chip + device (bus child) info is kept as parent platdata. The interface + is defined in include/i2c.h. + config VPL_DM_I2C bool "Enable Driver Model for I2C drivers in VPL" depends on VPL_DM && DM_I2C @@ -508,6 +518,16 @@ config SYS_I2C_ROCKCHIP config SYS_I2C_SANDBOX bool "Sandbox I2C driver" depends on SANDBOX && DM_I2C + default y + help + Enable I2C support for sandbox. This is an emulation of a real I2C + bus. Devices can be attached to the bus using the device tree + which specifies the driver to use. See sandbox.dts as an example. + +config SPL_SYS_I2C_SANDBOX + bool "Sandbox I2C driver (SPL)" + depends on SPL && SANDBOX && DM_I2C + default y help Enable I2C support for sandbox. This is an emulation of a real I2C bus. Devices can be attached to the bus using the device tree -- 2.39.2.637.g21b0678d19-goog