From patchwork Fri Dec 15 02:38:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 179017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9001937dys; Thu, 14 Dec 2023 18:51:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGaYQt9jL/8HoPlwjTbtD6fhY/iGDFdQb/3c7NJZOVwmiwU1TSlNr0r98l80TDnJ554vgxc X-Received: by 2002:a05:6a20:e110:b0:190:917:4e3 with SMTP id kr16-20020a056a20e11000b00190091704e3mr16548821pzb.49.1702608706754; Thu, 14 Dec 2023 18:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702608706; cv=none; d=google.com; s=arc-20160816; b=UNOSuaNMi6uu9du9qRBBKuuovdgXnHE2389Ns0Z0XI0JvlUeIvhGB7JV/tIxwxGP4j tCCs9frUVJWtYGSC0AGoC7Vr+petPIINREQ5k5Tise8sV/6gHAltEREg/lMfpSY9Mzrb k4PKInbEXdM0nMf4xviKwAldWtdqFgAX/FspOUFIIWA0C7m/A4T9R2eXHE8w75+/Q8jX CeNxxCbiYn8gcNDUv8HmDS8cjAdin4v/t0IDRCu19YAjSOKXbgjxvS0iFzTegeBwXSYp 8Wav6I1aqalNUq4QKo5iY6uHBjAbtuxCv5bgyy/tVND/JRJE6YKFiqqIUUCLzvzVtfXo bfoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/gErARlFKGLkOKnr/eZMaU60+19wTX7Ibdpi8xmN6kM=; fh=GNOA1jdeAuH+tfAEzFx15vIukVGFZnqrW9xHApUHjl0=; b=fVfz4BBxNRsNBo6Ga438k3yu3x+DHlZRRGYphIk3jYHtrpj9ZXM4fGKaA2TW4M+Fvm 4TyvYUjaTFde/JCN+9l3GwmHoplVBoCtrui8fAVGr7VUoNtCUYdxV6GkDD2OgFhWZ9ey 3gxjvke+3fFkpzreBeNYC7uwSA674ZeD30H7EYZFaipllX9fCTdkdhpdBKDvibFwfGtX t9iUaQlzP2FlXAeeLK3l+1qKArHGzoUa/nXBZXqZv2k0SVU50P4reWtPZDCaKIunsMZo ONlO4m0sLQls/vzUZQJfjGJzWwXpoAfIbIzv+Y8miJipkIaxRHktdMnkq9bTieXNhaLj TZHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CZ2f8aLx; spf=pass (google.com: domain of linux-kernel+bounces-366-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-366-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s24-20020aa78298000000b006cbd24bf0b7si6635113pfm.52.2023.12.14.18.51.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 18:51:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-366-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CZ2f8aLx; spf=pass (google.com: domain of linux-kernel+bounces-366-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-366-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C6DBF287479 for ; Fri, 15 Dec 2023 02:43:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 111A61A290; Fri, 15 Dec 2023 02:38:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CZ2f8aLx" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 157778BF1; Fri, 15 Dec 2023 02:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-5c6839373f8so113365a12.0; Thu, 14 Dec 2023 18:38:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702607923; x=1703212723; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/gErARlFKGLkOKnr/eZMaU60+19wTX7Ibdpi8xmN6kM=; b=CZ2f8aLxfc2/FeU6dsTWgSzXVdiKjLDVUFmYiPuBiSpEyBJrA8ih1uMhSuniXHlQ8/ Xh87/sk2R1TVFygwVy5YdH1NNPpmEzAEX4XbRc2JJJYQpfguyC45EEgMB9/ss7iKP3nZ BYRh+byLawwL21B6DrJierMCxAtAtXT7vE8/j1SySDiw6y6uj5j1QghzzAcXCNaP/KDa 5M5kQNUyihPAB9jW2WeIvaiXxO60UtgMdXecteRvpaRPafDDs34dX4llXBMB/RiWchD3 ZQ65Gu+1JFMrFlklylGEn/DEDUFa76ErlPefpa1aND5ui2suZ4w/zj3ZTZmJSKd/0tg1 D/ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702607923; x=1703212723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/gErARlFKGLkOKnr/eZMaU60+19wTX7Ibdpi8xmN6kM=; b=S5dcCqkbxFcU5Xtup9D7cJT2nqHZ9Z4+6qdC9oSohDR6jlDhRz6DAmkXAVG5ENn8yj C9/LmRILuzWTucvxHtrermb1sur4KkQkU8svy2ynyet1h+B0AFzAl3Mmw8nz16n/O0uP YkxXFvNz6bhqes/T5pNOpnlpBYMUhSyybNk0GoU/Mkb+dJ5nT7PDx7yqqkafcBVUgyqy sU/Ri16y6RcYQejRrjKtYljY4SRHQRVoxqs1ERY290y2tmrgmfJTEv4Bd3HTaJ55sEcp JAPbGeN1MPDJ7OT39eGdwi/NHwOu85tPMe8SWIOe3YCNk9S0YNoqRfYAipqo/pVZA5Fq 3HoQ== X-Gm-Message-State: AOJu0Yx8s/W2zZ2yYyvkjQBe3OQO0tDcE/+0BDiFoBtWU9YLPozu0zdE ZSzaKu8i+Qk3nPWhDDIYZmp/oMF4Xv8= X-Received: by 2002:a05:6a20:3d89:b0:190:7b07:b7e4 with SMTP id s9-20020a056a203d8900b001907b07b7e4mr12917150pzi.10.1702607923142; Thu, 14 Dec 2023 18:38:43 -0800 (PST) Received: from rigel.home.arpa (60-241-235-125.tpgi.com.au. [60.241.235.125]) by smtp.gmail.com with ESMTPSA id fk16-20020a056a003a9000b006d26920a11dsm1437987pfb.0.2023.12.14.18.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 18:38:42 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, andy@kernel.org Cc: Kent Gibson Subject: [PATCH v3 2/5] gpiolib: remove debounce_period_us from struct gpio_desc Date: Fri, 15 Dec 2023 10:38:02 +0800 Message-Id: <20231215023805.63289-3-warthog618@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231215023805.63289-1-warthog618@gmail.com> References: <20231215023805.63289-1-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785314627491512588 X-GMAIL-MSGID: 1785314627491512588 cdev is the only user of the debounce_period_us field in struct gpio_desc, and it no longer uses it, so remove it. Signed-off-by: Kent Gibson --- drivers/gpio/gpiolib.c | 3 --- drivers/gpio/gpiolib.h | 5 ----- 2 files changed, 8 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 4e190be75dc2..ca2216621619 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2344,9 +2344,6 @@ static bool gpiod_free_commit(struct gpio_desc *desc) clear_bit(FLAG_IS_HOGGED, &desc->flags); #ifdef CONFIG_OF_DYNAMIC desc->hog = NULL; -#endif -#ifdef CONFIG_GPIO_CDEV - WRITE_ONCE(desc->debounce_period_us, 0); #endif ret = true; } diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index 3ccacf3c1288..a4a2520b5f31 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -147,7 +147,6 @@ void gpiod_line_state_notify(struct gpio_desc *desc, unsigned long action); * @label: Name of the consumer * @name: Line name * @hog: Pointer to the device node that hogs this line (if any) - * @debounce_period_us: Debounce period in microseconds * * These are obtained using gpiod_get() and are preferable to the old * integer-based handles. @@ -185,10 +184,6 @@ struct gpio_desc { #ifdef CONFIG_OF_DYNAMIC struct device_node *hog; #endif -#ifdef CONFIG_GPIO_CDEV - /* debounce period in microseconds */ - unsigned int debounce_period_us; -#endif }; #define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)