From nobody Mon Feb 9 06:27:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1561031775; cv=none; d=zoho.com; s=zohoarc; b=Qm4/HOJ+HJySaqYkOxQZ1xDYOT0cB0peQ6yC4tqNkqNLOysL1jaLXs6vBC+NG9LJZkP/8FNaN5hcY35dg2L/IUNHaTi5oSLg05xVbJRajO2iaDc+jQGZ7mV4Epj7jI928GJtJ9GNHJNoxOG3eL0WipgJU5/YTdKpWe7dBJEXixg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561031775; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=H3ek1kq1gvYABez02yGF/9dRrfgfltGWS4Gi+BhbkbU=; b=P+E5HCTe2AYuNOkqVUkg3ZXqTE0bauy+PRzZ3x1XZf+LAP1RLSbgSmDM+C/RXPrzrxy9NQ76vjOVwUIjd64fOuFaouDWGT7a4hhcJQq5dr5eLhBPfH6ieJ/bvdlkL3KXHJduZdqaoLUEz6GRM5aU/iTV3+4JQfysrrqjp+bIyuU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156103177521618.11296817145444; Thu, 20 Jun 2019 04:56:15 -0700 (PDT) Received: from localhost ([::1]:46630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdvfp-0005yo-Vn for importer@patchew.org; Thu, 20 Jun 2019 07:56:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55253) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdvYZ-00089o-LX for qemu-devel@nongnu.org; Thu, 20 Jun 2019 07:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdvT5-0000BF-IO for qemu-devel@nongnu.org; Thu, 20 Jun 2019 07:43:04 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:12612) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hduqT-0008R8-Lg for qemu-devel@nongnu.org; Thu, 20 Jun 2019 07:03:09 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id E933C746392; Thu, 20 Jun 2019 13:02:49 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 5E7907461AE; Thu, 20 Jun 2019 13:02:49 +0200 (CEST) Message-Id: <5d1fe4db846ab9be4b77ddb0d43cc74cd200a003.1561028123.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Date: Thu, 20 Jun 2019 12:55:23 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 Subject: [Qemu-devel] [PATCH v5 1/2] i2c: Move bitbang_i2c.h to include/hw/i2c/ X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The bitbang i2c implementation is also useful for other device models such as DDC in display controllers. Move the header to include/hw/i2c/ to allow it to be used from other device models and adjust users of this include. This also reverts commit 2b4c1125ac which is no longer needed. Signed-off-by: BALATON Zoltan Acked-by: Corey Minyard Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- hw/i2c/bitbang_i2c.c | 2 +- hw/i2c/ppc4xx_i2c.c | 1 - hw/i2c/versatile_i2c.c | 2 +- {hw =3D> include/hw}/i2c/bitbang_i2c.h | 2 ++ include/hw/i2c/i2c.h | 2 -- include/hw/i2c/ppc4xx_i2c.h | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) rename {hw =3D> include/hw}/i2c/bitbang_i2c.h (80%) diff --git a/hw/i2c/bitbang_i2c.c b/hw/i2c/bitbang_i2c.c index 5dfc72d9d7..3cb0509b02 100644 --- a/hw/i2c/bitbang_i2c.c +++ b/hw/i2c/bitbang_i2c.c @@ -12,7 +12,7 @@ =20 #include "qemu/osdep.h" #include "hw/hw.h" -#include "bitbang_i2c.h" +#include "hw/i2c/bitbang_i2c.h" #include "hw/sysbus.h" #include "qemu/module.h" =20 diff --git a/hw/i2c/ppc4xx_i2c.c b/hw/i2c/ppc4xx_i2c.c index d606d3dbeb..5fb4f86c38 100644 --- a/hw/i2c/ppc4xx_i2c.c +++ b/hw/i2c/ppc4xx_i2c.c @@ -30,7 +30,6 @@ #include "cpu.h" #include "hw/hw.h" #include "hw/i2c/ppc4xx_i2c.h" -#include "bitbang_i2c.h" =20 #define PPC4xx_I2C_MEM_SIZE 18 =20 diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index e07be9890c..24b6e36b6d 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -23,7 +23,7 @@ =20 #include "qemu/osdep.h" #include "hw/sysbus.h" -#include "bitbang_i2c.h" +#include "hw/i2c/bitbang_i2c.h" #include "qemu/log.h" #include "qemu/module.h" =20 diff --git a/hw/i2c/bitbang_i2c.h b/include/hw/i2c/bitbang_i2c.h similarity index 80% rename from hw/i2c/bitbang_i2c.h rename to include/hw/i2c/bitbang_i2c.h index 9443021710..3a7126d5de 100644 --- a/hw/i2c/bitbang_i2c.h +++ b/include/hw/i2c/bitbang_i2c.h @@ -3,6 +3,8 @@ =20 #include "hw/i2c/i2c.h" =20 +typedef struct bitbang_i2c_interface bitbang_i2c_interface; + #define BITBANG_I2C_SDA 0 #define BITBANG_I2C_SCL 1 =20 diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h index 8e236f7bb4..75c5bd638b 100644 --- a/include/hw/i2c/i2c.h +++ b/include/hw/i2c/i2c.h @@ -81,8 +81,6 @@ uint8_t i2c_recv(I2CBus *bus); =20 DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr); =20 -typedef struct bitbang_i2c_interface bitbang_i2c_interface; - /* lm832x.c */ void lm832x_key_event(DeviceState *dev, int key, int state); =20 diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h index aa2a2bf9de..8437bf070b 100644 --- a/include/hw/i2c/ppc4xx_i2c.h +++ b/include/hw/i2c/ppc4xx_i2c.h @@ -28,7 +28,7 @@ #define PPC4XX_I2C_H =20 #include "hw/sysbus.h" -#include "hw/i2c/i2c.h" +#include "hw/i2c/bitbang_i2c.h" =20 #define TYPE_PPC4xx_I2C "ppc4xx-i2c" #define PPC4xx_I2C(obj) OBJECT_CHECK(PPC4xxI2CState, (obj), TYPE_PPC4xx_I2= C) --=20 2.13.7