From patchwork Sun Jun 9 20:06:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 13691377 Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) (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 B45901EEF9 for ; Sun, 9 Jun 2024 20:06:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717963587; cv=none; b=A5Wn+pCldD6y3MBhxmUZr1XnJaYU20UDG656vQjje4QQSoEY6jKxaup7HBpkYg7QgSnvoxmJE7p+NbZNpIAsAIFW17TymbO46J6zIEKCCODNC3sVeDaA4ZiJ7VD4Ql/X4MDSjLEzjhJIIr3zkSo243GKq677uztFGwFCBrmDLkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717963587; c=relaxed/simple; bh=Y2g3hBH20Ez6tjr+gS+RmV88OyRJw9ykCZUclisL2Gw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Bc/TF7i7P2cIRNyJArPhIKL7tkd43f0uD/tMzVuYC/23BbkKWqfg8QskczwMf0Mc20O+2q4gw/ah6MwLhTmjQPVwB72CUxwJyk7luQ+KOqmTB1yojW/LRjR5vwlrZ9lfLy3Mn2GuSxbG7zY7cywpGvTCR+KbJGH7IpD2MUaUVhw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=CYdW4E5z; arc=none smtp.client-ip=209.85.161.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="CYdW4E5z" Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-5b97a071c92so1911473eaf.1 for ; Sun, 09 Jun 2024 13:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717963584; x=1718568384; 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=6zH1+NlAL7sGBrxSanA/FtA/g7DCFzhSaqjwGlIqeYk=; b=CYdW4E5zxWh5IWcXejzYoEslcvehPyPu5TRnvnKy2LuGE6XhQFy2s62bOjtxRoQRoe bWkYlHamm1eLwTb/YnXWn9Cb/GOwagOkO+rp7DaEG3l/NfbBCqck6r2T1CvuIIK1oSa7 nxW9DKzma1i19RDENg3xJngRmnmC6ASxLKrC5/VBEQ3CEgit4RKsyhS8YNgqcJCOzyRQ mQiz4f+hX2YtHRotGqhKshiux+yDbXmImxDVZpJR4N1wQ5wGoPv7ctRGLXWu6ujY995a Ee+JiecsSNE73od4mPgGCLW43zYJGnKXQdAXgsetCY1G48N9C2ubmc+5Bzbdww3QOlo+ E5JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717963584; x=1718568384; 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=6zH1+NlAL7sGBrxSanA/FtA/g7DCFzhSaqjwGlIqeYk=; b=Y2u6xRdRAvZhgs7tpgU8ReLtHaqoRJm0cwv2RVmxE5Q7YMJx6QZ7UGzyDYYq7S28yr pRVNRgizAkKpN24TI8JJ9zfNIi/Sf5s/xObEAwuPnG2u6d2dzlhvnKlZkxp6ojWFL5c+ YgTb0po4mfenpp+M5LU0b/Lz6NvvNFw3Uipx34ZEQjpN+tAmjPiLCm07b/hSuZGq/VZt ouKcLbxJDeKUfWB5aw3y2b7gb5nY3u+a14AcTCc5tUAXFKlQ01hhw+VC/ayz12VFSwLu A/OX7ysCdhuld2cC/QGnP97I7KDAudbrU8JMsL6Z8xkDcTNsqiHCk9vMq4PI9bG6Oqug 3olQ== X-Forwarded-Encrypted: i=1; AJvYcCU/s6EqH9doq5L3XpMJcFv/n+BXqkVBM+wEVoZ9kiDNOx3NBxSDv+2UFSDDRxgJ8a5zJfkScpssT1diml6r7IPijkpevBUOHez+ X-Gm-Message-State: AOJu0YxWzAW1iPotGgKiN2n5Hq1Y0O5iAw5tssHpq/+Z3GzIo3JXBrPB N4EG//GjqgFs54EPXKfE7LIQZyr0LVPmzT45MzoJZP4YhyTmQe9sZ7lpOc1a4Og= X-Google-Smtp-Source: AGHT+IEXyblMhCU92LHpLi9n5C30rLt+Oo3AAw9gr5DqMdj5QvfaoFkMH+K9Ls0kXQ5UXrqpIjKi2Q== X-Received: by 2002:a05:6820:1691:b0:5b9:f2f4:6a95 with SMTP id 006d021491bc7-5baae76ba19mr7502787eaf.5.1717963583757; Sun, 09 Jun 2024 13:06:23 -0700 (PDT) Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5ba977e121bsm1413278eaf.28.2024.06.09.13.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 13:06:23 -0700 (PDT) From: David Lechner To: William Breathitt Gray Cc: David Lechner , Judith Mendez , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] counter: ti-eqep: remove unused struct member Date: Sun, 9 Jun 2024 15:06:15 -0500 Message-ID: <20240609-ti-eqep-cleanup-v1-1-9d67939c763a@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609-ti-eqep-cleanup-v1-0-9d67939c763a@baylibre.com> References: <20240609-ti-eqep-cleanup-v1-0-9d67939c763a@baylibre.com> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.12.4 Since commit 8817c2d03a85 ("counter: ti-eqep: Convert to counter_priv() wrapper") the counter field in struct ti_eqep_cnt is not used anymore. Remove it. Signed-off-by: David Lechner Reviewed-by: Judith Mendez --- drivers/counter/ti-eqep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c index 072b11fd6b32..30c35b6c6050 100644 --- a/drivers/counter/ti-eqep.c +++ b/drivers/counter/ti-eqep.c @@ -82,7 +82,6 @@ enum ti_eqep_count_func { }; struct ti_eqep_cnt { - struct counter_device counter; struct regmap *regmap32; struct regmap *regmap16; }; From patchwork Sun Jun 9 20:06:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 13691378 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (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 9075947F60 for ; Sun, 9 Jun 2024 20:06:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717963587; cv=none; b=kaNGTW6/KE3xEg6JTj7qg4J41VRZiGM3Q5YI/apjM58ql12182jRruH8a0H5iju0vEUI7w+bGHE1mEYtuGuTvOYzpxpSazS08pNhMYxShe8pQWfhzkR904tgsbJZ1z8hcH/mrQSwT22kfcXYjPlRCh5BssnaQ3UbvqEHSHdCrZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717963587; c=relaxed/simple; bh=OQ8LIfPXu3hLpWk0qkAUgzkjoCV+/oOpWmGnaf7E7Qg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IIFixqTocXGUl/aFyGE8t+YvP30BpelFlfZIjvM1XgTPBVd3InF0TIjmzQe6Rg4crTfj4CoZgnAf8ZEBS6Ov5WwiWTFXRueHgALc6SqtlkIo3w2ELZoHereqVvhJyEASAxWWsNO5kGqlgwdmnEewQp3nD3frZ4EEF4g80o7mNsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=fyyzpM1q; arc=none smtp.client-ip=209.85.161.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="fyyzpM1q" Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5b2e93fddafso1727746eaf.0 for ; Sun, 09 Jun 2024 13:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717963584; x=1718568384; 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=oYKfigbf7VqwLqv7HhequLfARQ4HkFaCIDWgcDYu/E0=; b=fyyzpM1qJH8vd7WMvjO02DuGSo7qU/VBMKL6bzPRk99FYDozEfzp3CSWQK4Jv5TJEj ArH8GdfmERhvuuEDEs8PFJfkRoJJEuXT/JPEZanbK7Z4IKjiCbciLuxmIoj4orhpHFIu JZWYSrLXCrcMdXBQ4hrtVGgcqyb5mqeUdFoBQHOdNEXT8xuf2WA2CKBIMaRs6DZG/t/x gVI8oO4j6uN8BY7kIY54VADF/tDA4G57ka2wWdePXekLpqek0FfDFHX9249gvjIFZrZx K+wjvshXzbKpmahSjSCBmax8VZc6EJHg6QM2FwO/QPasX+bHJf30KwNYpnHG3NHpiggO 87sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717963584; x=1718568384; 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=oYKfigbf7VqwLqv7HhequLfARQ4HkFaCIDWgcDYu/E0=; b=fPTaLs5ZkB1VZS/1fSs1DkgLeorBW3wX0bd9KAe6914DyBv6a5CRwh/Os8b1PfXOA+ yagBmaEWyVtMEYv8ipbGVoZ8evK6UEb4jfiAACT2mQ1PmEqGy1AepsaEmpfPahZHIvzZ +if5N+5jH5VXNlRNxTNUXPomI9Bgjdlqkre4Ok1F5VUombxMUTEQp4Q8P2l9CWNoH0PT yq/EwwCWNVHr7J0WFLoifynKWsE2NIzX1bW5S5PAQv7mAGouQw0vrEpkHSfDnW3ox/88 Zo3dPi2Z/zV3sZWjRiPD046lG3mNXtNAXfduDYRh7kYhFUyfV2xYtkzZKwal5k863uf9 ggMA== X-Forwarded-Encrypted: i=1; AJvYcCXxtiAwp3unaf+XHwRGJNR1vbbnt2lQ0r2FJUo+0m9b5NBq9E/Pf2OS5sbcn9avnKr69uHgMQokMY4hYs6sUsrzXo7huGAlcAgE X-Gm-Message-State: AOJu0YzfU/yGAA0Uj4LZA+NT43VK54WZh0L1eAoyt9EtkL7Gl7GJJ5qA IdDi95KskkXBRmkdHsbRMsPIDyMIKYKZq5Z4jmLLbT9QSFVVWJylSkTmDnGKuOE= X-Google-Smtp-Source: AGHT+IE+Q6PIYzDdNSoHQfMEgTJPKdEnjFwglsLO0gEt7q/0j56YXA/CnyEa9tPCeZtPIufEStcA2A== X-Received: by 2002:a4a:bc01:0:b0:5ba:8ac1:3a29 with SMTP id 006d021491bc7-5ba9151ae64mr4996042eaf.1.1717963584573; Sun, 09 Jun 2024 13:06:24 -0700 (PDT) Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5ba977e121bsm1413278eaf.28.2024.06.09.13.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 13:06:24 -0700 (PDT) From: David Lechner To: William Breathitt Gray Cc: David Lechner , Judith Mendez , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] counter: ti-eqep: remove counter_priv() wrapper Date: Sun, 9 Jun 2024 15:06:16 -0500 Message-ID: <20240609-ti-eqep-cleanup-v1-2-9d67939c763a@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609-ti-eqep-cleanup-v1-0-9d67939c763a@baylibre.com> References: <20240609-ti-eqep-cleanup-v1-0-9d67939c763a@baylibre.com> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.12.4 The ti_eqep_count_from_counter() function is just a wrapper around counter_priv(). counter_priv() can be used directly, so we don't need the wrapper function. Remove it. Signed-off-by: David Lechner --- drivers/counter/ti-eqep.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c index 30c35b6c6050..924e379303dd 100644 --- a/drivers/counter/ti-eqep.c +++ b/drivers/counter/ti-eqep.c @@ -86,15 +86,10 @@ struct ti_eqep_cnt { struct regmap *regmap16; }; -static struct ti_eqep_cnt *ti_eqep_count_from_counter(struct counter_device *counter) -{ - return counter_priv(counter); -} - static int ti_eqep_count_read(struct counter_device *counter, struct counter_count *count, u64 *val) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); u32 cnt; regmap_read(priv->regmap32, QPOSCNT, &cnt); @@ -106,7 +101,7 @@ static int ti_eqep_count_read(struct counter_device *counter, static int ti_eqep_count_write(struct counter_device *counter, struct counter_count *count, u64 val) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); u32 max; regmap_read(priv->regmap32, QPOSMAX, &max); @@ -120,7 +115,7 @@ static int ti_eqep_function_read(struct counter_device *counter, struct counter_count *count, enum counter_function *function) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); u32 qdecctl; regmap_read(priv->regmap16, QDECCTL, &qdecctl); @@ -147,7 +142,7 @@ static int ti_eqep_function_write(struct counter_device *counter, struct counter_count *count, enum counter_function function) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); enum ti_eqep_count_func qsrc; switch (function) { @@ -177,7 +172,7 @@ static int ti_eqep_action_read(struct counter_device *counter, struct counter_synapse *synapse, enum counter_synapse_action *action) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); enum counter_function function; u32 qdecctl; int err; @@ -249,7 +244,7 @@ static int ti_eqep_position_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *ceiling) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); u32 qposmax; regmap_read(priv->regmap32, QPOSMAX, &qposmax); @@ -263,7 +258,7 @@ static int ti_eqep_position_ceiling_write(struct counter_device *counter, struct counter_count *count, u64 ceiling) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); if (ceiling != (u32)ceiling) return -ERANGE; @@ -276,7 +271,7 @@ static int ti_eqep_position_ceiling_write(struct counter_device *counter, static int ti_eqep_position_enable_read(struct counter_device *counter, struct counter_count *count, u8 *enable) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); u32 qepctl; regmap_read(priv->regmap16, QEPCTL, &qepctl); @@ -289,7 +284,7 @@ static int ti_eqep_position_enable_read(struct counter_device *counter, static int ti_eqep_position_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) { - struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter); + struct ti_eqep_cnt *priv = counter_priv(counter); regmap_write_bits(priv->regmap16, QEPCTL, QEPCTL_PHEN, enable ? -1 : 0);