From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 A5F6C331ED4 for ; Mon, 27 Jul 2026 15:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785164980; cv=none; b=htDqtKSzFe2G/dEWRzsKx5mX2hsiezncFInnET16fz1HGlGTaHXuA7B9nq7YrgVr5Qmmwq/uWBh1t90OAGbDDzBWLJYiSIajDcc4FGLPL6/6twCkN5dwCDA0VdLnJmfzMKxrww5H/6tg6ME3RJVjEU1X6AnfqQQkLjzPxQ4eIZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785164980; c=relaxed/simple; bh=HSuzWCNfmtGOZwoIGq5Nl7XfdshlgFq1Zx4Gb4KZxT0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DidViGAg96qB6zmsVEreCjdJ7ksriokBlM5m+eyJDj9WcWyzgiHvX4ESqsE4aZoUaVbdviXWXanqtfJlnr6cKKGpCWqenpp4RmzuZ1kgc6w6ZBd2taKtRcOJK7AYPA5DE5ToSq9K0YO7WudDTrEHzvMFtGGY6rReDUS3QZOLbIE= 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=ZPdAcBwW; arc=none smtp.client-ip=209.85.208.179 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZPdAcBwW" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-39dbe684115so32571531fa.1 for ; Mon, 27 Jul 2026 08:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785164977; x=1785769777; 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:content-type; bh=zkj+aZ90VE+X2jMZTbdBhdtF1Q29knWNG0mAcpOL1oE=; b=ZPdAcBwWl4b8zf5GzwvqflvCbm5ukpdVlpzzncmEmimRgPU2GBz96SEtDJORr2s4CS JlYSuthABQncj1HJRDYUhi1glQjNc7Hy8jOyHHC8GD1pOHnXS9+Ea2V1AtuWZNWCcpkZ J6nhFyEOuvmCqw/iY2mfKw8XldjNsGSVpVGRgTTVL6dve0sDHW7QYdllMAr2218v/DZY JwLf4PBEXh0vyNvoh4aK/IEAFoEApIZflLWskmX/O/WGAueL03YcRSDBTxo3drxnmE3F MFE1lA/k1zHgPetHOJmmhw/VX0V6aTLjd9wCevbTmQvmOXF7aYwc4lRuK0FCRKdpNObA iT2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785164977; x=1785769777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=zkj+aZ90VE+X2jMZTbdBhdtF1Q29knWNG0mAcpOL1oE=; b=oWxigADUvwpuk3ng7moUfUYiWbEfkfBY3ZUZvltm6v1y52f8WOS4kCNdNr6/wJvA0Z gWojucd67/iIGZfYbXm1DE56xtz/6E0BilBqz9Wxh6QCvc/vqkTJCaCz3YkWp4TZFMJd xsCTHuYst2FluWR/pThZ6kP9NKwXiL4PPBDMs77Whc/0I0GnYSjfTjU1wn1rs4JRCn5/ bw6IBya73uUF5i1yC5lSzlBEuhxuawWj5pGYzbabkxhtcxl7dratXy/3idQaQ9f549AF eFrvlms4d2OwA6XtC8p8LAQ6ZKrlmCZy0F2yDrgIDdxCi7mQvn6BRmceE4rugWg3zOpu RfJA== X-Forwarded-Encrypted: i=1; AHgh+RpUfnjit7qB9VwoB98SC7WXySAeboUV+HNW9L+7ZIXvHUUrq5ckLsUh7QJ9yzC2uA/yeTZnDzcOo9ulhMI=@vger.kernel.org X-Gm-Message-State: AOJu0YyekbJB1Yjpy0anV0kvd6P6+bBKDyWCkOGuqL94FvzmG3ADjDyy XrjGoQBLruuDaPBZx8KgbF9WL2jFHo+gFv9erOwbWT3F6jIavwY1v6ce X-Gm-Gg: AR+sD13ZN6o8yBfx6Webebpc4ozWUXV3+mNB75sPuJxJ5rXPVzImsKuTDeVCa8HfPMt j4a7vvMUbi/x77IJGoUX0AXFsFqZkQrWL4/gmyoRuDa59c6VTYOnTpwLur9ihnbRH7rJpLISh2Z iPKCzOUWDY96mgk2+PbCaA789YPoZkrOUO1sU161G/rPAhgFbekwvL6lRBXOrpsCbn0F+EA1uvz dRETpxKV7Z7qADf1bXBJyJklCimJbXWPeLWPVoBmVLNL75bDCAKOdVvW0fNLe8ScCrdMG5oYBHN XzlBMaLsMdTLZRfqegPAvJVasJT+Irzk2f3QyWnAVOxmy/KhqoxXOzZtLxeOCFdZE1sClq5b1ai J1WuqMOwjKZl4IsLhEuTjg+oVIpnjJIQA0Hy3QXg8aO1TnQe+ssfOZDLb4hyUYs/8A0r45jRnM/ KRJ+ddgxwneDIULZtwCxskb+adEXYv/ogDsnj30NZrAnJOJgOwThT0hbQTx3v3axMgFEjU3T11D A== X-Received: by 2002:a05:6512:6d5:b0:5ae:acbd:439c with SMTP id 2adb3069b0e04-5b2c1a4f09emr1724048e87.23.1785164976430; Mon, 27 Jul 2026 08:09:36 -0700 (PDT) Received: from yantra.. (dsl-trebng21-58c187-236.dhcp.inet.fi. [88.193.135.236]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b2be1f83c4sm1481719e87.69.2026.07.27.08.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 08:09:35 -0700 (PDT) From: Rupesh Majhi To: David Lechner Cc: Eddie James , Jonathan Cameron , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: pressure: dps310: fix pressure result shift bit definition Date: Mon, 27 Jul 2026 18:09:34 +0300 Message-ID: <20260727150934.9471-1-zoone.rupert@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20260727070547.649074-1-zoone.rupert@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 On 7/27/26 4:27 PM, David Lechner wrote: > In your followup work, it would be nice to start with a patch to > sort these in a logical order. > > Right now, there is a mix of GENMASK being sorted from high to low > while bits are low to high (with DPS310_INT_HL being out of order). > Normally, we go from low to high on everything because that is how > datasheets usually list things. Makes sense, I will do that. I have a cleanup series queued from Andy's review of the ACPI fix, so the sort will go in as the first patch of that, after the buffer work lands. One thing worth flagging about the block you pasted: it keeps FIFO_EN at BIT(5) and SPI_EN at BIT(6), which is what the driver has today, but the datasheet puts FIFO_EN at bit 1 and SPI_MODE at bit 0. Datasheet V1.1 (2019-07-11), section 8.6 "Interrupt and FIFO configuration (CFG_REG)", the bit table reads INT_HL, INT_FIFO, INT_TMP, INT_PRS, T_SHIFT, P_SHIFT, FIFO_EN, SPI_MODE for bits 7 down to 0. So bits 5 and 6 are INT_TMP and INT_FIFO. Neither define is used right now, so nothing is broken today, but the FIFO enable is needed by the FIFO patches. I have that as a separate one-liner ahead of them, since it changes values rather than moving lines around. That leaves CFG_REG looking like this once both go in: #define DPS310_CFG_REG 0x09 #define DPS310_INT_HL BIT(7) #define DPS310_TMP_SHIFT_EN BIT(3) #define DPS310_PRS_SHIFT_EN BIT(2) #define DPS310_FIFO_EN BIT(1) #define DPS310_SPI_EN BIT(0) I left the three interrupt enables at bits 6 to 4 out, since nothing uses them and the driver has no interrupt path. Say if you would rather see them defined for completeness. The rest of your ordering I will take as is. Thanks for looking at this. Rupesh