Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp46107rdb; Mon, 18 Dec 2023 08:31:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPsjaHbUDt+qGAtmpWy3qilrYPnbxBAjkxhDqcJHMq21Hxja64Gkd34H1+4KWHW6gf92yz X-Received: by 2002:a17:902:d509:b0:1d3:6411:73cf with SMTP id b9-20020a170902d50900b001d3641173cfmr3643412plg.112.1702917086695; Mon, 18 Dec 2023 08:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702917086; cv=none; d=google.com; s=arc-20160816; b=B03pVm76wvO6vA0r7BJRyCGXQ8OunKaTpFXw4vtuDslvL1+MHZlglDXzsspSaA1i3A 3LiacVY6j+rIBbq1t3TT8YfoCFgRBD2ubloMDFNjBtacp7hWDZx5Y5k9V+UoohFp0QlS zF304ElepcB3C4vyd0UjeKpErLIPwO+DLGa3+Xt3Kr2imIEO1SVxk79yayFVFs3+r1/h C+dQmAJ6N8xtfIt7KZgAxm8e9TwbvOCz4PwhIXBOBropizTnQLRaf0mD5e9FBxh4dGCb ggWddE6O+Owo9X45zoqu/Q0ypGZZIc0HpKB90sUy5lCDQZuiNWZtz5CSu6Yzi9KywYk7 sBEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=E3bMqGvFd2ovYEJupaD2iiMJymj8eT2qHOLEt3EV5ao=; fh=BAtfIGwzp8ybVNwQdDWPjOX0weMX8EczPm+YaQWiv1g=; b=NZiOW46pNL2cv5ru7HFkXkqvkWbrG5hwImwPhWa3ctGtjgeQEyVbCXYO1QtB3lip4h s+yJ4dsSM59bjH5yf5C7/AeMTeYd5dw8vK/Lz+PVoKuqR7lAvRRQl0ZehJpqUbFcEZ1I CZDH3cXE4zpL1RGZI5voKuNKceEPjv3pEXMJB649gTxmRC2dkzWR9FxkxHyX/t5cToYr j2lRNSrZwftGmk3Lsj1SrGF1dR6PCZBwa3Y1x0tRBtEpKqNw9136RjEVZZgu5N+/OojH WPCv75D2ck2Dl5hqTfz+GC69tMu61D2GgvnZUX6sOPdDB5xWt3x6Tb0FBmxv0maRq2y3 Dzvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZLd3hkGn; spf=pass (google.com: domain of linux-kernel+bounces-4062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4062-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w5-20020a170902e88500b001d366f8cfe7si8109646plg.146.2023.12.18.08.31.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:31:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZLd3hkGn; spf=pass (google.com: domain of linux-kernel+bounces-4062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4062-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 01C65B22247 for ; Mon, 18 Dec 2023 16:27:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 395614FF7E; Mon, 18 Dec 2023 16:26:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZLd3hkGn" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (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 CAF3D498BC; Mon, 18 Dec 2023 16:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-f42.google.com with SMTP id ada2fe7eead31-4669ac6df36so251421137.2; Mon, 18 Dec 2023 08:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702916812; x=1703521612; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=E3bMqGvFd2ovYEJupaD2iiMJymj8eT2qHOLEt3EV5ao=; b=ZLd3hkGnagBFyTsc48vJwy4caSlADCkMddjZDoBczoGq9TK1pS03D74kUbpW1J5pED oNnDfAWelwmb0vdh1O+UsdkYXalC4yEOQ9XFQtMOcFAmOmnc8mMI7jSHHKaoS6AkLgCc HBv+gzrxC/fP/nu6YoI91n7vwWf5A/Tyua6Zmf7jPtXpVs4bIWvwwJ8k/nW7Krjgdx9H NU4qAIUL7e1D/XwZqnUt65QjJUOP1cV+RiC6QOhZ+pnvbxBH+m3VRa3OfPgkR3EfzRZR olaTq5sfXO0waR29UBzS1VddVxU7ofw5aNO/gLYynp9MPTIQHo+SSUYjg9TP4cnBocxw 23Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702916812; x=1703521612; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E3bMqGvFd2ovYEJupaD2iiMJymj8eT2qHOLEt3EV5ao=; b=dJNqj43VKn9DqCtR14smLBKRgoRHrYm+SAvcTd6tQenpOk81ImpDv5XnNZoVxhRRyl cgy0kQtZchP2uJqegHE1UajXGmFFSSwvPqIc24Io7TM7I0cNa6nZWgCrAoRI954jYudX NVszewqhbI0gb6sw1B6PNew2AWK4fOSBejVyPqv7Ww5cXVo7pFFNcC90BjP8+WHMnxzs XIFAhoE6Ze9dBuQF8nbny9yne/ecHh1Udyd/bN1DczbkDV6aNdAjXmxNzAUIUpII7itL GzQyrK5b8J+m7Qmgy/osLpS1KpecQKtG6vJxiwWZn0vvXRoleMJtGO9GA+VFgYD0CRjb w4TQ== X-Gm-Message-State: AOJu0YzgTKDWpGn9gNrMwdK7w5KKm6Lh6EWtNXfmum5gzVgHCFZue2dG 5xfEtTRD4klFzhu+9X0VSow= X-Received: by 2002:a05:6102:32c9:b0:465:dcc0:6538 with SMTP id o9-20020a05610232c900b00465dcc06538mr12358249vss.38.1702916812580; Mon, 18 Dec 2023 08:26:52 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id hw11-20020a67e70b000000b004668bf7d113sm271112vsb.34.2023.12.18.08.26.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Dec 2023 08:26:52 -0800 (PST) Sender: Guenter Roeck Message-ID: <5baa93fe-bd08-4f11-9c5c-42060e89930c@roeck-us.net> Date: Mon, 18 Dec 2023 08:26:50 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] hwmon: max31827: Add PEC support Content-Language: en-US To: "Matyas, Daniel" Cc: Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , "linux-hwmon@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" References: <20231214143648.175336-1-daniel.matyas@analog.com> <2e0bf1cf-824d-40c6-9450-7ed4740f2f46@roeck-us.net> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv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3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/18/23 06:55, Matyas, Daniel wrote: [ ... ] >> On top of that, it is not clear why regmap can't be used in the first place. >> It seems that the major change is that one needs to read the configuration >> register after a write to see if there was a PEC error. It is not immediately >> obvious why that additional read (if indeed necessary) would require >> regmap support to be dropped. >> > > I tried out writing and and reading with regmap, but it is not working properly. Even if I modify the client flag, I still receive only 2 bytes of data (a word). I should be receiving 2+1 bytes = data + CRC-8. > > With i2c_smbus reads and writes, when I set the flag, I receive the 2+1 bytes, as expected. > The SMBus code in drivers/i2c/i2c-core-smbus.c is supposed to check if the received PEC is correct for SMBus transfers. Are you saying that this doesn't work, or that regmap doesn't use SMBus functions to communicate with the chip ? Thanks, Guenter