From patchwork Mon Jun 14 11:34:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 459839 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3198530jae; Mon, 14 Jun 2021 04:35:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBiZnJKhSHuY+jT0dBm8smhBCBETHl6AkjhWmYV4RotyS2nx2y1eMQgupGCTDxzs8+lE75 X-Received: by 2002:a17:906:dbc2:: with SMTP id yc2mr15020035ejb.390.1623670534428; Mon, 14 Jun 2021 04:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623670534; cv=none; d=google.com; s=arc-20160816; b=THHpVEOppijPnOS2SGLnLrsogqpTBDC/+WC/6vUhM+bQtn7p9EYcariRVR3KA7wg6X vHZ8IThrIIpejt/4SXOLwa5UKhKt3aJrhk9QUUDOtSclzU0xqZgyMbvAPRc98AjRk3zI 5NQMXWijbhb7gcAWa1e2CPJEp4hP1toeSzhrkFgKl44kDDFDAKDBR7AeI02aA0C+PO5u OmmAaixmRscYapSJJgU8pmmsB129gks2gouOOuUW8RlMzlWjfMujS/fLCLrToacjexrl QXnf2/4a6CcRMhMSkJLmy4OxLrIu/MfjG7TYsOpve4UpU0lOU8U9e5Lff7oAvl5uzf4y Vm8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zgeoU0wwm4K9Mtl1136mVYh+uq4k4HWgTFh7TH8SpCI=; b=XpfU3ACBZqaCpZhrTM1lxu6NdmYqPF5XZX9vTa6AEVwVdbdoA2hntnp7PkqU03a+Vl h4ZMgR/jX6e63K5SsjWm9OHnMNEyxW5nD0X89UewWPpZiJKhKF8ehcARdMviO/EjvdH4 QdIRuGAlUkyFyjHaqUY6A08uqi0+EntA3bNu5lXQSkGJlHGMbfY7VsDTRUNz/amJKBN5 UvhHgW7OBciVZ7zEUd/X3I+isxX1TM8Q9HSDU4QofRn9Pid7NVjuQK9S8+DPrD9tTg9i DRDh9fbJ0dIGmspMjz6aoPF5Us8EzbU5ttaRCbF73PcMtExpnQjMconnJv4DXNcsXQ1T rM3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AAux309X; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si4280808ejj.668.2021.06.14.04.35.34; Mon, 14 Jun 2021 04:35:34 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AAux309X; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234064AbhFNLha (ORCPT + 7 others); Mon, 14 Jun 2021 07:37:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:58792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235433AbhFNLf2 (ORCPT ); Mon, 14 Jun 2021 07:35:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 136A561206; Mon, 14 Jun 2021 11:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623670406; bh=VgWxuagrhIzXlgSd+SF6Amipzgfu4PZ6XBtZ2frRAAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AAux309Xg0W0SrLmK0W7XnHDG9kR9GjT+2ELrubrWfj/fP03v05KPX28bdGeOpyXU bbbtPjKBX4HioPz+35JHjbK5XlEW14+wIylxL+68rhey6NwsVknoy1R56ItkEIy4nr g6/CxN0bpV0lpZwu/KLEo3nFg2pgIpZYTBLk6e8rEz8skZg1lMpHPW9IsejN8I/fpt sr/8yFHuFfjQSb4gVVh8UMr7W6LT8nH4T/nvvqdP7hTJaFdGtltGYLA1WEC21vs9OI EmNEqfhY+uDf1Pnt5pH98vl9Wzwq+cmVLWpUYuhV4cgEAhA16toi97L6pvO7LLafbb Q/TN4V1fXvRWg== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: Michael.Hennerich@analog.com, lars@metafoo.de, devicetree@vger.kernel.org, Nuno Sa , Jonathan Cameron Subject: [PATCH 03/17] staging:iio:adc:ad7280a: rename _read() to _read_reg() Date: Mon, 14 Jun 2021 12:34:53 +0100 Message-Id: <20210614113507.897732-4-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614113507.897732-1-jic23@kernel.org> References: <20210614113507.897732-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This avoids possible confusion with read back of the channel conversions. These two types of reads are of difference sizes with resulting differences in the data layout of the response from the hardware. Signed-off-by: Jonathan Cameron --- drivers/staging/iio/adc/ad7280a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.32.0 diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index d169c8a7b5f1..4d866e5fe43c 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++ b/drivers/staging/iio/adc/ad7280a.c @@ -224,8 +224,8 @@ static int ad7280_write(struct ad7280_state *st, unsigned int devaddr, return spi_write(st->spi, &st->buf[0], 4); } -static int ad7280_read(struct ad7280_state *st, unsigned int devaddr, - unsigned int addr) +static int ad7280_read_reg(struct ad7280_state *st, unsigned int devaddr, + unsigned int addr) { int ret; unsigned int tmp; @@ -476,8 +476,8 @@ static ssize_t ad7280_show_balance_timer(struct device *dev, unsigned int msecs; mutex_lock(&st->lock); - ret = ad7280_read(st, this_attr->address >> 8, - this_attr->address & 0xFF); + ret = ad7280_read_reg(st, this_attr->address >> 8, + this_attr->address & 0xFF); mutex_unlock(&st->lock); if (ret < 0)