Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1564102lqa; Mon, 29 Apr 2024 12:01:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXM8hu4l1ZWu9aM5row9O0Y4YOT8bUdNilh5VYMAinV2YuNDS4Qyjn9JNlxqfTapUL8FcAUXCaTY4mrlgPc3HxCf1HIRAUsHzXUPHdJRg== X-Google-Smtp-Source: AGHT+IHFHoVAOCS9MWDW8K8EhhDWs1fCh9r8PGEwoomcus67lBiFfxTJNY3fGzEsizSMj5nQL0BI X-Received: by 2002:a05:6a21:2b14:b0:1a7:60fa:b324 with SMTP id ss20-20020a056a212b1400b001a760fab324mr7267555pzb.18.1714417315881; Mon, 29 Apr 2024 12:01:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714417315; cv=pass; d=google.com; s=arc-20160816; b=knTmtMqSmgNEQWDbQ8kDSm/vm2wCfAqY9Ouu/rWDCV4vi2iHtamhF8ZL5WqhwZaCul k5Za1LtnOImdu/QsQsvqUENLKWP77Bw3Z/Ui8lVpu7facTzLUvKuiJ9omKSI3smtdXbq 59CcWxG+Ri2HZ7fakYFq8qOZfCIr75ZFPnKWDFjL9OLPUDvqR4Zz7ekK03SS0x9486d6 wvjAWz4MrGQQNREoLhihFnnJ2H+0p8XbVM1noH6gLZdLBk3PcLvBMvT+v230QUqsBwry ukrnBBta7z8/gn1uZR7D04iWxIxun/CsITw3xqd3OcimIpbI3hDEU93LuNOpHJox7tsn TSgQ== ARC-Message-Signature: i=2; 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=d03SxwYQEgO9ihhxcMsHW4m7sHTd0aWe30L6xyAn2MA=; fh=7KunFqjGqbwZM4OW/nHMMGQLXTRLxBWwPIlmxiTp7M0=; b=eOE/bFK490Wi0ClAQJSU37PVXsziXWo7nA9x+hRud7cnaoI4tLCwQatbx/suVLtE8M 8sDC+o3FAS8xdCP0StYr3brGlwdJ3B2aimGZ8IqNGUVeRN2b3wQREbb8AlNX6ddEZiRU vsugJ2nAi8KDCUNvnc/e88ZLGEUaAV0cuFudH2RP2cpK2rCwuMaMYIKrwcsyy4lk4yg9 N9g31J7kYx0fKRWgp21CWarFA0zJCNy0iXMPCPVGG3RaraIapVUQoPJ9NPDymf0hYYLm gjGOXY6dxGDIzhcrw5fmpTerw3apJX/JdIawDB0PrhN4WBJW40fiPQ3weiiWJEykEMjc 6hjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZuSF7+R5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-162870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j186-20020a638bc3000000b005f7fd3d5d4csi17998152pge.38.2024.04.29.12.01.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 12:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162870-linux.lists.archive=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=ZuSF7+R5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-162870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162870-linux.lists.archive=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 20940280CDE for ; Mon, 29 Apr 2024 19:01:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BB1B13C3EF; Mon, 29 Apr 2024 19:01:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZuSF7+R5" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 DDEB113B5BB; Mon, 29 Apr 2024 19:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714417264; cv=none; b=Jlh5c8DZcjiRz1ql7v/ibQKx+Avyzi5hDIeJfx40dtsbF3ZTLI21NaCzqreKJisyVStJJ3S1J0AkyDN/HDLes6Q7Mi8XwpuqY9RsI5zZRxyE3K9uhrFSD8bMM7ixqqf4VHKyqiqLI6+uxjkWAcN30CmI2QWkDW2yHNQ8DcI+5v8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714417264; c=relaxed/simple; bh=n7ZnkHS6L2EjKJdsc7qHUDXg5Zssd+Z6n1RohBzL08Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Y8LYtyqs0O71dO855EB3FGk62XEFPcEsgxFnTcHQIhBeT95gd2NE//PNHSlh2mmQ9fwyNpNhxaSeWJxJxmBRTFNnR7WyinrUHHBKHds8ka1pPUc/uYUnTHJoMWB1C3zcrlOOyQNx4xdsu7sh6bqgzHoeU41DD4HQmGNXeuHMqj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZuSF7+R5; arc=none smtp.client-ip=209.85.167.51 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-lf1-f51.google.com with SMTP id 2adb3069b0e04-5194cebd6caso5515285e87.0; Mon, 29 Apr 2024 12:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714417261; x=1715022061; 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=d03SxwYQEgO9ihhxcMsHW4m7sHTd0aWe30L6xyAn2MA=; b=ZuSF7+R5Hc+0sCmIOaWVQZ6Z9d9H8zdo0Uv9anwSHINWAibAujQ7QGOcuzOzqJLvci KrGdzVRE6/k5QFl+o8DE0zfxqYhf7V0isFRfC22Cw1a5tNNKa7ca5AymawEMZJpCzERj 1Rc7A7/OodxfiqImeCiz9+uz51BqCItIbY3S3N4l8JfDgwvUh7Ol3V38VfcsMOEKl0+Q cp/Aw8CbiI2D53Ei+9qsNNsOx4237vyiJYsHLEFHIv8V9IKCwur+aaIQ8k38B2OWSQYa IRHfHvfmCucwaxVoC9hP2SdgTK8R9KRKw81zipf6FYW1ZV2led646N/0NXjRGPCWkisC e6LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714417261; x=1715022061; 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=d03SxwYQEgO9ihhxcMsHW4m7sHTd0aWe30L6xyAn2MA=; b=VN7Sd2c9Qfh9UCKnFtAkYtXtL0H6GJbutuKIY46jSysmf0UvNIiSJIJpqZ+lvdgg0f uN1SsouTRf5JDFvozbZVxMZSKtXrWcdgMWc5R+ySu751Y/owX1Ylc+EmPS0+IziCuYcW Crdi+d6GYLAi6AVVQ12hlAACMZLGFpXc6nlGnnt1r+JEqQZOOGQGuN80QOoTpR6cpIav 6RMIi3mh3D120HHKy6mWuZ/M+qeU16ZewIOVBfXZUXsP6KO/CyAQY4nvAic62Ep5EcHC izNpQgUBQO+hczd48fKrUCwnFRxVjs+rkiY/wuu/ao5G/FVHbnlBRbrmjOSO6CddeyST najQ== X-Forwarded-Encrypted: i=1; AJvYcCXPlP5Wu2EfsVsiWckEu/QVE7rmDeeSdv/m0uE6bubbaZQJMwAdXk0+aLklojHYb2d091Nf9+zoPqWP85rtdtfkLtUWZix6vANvTnFN0rp0uRAwM++A1xIMSrAxt1eLlz0BcxdIbX5M X-Gm-Message-State: AOJu0YxkmFGXctxRjZmJOVqUYVQbBcVnNtAwIHhZIjtK8KPjCjVZqqfJ crL6rNmz+EVoy0VzGmxFdsyVH2PbWvipMQDjb7cBGv1k6e3O5g49 X-Received: by 2002:ac2:59c1:0:b0:51a:f2fb:b13c with SMTP id x1-20020ac259c1000000b0051af2fbb13cmr6071080lfn.11.1714417260730; Mon, 29 Apr 2024 12:01:00 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:abbf:c98a:cf84:d14c]) by smtp.gmail.com with ESMTPSA id x2-20020adfdd82000000b0034c78bba70bsm8469456wrl.72.2024.04.29.12.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 12:01:00 -0700 (PDT) From: Vasileios Amoiridis To: jic23@kernel.org Cc: lars@metafoo.de, andriy.shevchenko@linux.intel.com, ang.iglesiasg@gmail.com, mazziesaccount@gmail.com, ak@it-klinger.de, petre.rodan@subdimension.ro, phil@raspberrypi.com, 579lpy@gmail.com, linus.walleij@linaro.org, semen.protsenko@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Vasileios Amoiridis Subject: [PATCH v5 04/10] iio: pressure: bmp280: Add more intuitive name for bmp180_measure() Date: Mon, 29 Apr 2024 21:00:40 +0200 Message-Id: <20240429190046.24252-5-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240429190046.24252-1-vassilisamir@gmail.com> References: <20240429190046.24252-1-vassilisamir@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The bmp180_measure() function essentially waits for the end of the current conversion in order to read the values from the sensors. The name bmp180_measure() could be misinterpreted because it could be translated as "measure sensor values" even though it was probably trying to say "measure time for eoc". Give a more intuitive name to this function to be less confusing. Signed-off-by: Vasileios Amoiridis --- drivers/iio/pressure/bmp280-core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index edfa66953f87..ed49e0779d41 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -1771,7 +1771,7 @@ const struct bmp280_chip_info bmp580_chip_info = { }; EXPORT_SYMBOL_NS(bmp580_chip_info, IIO_BMP280); -static int bmp180_measure(struct bmp280_data *data, u8 ctrl_meas) +static int bmp180_wait_for_eoc(struct bmp280_data *data, u8 ctrl_meas) { const int conversion_time_max[] = { 4500, 7500, 13500, 25500 }; unsigned int delay_us; @@ -1820,9 +1820,9 @@ static int bmp180_read_adc_temp(struct bmp280_data *data, int *val) { int ret; - ret = bmp180_measure(data, - FIELD_PREP(BMP180_MEAS_CTRL_MASK, BMP180_MEAS_TEMP) | - BMP180_MEAS_SCO); + ret = bmp180_wait_for_eoc(data, + FIELD_PREP(BMP180_MEAS_CTRL_MASK, BMP180_MEAS_TEMP) | + BMP180_MEAS_SCO); if (ret) return ret; @@ -1920,10 +1920,10 @@ static int bmp180_read_adc_press(struct bmp280_data *data, int *val) u8 oss = data->oversampling_press; int ret; - ret = bmp180_measure(data, - FIELD_PREP(BMP180_MEAS_CTRL_MASK, BMP180_MEAS_PRESS) | - FIELD_PREP(BMP180_OSRS_PRESS_MASK, oss) | - BMP180_MEAS_SCO); + ret = bmp180_wait_for_eoc(data, + FIELD_PREP(BMP180_MEAS_CTRL_MASK, BMP180_MEAS_PRESS) | + FIELD_PREP(BMP180_OSRS_PRESS_MASK, oss) | + BMP180_MEAS_SCO); if (ret) return ret; -- 2.25.1