From patchwork Tue Feb 8 15:59:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 540799 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp661038imo; Tue, 8 Feb 2022 09:11:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrT5HhzmV5A5tJl6hFSIcyqbysBO9lqcM2GstWQyBFsLeN3I9GAkuieq2GnuJza2TsLUal X-Received: by 2002:a25:5050:: with SMTP id e77mr5540049ybb.647.1644340291419; Tue, 08 Feb 2022 09:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644340291; cv=none; d=google.com; s=arc-20160816; b=zlAgkIcWdV67KK5Um96yuAuSbyBp9RSO9t/62ukEnl5h3zHuvEhHhBXdZMEZxfWvz3 wEDcvkVr4YkEnTA0jAc4MrsTyI2Ul2NZP0c1xBJ63vgvCibCjkuYZq1qaYEUBQmDfMnF sqOW5OZYZy8BDOnrmZ+rjxxEcqna0uO8MR6kvTx0QMPduS3RpyVFgEFwF9j0ZzNqIBr7 D2mbfdNFzDqY4VVrWVQgWW1+QEopajNnVkkxJsGo3AFK3Mpx2OK6ftblko/Wz0TadfaU EspXQXuoPEoANJVQoYL1QpfddJzHHYEBGe+/daDCWA7FbWeK9lLuolVW1NxDpk0/ISzM rrcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=e1F3cyiPfCm2qK9gtGdMvd6m3L6XeAhMZslq6HsdFCI=; b=ZOS7IGa1aZzO/1mBflhvbB+5kYftp7YNcvuYr8WnK4QxnTrrn08nWpeJ/hzrs0/BMw nlOFNPGKvi1V3nSqPCvszwTjvxuuUNwLNebnIdeEzu1cWg5+TkxsjzVDABP8ACsgFJtH DzWXo1b2z1OvlswXRUTp6MTgtPZtoc+nFBxg5+UObjXr6b0Is8wkIC8kR4Cd0c+Hn0nk QnoDGBGsnLG4xR9H6Pks6OmQJEvfhokMwKYB6v1o/O5mUeDuJeJALV87EbxZXXqcacgN cgfQitI/Ox6GqEKHbxEKkODbE/Mu9T6VT++AU3rMkp+B749ai0frhkCp3e9DgvSQ6q5J GTVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kbJdx77z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v9si10713670ybq.11.2022.02.08.09.11.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Feb 2022 09:11:31 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kbJdx77z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHU1a-0002CS-RJ for patch@linaro.org; Tue, 08 Feb 2022 12:11:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHStr-0008MP-Ox for qemu-devel@nongnu.org; Tue, 08 Feb 2022 10:59:27 -0500 Received: from [2a00:1450:4864:20::42e] (port=46723 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHSto-0006Cv-9R for qemu-devel@nongnu.org; Tue, 08 Feb 2022 10:59:27 -0500 Received: by mail-wr1-x42e.google.com with SMTP id q7so3425413wrc.13 for ; Tue, 08 Feb 2022 07:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e1F3cyiPfCm2qK9gtGdMvd6m3L6XeAhMZslq6HsdFCI=; b=kbJdx77zrg5OTfkhsZOWHlrxyxfWnozCkf3Br1fkSVC/lQwu6FSxUSHtD30BBDcq/2 XXWPqPmqGfJfvnVkIyqgwSiGN7sAAOZvh19oGy2uXc8cnXjw7nzutwKXQpywoED2+5Bn ltW6vTfiRDvGeMdq6CWiVmG1lJDmX+BpweJqQ4kzqXp40+EQE5AEN0A57CjTvyWBjD+V wPaBDeABxt68+tc5nB7I45+nG5MZiBfcL3IBCbbYLx1UKC+mShlaY9Y75Dnup8R5yzil KVkWPDgwahWsVi+ZtL697SRMOfK2IWH+G5k9n3Wjv5vvFRQxLFTuTfxekz3lXTZlgZNY 1V0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=e1F3cyiPfCm2qK9gtGdMvd6m3L6XeAhMZslq6HsdFCI=; b=xmSkH88jKJ4N85o2UKP1wnCdWMgnS/+zvrKX7wx+Fu0ynt/0sjEWHlgvnuWOXrc6tN IhS+1sNaL7ER3+kXfBYxqPY3p0ukMiZRA/kWm3WrLDp/2g6ZsJ9omyh5yYkb7RS2BsJ/ MAKDjwlizrMAHqYIHBwgydo8TC7U4N9I+JgZRdoWYd2VewMjlqcXAXF4PEJesD2dRatg VH82YTlhzP3atCWNA8tOhFg2CuToY47ToYK3Rw7pMnP70+spTbahVyUukB0CRErXEo3e mNHovvKWbNhq1RdCq2oZXp2rH6WYo+o+UgNKwSz+2rYrHfFpG+kvtuUt6oA7srZuPdDj goRg== X-Gm-Message-State: AOAM531zaJHtEbMteq6J8Ud7Tx8GWNTQE3FyEX7UqGGsOhG6fUS/6BKT WsuMt6al+5R3QExH5ASqUpqEUA== X-Received: by 2002:adf:d183:: with SMTP id v3mr4112237wrc.538.1644335953474; Tue, 08 Feb 2022 07:59:13 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id f5sm14805125wry.64.2022.02.08.07.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 07:59:13 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 0/2] Kconfig: Add an I2C_DEVICES device group Date: Tue, 8 Feb 2022 15:59:09 +0000 Message-Id: <20220208155911.3408455-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Kevin Townsend Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This patchset adds a new Kconfig "device group" for I2C devices which a user might reasonably want to plug in to an arbitrary i2c bus via the command line. This follows the approach we use for PCI devices: generally-usable i2c devices have default y if I2C_DEVICES and board models with user-accessible i2c buses have imply I2C_DEVICES This means that when building a board model that pulls in the device group, the devices are all compiled in and available for use. (Previously they would happen to be present and usable only if some other board that explicitly pulled that device in happened to also be built into the same QEMU binary.) I have been fairly conservative in marking devices as being in the group and in marking board models as pulling in the group; feel free to suggest changes. In particular I've only added 'imply I2C_DEVICES' to arm boards. Grepping through Kconfig files I only found the PPC boards e500 and ppc44x that enable some kind of i2c controller anyway. The immediate motivation here is that the recently added lsm303dlhc magnetometer isn't currently built unless the user manually adds it to their config, because as it happens no boards have it as a hard-wired device. thanks -- PMM Peter Maydell (2): Kconfig: Add I2C_DEVICES device group Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus docs/devel/kconfig.rst | 8 ++++++-- hw/arm/Kconfig | 10 ++++++++++ hw/i2c/Kconfig | 5 +++++ hw/rtc/Kconfig | 2 ++ hw/sensor/Kconfig | 5 +++++ 5 files changed, 28 insertions(+), 2 deletions(-) Acked-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé