Received: by 2002:ac2:4c26:0:0:0:0:0 with SMTP id u6csp1653335lfq; Thu, 10 Sep 2020 13:54:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA2mmijw5a+uknR/VWBdhYHfcb19K2Pz99sMdVKloEITNQSnttdyT/qXvx94rAe3jfW5Oy X-Received: by 2002:a25:8149:: with SMTP id j9mr16789734ybm.214.1599771291595; Thu, 10 Sep 2020 13:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599771291; cv=none; d=google.com; s=arc-20160816; b=YV70aiqOxlmzu6neEowF5a8Zag//s2S0mHgfxOqheoX/Bu00zDXwnC/9A1GQGGD7c0 NomjgEbI8aEXI8nSJCu6B9ImmwE5OYAjJWGFKNrx1RKCWW69Ku1lvIWMCjHWs+kQ9iTe 3JhW201nHTHeviZ5RQdbf3c7BG8wq9jfDUXaC4/9ERqsOKvbej/r7AAyQBPrOQJBT98f ZxDboL/7u8YRFAf+fWjbDP5rspiNEht82y+yjPPWTcxZxsRl08zW7skvP3t6wLWGlo6e w98gV7D2p5q+xFjDiNabR1jAlCH47w1UGJivHTJDv47NKXVJfE6ikQZ8E4JZFwR1cL02 G/cQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Pg2UbiPnEyj3JIOQp/7lnXV/UdSauRuubalG7cq91s0=; b=mDG1VHmX5xUML2SNd4bAs1NIsQKw2RkqDbdki1dETQNrZZXq4Ga1zd6Z3qGzpMa600 SXtWWPq0jNW9Xr+wHrET1uXHTXSVzC15uidnGsNMgJ3Vz/Nq9g3QO2IAvKU04cHPVTbX Va2Q4Dmi8lLM44ZD9sBVDfyS2YdSkuD9sgd+0IkUCTj4+EWCtNweBcuGGSMZgVOlUjUZ 7Db0YAvryMi8TZ6+j++Q7RRNxZt5+p7GzBJjffePm2iyWsAd2QvK9JdYDZbevdPi+doI 0rzGwugWaqmJloiCx3YtXIM8/ekXsF9cI4ShdOzYtmsbX99qxOxpI1s9e91tu1Qg5qSt iM0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=upX18BBU; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f187si119334ybg.85.2020.09.10.13.54.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Sep 2020 13:54:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=upX18BBU; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Received: from localhost ([::1]:35220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGTak-0004Ij-Vx for alex.bennee@linaro.org; Thu, 10 Sep 2020 16:54:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGTaY-0004DY-Pw; Thu, 10 Sep 2020 16:54:38 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:40432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGTaX-0000HI-BQ; Thu, 10 Sep 2020 16:54:38 -0400 Received: by mail-wr1-x431.google.com with SMTP id j2so8648428wrx.7; Thu, 10 Sep 2020 13:54:36 -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=Pg2UbiPnEyj3JIOQp/7lnXV/UdSauRuubalG7cq91s0=; b=upX18BBU9qj81TIw224hWd7f9RodAdsuGcLJF8YW8hkxK/1nX1QocqrHGG08utTLXb c+ahbIOqRY6ci46wv5yx10szetuUy9cwJEZIQCyd2gD/sc/esJCRqzl1Q0zbi/pfatX2 rYyP+zidhMPc3gJyCXj9x4B7j20w/CwTWi2l/gk7+ZAmBf38gTAYyjl+pgclpuNDpE4F iHY/ReqDZDTJkh8GirSxLq3nGpSFW7WoVluLlAuC8ezn57ClopgsL+iGZTYnd2Zd+/YW qPabM5r8vhZWGpdyH5kNZWhaqnHDqrGMZZM6LCIZrR4pN8wKvbgF5ki8+0uuJIny7p58 96Yw== 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=Pg2UbiPnEyj3JIOQp/7lnXV/UdSauRuubalG7cq91s0=; b=WWvLeYphv3/jSP5OAzlrFcfi7kBIEzZahE8lHmteay9MgN91U7ttQBDr8KoUVmrfOn 0ulYSCCmYXGozvDT/kIe0YuMUo03L93ekMXiVzB3eFHkeUnBihsK/HlbkolQOmnBIFxy V1mn23wV14WBV5xrTanVtUyw7vUcLm+6kRBYjK8OmEt/xQABje3zXao03iXwvt6whOZN 0TsSs0Z07fMy3vnadNZMYKE3iwyB556hUal4RrERL3L6DPeRoTzD7YVaATlxqDYsRYLK nLJNqnn115aucE9qa/8dSdpxK2xK1xM7QPOugGyDcj3QgxXxvU1KDh2O5iDouuclfd/S 57Zw== X-Gm-Message-State: AOAM533/htCiWPDINEA335EhRZd142PeIB3coC/K2nTMrDESqofGZeOd fYfyQWPGlmmuPw+8MOTkxBz1W+CF/3o= X-Received: by 2002:a5d:62c2:: with SMTP id o2mr10657829wrv.418.1599771275494; Thu, 10 Sep 2020 13:54:35 -0700 (PDT) Received: from x1w.redhat.com (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id t1sm5089317wmi.16.2020.09.10.13.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 13:54:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v5 3/7] hw/misc/led: Emit a trace event when LED intensity has changed Date: Thu, 10 Sep 2020 22:54:25 +0200 Message-Id: <20200910205429.727766-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200910205429.727766-1-f4bug@amsat.org> References: <20200910205429.727766-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Andrew Jeffery , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Andrzej Zaborowski , Luc Michel , Joel Stanley Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: ZPS11qV206AK Track the LED intensity, and emit a trace event when it changes. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/led.c | 4 ++++ hw/misc/trace-events | 1 + 2 files changed, 5 insertions(+) diff --git a/hw/misc/led.c b/hw/misc/led.c index 3ef4f5e0469..ebe1fa45b1e 100644 --- a/hw/misc/led.c +++ b/hw/misc/led.c @@ -41,6 +41,10 @@ void led_set_intensity(LEDState *s, unsigned intensity_percent) intensity_percent = LED_INTENSITY_PERCENT_MAX; } trace_led_set_intensity(s->description, s->color, intensity_percent); + if (intensity_percent != s->intensity_percent) { + trace_led_change_intensity(s->description, s->color, + s->intensity_percent, intensity_percent); + } s->intensity_percent = intensity_percent; } diff --git a/hw/misc/trace-events b/hw/misc/trace-events index 76c9ddb54fe..89d15f05f9a 100644 --- a/hw/misc/trace-events +++ b/hw/misc/trace-events @@ -216,6 +216,7 @@ grlib_apb_pnp_read(uint64_t addr, uint32_t value) "APB PnP read addr:0x%03"PRIx6 # led.c led_set_intensity(const char *color, const char *desc, uint8_t intensity_percent) "LED desc:'%s' color:%s intensity: %u%%" +led_change_intensity(const char *color, const char *desc, uint8_t old_intensity_percent, uint8_t new_intensity_percent) "LED desc:'%s' color:%s intensity %u%% -> %u%%" # pca9552.c pca955x_gpio_status(const char *description, const char *buf) "%s GPIOs 0-15 [%s]" -- 2.26.2