From patchwork Tue Feb 23 15:10:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1443527 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=d8zFQRI7; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DlMv43zmjz9sVS for ; Wed, 24 Feb 2021 02:10:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7623382979; Tue, 23 Feb 2021 16:10:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="d8zFQRI7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 664B382979; Tue, 23 Feb 2021 16:10:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6AF6D82A27 for ; Tue, 23 Feb 2021 16:10:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wm1-x331.google.com with SMTP id x16so2746526wmk.3 for ; Tue, 23 Feb 2021 07:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IYXcGCKLPQyLunVq17wzU/f/ag1R5MHJfBHoudOzugI=; b=d8zFQRI7Nw9/3h0SFfQc02kBp7THmGXnIVcQ6U3FLqjh8pQMd7cuxCGvlO0fWFPA/y itpq8nTYHOMrwg+W7svGEldDUF5R+Bhk0RWPMlmXfcCgF1Fru6q/7gPmKtifSG4i/wjf AsSCRs1RqJUYjKAfjiaQJHwPYBs4qUSAZoqFF+qI2atOKWqt4NkPbsuhy9U06rtY1ZQS 9ufvSPtijk6MMoHmS4TTOFFfcukwcp89D+A1P26Jt4FciOljFVk1KX9xw2uNWrs6m59h 1VARcNIRUcl8bYBJuiLi7nM6v4Z689n5Bq82AndeH+pa7kQgeAy9AypiRV1PoSp07J52 /jwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IYXcGCKLPQyLunVq17wzU/f/ag1R5MHJfBHoudOzugI=; b=VjQzO/XmWXBIsqK7oSsUfoPRwIKyVH8XKAX+FGdGNkjJxyNF2NTFiRTJtENiCViw+T LMQroyuJgK4OMMoPaWvC+yu+ZispGf2q3LQJS31Nm1puub5JS50KVZDUWsw3lZTSRGk7 1+uYbpMTGSuIyTUdjMy+1BZI93nLTHvaIgIYakAWSXsdOC9/GxAYxB7IrAom38Q9dqyG AWXeusOnFgwh4e8etMxR8qVROmmn2gPguriqZaHFR29+UrQPTn+ucfsMZ8dnAqH/nbv9 4P+hGB0T/zn43CcJaEPAURoLyZ7gkEfjmXv2m5nIIhBqln89fIxDaiLoGYwphdqjbDLe 6aVg== X-Gm-Message-State: AOAM530ckzPVHOa1NuLD9qZQ1DGWHLC/+YKcnbfyqIFV/kRNvg/zerBU fDFR/BLSO5i+6tU0gjv5SMcVTA== X-Google-Smtp-Source: ABdhPJyKOwtvl52CAOXp3yupq0LxaRBMYDCQS+TxD6hzN3qLXm6fI27RQtf1jHiXLseHtJKfOpMpOg== X-Received: by 2002:a1c:64d5:: with SMTP id y204mr16272008wmb.55.1614093043956; Tue, 23 Feb 2021 07:10:43 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:90c:e290:7b75:6aa4:c770:8615]) by smtp.gmail.com with ESMTPSA id g1sm32338809wrq.30.2021.02.23.07.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 07:10:43 -0800 (PST) From: Neil Armstrong To: trini@konsulko.com Cc: u-boot@lists.denx.de, m.szyprowski@samsung.com, u-boot-amlogic@groups.io, Neil Armstrong Subject: [PATCH] button: adc: fix treshold typo Date: Tue, 23 Feb 2021 16:10:40 +0100 Message-Id: <20210223151040.2201981-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Fix the treshold typo in code by threshold. Fixes: c0165c85c3 ("button: add a simple Analog to Digital Converter device based button driver") Suggested-by: Tom Rini Signed-off-by: Neil Armstrong Acked-by: Marek Szyprowski --- drivers/button/button-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/button/button-adc.c b/drivers/button/button-adc.c index eed86564fb..fd896c76f9 100644 --- a/drivers/button/button-adc.c +++ b/drivers/button/button-adc.c @@ -55,7 +55,7 @@ static int button_adc_of_to_plat(struct udevice *dev) struct button_uc_plat *uc_plat = dev_get_uclass_plat(dev); struct button_adc_priv *priv = dev_get_priv(dev); struct ofnode_phandle_args args; - u32 treshold, up_treshold, t; + u32 threshold, up_threshold, t; ofnode node; int ret; @@ -73,12 +73,12 @@ static int button_adc_of_to_plat(struct udevice *dev) return ret; ret = ofnode_read_u32(dev_ofnode(dev->parent), - "keyup-threshold-microvolt", &up_treshold); + "keyup-threshold-microvolt", &up_threshold); if (ret) return ret; ret = ofnode_read_u32(dev_ofnode(dev), "press-threshold-microvolt", - &treshold); + &threshold); if (ret) return ret; @@ -87,13 +87,13 @@ static int button_adc_of_to_plat(struct udevice *dev) if (ret) return ret; - if (t > treshold) - up_treshold = t; + if (t > threshold) + up_threshold = t; } priv->channel = args.args[0]; - priv->min = treshold; - priv->max = up_treshold; + priv->min = threshold; + priv->max = up_threshold; return ret; }