From nobody Tue Feb 10 02:27:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) client-ip=209.85.128.53; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f53.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1623879784; cv=none; d=zohomail.com; s=zohoarc; b=XP0psEvb2ja+B2wC2QHiAf76Iwp+sps8rxmKWDcmQFc8Ze4jTondcCrYsM+KSR3G4o2Gm+HLvWZbMkxMvOC3F6W5tVG+rG9AtNbNxVoOUuRXK3C6txmEws4KgSKM8IsMj9wZeYuc+5EzRRVK2c9bu6S0cBTMzBVsxonYl1cuHhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623879784; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZVPBTnPyrwKkWmxUGbbjqq6/7nF/87IireIxXO+4BKk=; b=JSUuwqoImU4CT1yV1Lnj7A8vY7LLMtnWEG+bWxY0LUnteVdXXgKWb26EUXE5+Ux3k5NkTbGIrisGgxqOT3XycAG6CmyuOTcDB9CRCp9eks0gxZ4Q/1KKLA3rO+18g7NQyCraEFpLVfhJvqbwRIMyitILr1d6v8ByRhp6BMvaOOI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.zohomail.com with SMTPS id 1623879784569845.8278501968526; Wed, 16 Jun 2021 14:43:04 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id h22-20020a05600c3516b02901a826f84095so2441715wmq.5 for ; Wed, 16 Jun 2021 14:43:04 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id g17sm4428892wrh.72.2021.06.16.14.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 14:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZVPBTnPyrwKkWmxUGbbjqq6/7nF/87IireIxXO+4BKk=; b=a6HLvyeOUy+kdQJDm54TvJdrTKORiDn1Vgjl/okbW+FMU0F4ryh79m4t9uM02NYW9D Hw0Ib8djFZ36BUMaEZPK6PR0T++uVa2l01ogpeuNqPrLIrizgVnZh/Vw8CF2OipK6xtk xeFgd0oxFQTnVCLcDx4aNdv0lIx2D9bjK14pRZKmucOltdA7Sp5mqma+QVGxbgG++Vfe 7EXYk0KeQYLZYIStcGY3hloSd7qHoCBoFfQqXf3hG7u6YBzyrXGz6BzQH1za2PnUtfXE ojMNL3/h3wjnKcCm0DBmdEPllRHaeJO9j5rHsByvlt5w2FHcedZCqf12ymhQxfNAogDM zfHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZVPBTnPyrwKkWmxUGbbjqq6/7nF/87IireIxXO+4BKk=; b=TfZYQa0AdBqFD2F//x9yUJEsdpxpZoPVSYOYsiOD6z8H1iFd33lIROZr9Ti4Bm/l2D cpBIU1t0YOnMGIJ1QbpoWiWleuuGr7/DjwhRXp8c9WFmYEVEc5RnZ9uqjXlE2tuhXVcI Ct6mE7Phg3KK6vSiyfLAOPe1RQFeDN2kBsRjGBaQdK8BNf5o50UT1qxoDRsRwYoVXrJT ZEzgLweqvQYoEP9DnUELpOvuD7qhDrPeWN2zLA84Xml9gAapYbdD/q+T4774vLdcBGiO /1HoR0cYk4peyAKsRCSxU9pn4QWpmOPRBHyp1M4bOeQL8Q3atOss53cJ7JC1gRBhJ4oJ x6zw== X-Gm-Message-State: AOAM5314euk4/RQSsgYnVNmk+wXUcTCYyyimQdiJKDEVHSecxufBe92z qAYZ4eZUWzm2JXBA9C6M7JQ= X-Google-Smtp-Source: ABdhPJxDm1dB+Ts5oJwgx63IQ/f09wKmyQ8DWgjVVYEAgV31pVUY4vyLW7cqfztS27Hx0XK8De4WVw== X-Received: by 2002:a05:600c:4a29:: with SMTP id c41mr1118056wmp.17.1623879782815; Wed, 16 Jun 2021 14:43:02 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Corey Minyard , qemu-ppc@nongnu.org, BALATON Zoltan , qemu-arm@nongnu.org, KONRAD Frederic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v4 01/15] hw/input/lm832x: Move lm832x_key_event() declaration to "lm832x.h" Date: Wed, 16 Jun 2021 23:42:40 +0200 Message-Id: <20210616214254.2647796-2-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210616214254.2647796-1-f4bug@amsat.org> References: <20210616214254.2647796-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) lm832x_key_event() is specific go LM832x devices, not to the I2C bus API. Move it out of "i2c.h" to a new header. Reviewed-by: Richard Henderson Acked-by: Corey Minyard Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/i2c/i2c.h | 3 --- include/hw/input/lm832x.h | 26 ++++++++++++++++++++++++++ hw/arm/nseries.c | 1 + hw/input/lm832x.c | 1 + MAINTAINERS | 1 + 5 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 include/hw/input/lm832x.h diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h index ff4129ea704..850815e707c 100644 --- a/include/hw/i2c/i2c.h +++ b/include/hw/i2c/i2c.h @@ -142,9 +142,6 @@ I2CSlave *i2c_slave_create_simple(I2CBus *bus, const ch= ar *name, uint8_t addr); */ bool i2c_slave_realize_and_unref(I2CSlave *dev, I2CBus *bus, Error **errp); =20 -/* lm832x.c */ -void lm832x_key_event(DeviceState *dev, int key, int state); - extern const VMStateDescription vmstate_i2c_slave; =20 #define VMSTATE_I2C_SLAVE(_field, _state) { \ diff --git a/include/hw/input/lm832x.h b/include/hw/input/lm832x.h new file mode 100644 index 00000000000..f47e579ff90 --- /dev/null +++ b/include/hw/input/lm832x.h @@ -0,0 +1,26 @@ +/* + * National Semiconductor LM8322/8323 GPIO keyboard & PWM chips. + * + * Copyright (C) 2008 Nokia Corporation + * Written by Andrzej Zaborowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 or + * (at your option) version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#ifndef HW_INPUT_LM832X +#define HW_INPUT_LM832X + +void lm832x_key_event(DeviceState *dev, int key, int state); + +#endif diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 0aefa5d0f3e..7b82b8682e8 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -34,6 +34,7 @@ #include "hw/boards.h" #include "hw/i2c/i2c.h" #include "hw/display/blizzard.h" +#include "hw/input/lm832x.h" #include "hw/input/tsc2xxx.h" #include "hw/misc/cbus.h" #include "hw/misc/tmp105.h" diff --git a/hw/input/lm832x.c b/hw/input/lm832x.c index 4cb1e9de01f..d2b92b457e3 100644 --- a/hw/input/lm832x.c +++ b/hw/input/lm832x.c @@ -19,6 +19,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/input/lm832x.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" #include "migration/vmstate.h" diff --git a/MAINTAINERS b/MAINTAINERS index 636bf2f5365..c56bc112ccf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -792,6 +792,7 @@ F: hw/input/tsc2005.c F: hw/misc/cbus.c F: hw/rtc/twl92230.c F: include/hw/display/blizzard.h +F: include/hw/input/lm832x.h F: include/hw/input/tsc2xxx.h F: include/hw/misc/cbus.h F: tests/acceptance/machine_arm_n8x0.py --=20 2.31.1