From patchwork Fri Jan 13 14:11:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 641952 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp231247pvb; Fri, 13 Jan 2023 06:23:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXvUVy4a5ooJo1G1pMEK9SfcT6v2YygZ4XxwLNOQNlZuF0+niNJtoB+wR+GKkZZGS/Q4+XZu X-Received: by 2002:a05:6214:842:b0:520:e57b:191d with SMTP id dg2-20020a056214084200b00520e57b191dmr101614668qvb.15.1673619834107; Fri, 13 Jan 2023 06:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673619834; cv=none; d=google.com; s=arc-20160816; b=zuogAVQmsTZPn2I/v6wqYTbw2GqF7FYOxgPFL8dKEkjTHyhdqL4kRJv/jSnCz07ryU fZRB3GKI8CdfiRxNwGXlk0hOMI3HwfOKjHZ/EHfaYueIZ34vQUwjsE2azhQntkW8iAT9 FxdqV0KHqWNZMXdYmiWad3n+OrHYEEDIkLV8oDPZZRv7IpcqjhPcj4xW3HN9E28nkzDG JIkUJOrWg4sMzNVql8QVHKz4FxEzmTzarS3QVbEsU1Ga282jilWn2YNycCZ1FPBV7bkb usXwepoNoXo1jQKam9MFk71fFPHoKU2CBfa/HL2WN/ZsjGFRs/NsvNRHqyiS4NAMdpKI fCNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WJ1ThggjatfCXo15B2y0aj5bS7HJIrmU1S8g9Lpjo5s=; b=Hi6clVdjXZmA/eNtqyZrxIca50cg4aceArinnhdfi2WRN114ghAsZKuB3QFvGzVCI9 y6eBiqxOOg0BoZPzmh15w6spqgAuKe2vfkbdRXtWsDLP7nWgry7XKxTnmvzA5WeAMg3q hRY2p7MF1sbGprJmA5PivCcElJXenRNZ4l/LqIs8TvcDDyMY+OXuUvdQ6NRTJVH5sGoJ Tb/rD562WdobCjmXGR3e6L7SvGiiJN6wy7hW6jpljeBibH0eRw43Rztq+16qBXZAPWoT RghoM4ALd2DNIiGcVwwN7UoC5UKGawsATtNe1SAPk2O10zj46yr/ZbS8U4BNPBkhs13Y NoVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o9spxJVx; 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 ESMTP id o12-20020a0562140e4c00b005320ab19915si12580336qvc.550.2023.01.13.06.23.53 for ; Fri, 13 Jan 2023 06:23:54 -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=o9spxJVx; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGKnH-0001UR-EQ; Fri, 13 Jan 2023 09:12:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGKml-00012v-RX for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:11:59 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGKmh-0003p7-8s for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:11:59 -0500 Received: by mail-wm1-x334.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so14041865wma.1 for ; Fri, 13 Jan 2023 06:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WJ1ThggjatfCXo15B2y0aj5bS7HJIrmU1S8g9Lpjo5s=; b=o9spxJVxdnIAuLjl0Slpol8qx1XwC2mnrmDZRPjnPMBJ/kiYuGs44dJIhTJVINMwso RzR++i+ueDbRJKlD1iU6yb7qynP+80PpAp9J1Q00rVqAB0VHoE8tUMIGL4FC2XYsn3qg GtmG1EtgpQwrVCz807MQtcs0tNTzdazwmejEiVQHG+w1Lv/1cYIFD9WqlXG0Hgek87h4 HAEWhk6itD38g+ZJHH1zBgMBc045sYblW/1mPICc8iILkD1vt8su9Kq5MXHEcYRMfSMH rZqDZN8pBthl9clFCYm+M7KkNnw9tJJb1TGKFL3FpR0iyfo+e7z8M38CQFMUog1GPrGo +EwA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WJ1ThggjatfCXo15B2y0aj5bS7HJIrmU1S8g9Lpjo5s=; b=ZJQBL+Y2oS8lAo7BLjCqjVZlpz8DpaUF7IVrBv2xMC2CWCEy/sTFQPFgr0GiE8KpFt pLKz/ewPgFJ/H+5NHWKtwZeBEmUFG5Nayqx2LADskB04PvzXv4qHwiG5VeoyYyLsKptu abYVJxEh4tKQ7+rWz1HaxW+00PLFSb+VYlAheX6GDEk4BQ30XRsoK0ALZQx/9I3kJ6Sy pSsvVtFAM1caSu7ZH9bo+73vj6lunIQo+EWs5mLRsS7Bkj93td7mKk3siLObRaqDs5nL 25wtGHEIA0xIu+oLmxhiVvFNgUent2XqtDmC5TEtAs8N6A1cRGhd61gGEUXw/xQ+HwDL 5e2g== X-Gm-Message-State: AFqh2kor2BGx2YKYp4lEclhtbU0ZfZEI9WUqxvKxGTFLgkYCffOTLf21 tG8pEVyBaxQQfLhYNmDYNUQjqq1PWPoOhKri X-Received: by 2002:a05:600c:35d6:b0:3da:17f5:57b9 with SMTP id r22-20020a05600c35d600b003da17f557b9mr4622479wmq.5.1673619112087; Fri, 13 Jan 2023 06:11:52 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n36-20020a05600c502400b003da0b75de94sm5334464wmr.8.2023.01.13.06.11.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 06:11:51 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 28/38] hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP2_GPIO type name Date: Fri, 13 Jan 2023 14:11:16 +0000 Message-Id: <20230113141126.535646-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113141126.535646-1-peter.maydell@linaro.org> References: <20230113141126.535646-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Following docs/devel/style.rst guidelines, rename omap2_gpif_s -> Omap2GpioState. This also remove a use of 'struct' in the DECLARE_INSTANCE_CHECKER() macro call. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230109140306.23161-6-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/arm/omap.h | 9 ++++----- hw/gpio/omap_gpio.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 29d2ed7e3be..9e30ba7ba24 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -108,16 +108,15 @@ DECLARE_INSTANCE_CHECKER(Omap1GpioState, OMAP1_GPIO, TYPE_OMAP1_GPIO) #define TYPE_OMAP2_GPIO "omap2-gpio" -DECLARE_INSTANCE_CHECKER(struct omap2_gpif_s, OMAP2_GPIO, +typedef struct Omap2GpioState Omap2GpioState; +DECLARE_INSTANCE_CHECKER(Omap2GpioState, OMAP2_GPIO, TYPE_OMAP2_GPIO) -typedef struct omap2_gpif_s omap2_gpif; - /* TODO: clock framework (see above) */ void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk clk); -void omap2_gpio_set_iclk(omap2_gpif *gpio, omap_clk clk); -void omap2_gpio_set_fclk(omap2_gpif *gpio, uint8_t i, omap_clk clk); +void omap2_gpio_set_iclk(Omap2GpioState *gpio, omap_clk clk); +void omap2_gpio_set_fclk(Omap2GpioState *gpio, uint8_t i, omap_clk clk); /* OMAP2 l4 Interconnect */ struct omap_l4_s; diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c index 23502315ea5..a3341d70f16 100644 --- a/hw/gpio/omap_gpio.c +++ b/hw/gpio/omap_gpio.c @@ -210,7 +210,7 @@ struct omap2_gpio_s { uint8_t delay; }; -struct omap2_gpif_s { +struct Omap2GpioState { SysBusDevice parent_obj; MemoryRegion iomem; @@ -274,7 +274,7 @@ static inline void omap2_gpio_module_int(struct omap2_gpio_s *s, int line) static void omap2_gpio_set(void *opaque, int line, int level) { - struct omap2_gpif_s *p = opaque; + Omap2GpioState *p = opaque; struct omap2_gpio_s *s = &p->modules[line >> 5]; line &= 31; @@ -601,7 +601,7 @@ static void omap_gpif_reset(DeviceState *dev) static void omap2_gpif_reset(DeviceState *dev) { - struct omap2_gpif_s *s = OMAP2_GPIO(dev); + Omap2GpioState *s = OMAP2_GPIO(dev); int i; for (i = 0; i < s->modulecount; i++) { @@ -613,7 +613,7 @@ static void omap2_gpif_reset(DeviceState *dev) static uint64_t omap2_gpif_top_read(void *opaque, hwaddr addr, unsigned size) { - struct omap2_gpif_s *s = opaque; + Omap2GpioState *s = opaque; switch (addr) { case 0x00: /* IPGENERICOCPSPL_REVISION */ @@ -642,7 +642,7 @@ static uint64_t omap2_gpif_top_read(void *opaque, hwaddr addr, unsigned size) static void omap2_gpif_top_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { - struct omap2_gpif_s *s = opaque; + Omap2GpioState *s = opaque; switch (addr) { case 0x00: /* IPGENERICOCPSPL_REVISION */ @@ -699,7 +699,7 @@ static void omap_gpio_realize(DeviceState *dev, Error **errp) static void omap2_gpio_realize(DeviceState *dev, Error **errp) { - struct omap2_gpif_s *s = OMAP2_GPIO(dev); + Omap2GpioState *s = OMAP2_GPIO(dev); SysBusDevice *sbd = SYS_BUS_DEVICE(dev); int i; @@ -771,19 +771,19 @@ static const TypeInfo omap_gpio_info = { .class_init = omap_gpio_class_init, }; -void omap2_gpio_set_iclk(omap2_gpif *gpio, omap_clk clk) +void omap2_gpio_set_iclk(Omap2GpioState *gpio, omap_clk clk) { gpio->iclk = clk; } -void omap2_gpio_set_fclk(omap2_gpif *gpio, uint8_t i, omap_clk clk) +void omap2_gpio_set_fclk(Omap2GpioState *gpio, uint8_t i, omap_clk clk) { assert(i <= 5); gpio->fclk[i] = clk; } static Property omap2_gpio_properties[] = { - DEFINE_PROP_INT32("mpu_model", struct omap2_gpif_s, mpu_model, 0), + DEFINE_PROP_INT32("mpu_model", Omap2GpioState, mpu_model, 0), DEFINE_PROP_END_OF_LIST(), }; @@ -801,7 +801,7 @@ static void omap2_gpio_class_init(ObjectClass *klass, void *data) static const TypeInfo omap2_gpio_info = { .name = TYPE_OMAP2_GPIO, .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(struct omap2_gpif_s), + .instance_size = sizeof(Omap2GpioState), .class_init = omap2_gpio_class_init, };