Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp42600rdb; Mon, 18 Dec 2023 08:25:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEBaF7Adbj+AT5rIqNRd0uIrbV0IrWxavR5jqE+6pr2xrG/obLgAelc+YQz+11SxGgbv2f X-Received: by 2002:a17:90a:a107:b0:286:6cc1:8663 with SMTP id s7-20020a17090aa10700b002866cc18663mr6765729pjp.72.1702916741261; Mon, 18 Dec 2023 08:25:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702916741; cv=none; d=google.com; s=arc-20160816; b=faeBNkkU8xQqRQERg1ETeJLaTMKlAQVShSlQNzjiLPJcxEsJSHFphJ89ZDHtWgn+Au yBReC6OTr65e+1l4mDwiptDo+JHbd+pu6M+qIIkj961EsPFdFYKMFSJns8DbcCfFjqIt r2+bUy8nB+yTTVSlovgTYmi3BKHUVXKeoJT+xWbM0js1SiHAUTpL1gTwAn3B/EyJFRo7 +8RPmPVBXhNC3vjyQ06GjfxFz7NCXNro6sDjSVzAHkHWtFn0gzkOE53M6ZGvo1SnfpRa LkVvKtmBdyLzYsOyN6T0qyvrZvCDgyqLMu8bmSk0ZpFNMWMvCrEQn3KVp9qVGstNdDa8 3eww== 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=HQFk8KSk4ImJwtsGcFEdS5YHLbNQQV6HJ8e8flUomYs=; fh=BAtfIGwzp8ybVNwQdDWPjOX0weMX8EczPm+YaQWiv1g=; b=q69e+N2xVLSUMmAKhgw4rdJizjjpfA58WYPfisfmVuG0EehiSz6Gfigqcoh+Zy/+7j 3BqGg00D2/1fWhI/x5npexjX1Ny/3/H+9qCTLtmeqtRb/OcJxYJjGw/GDZPg6xEyNOiF ico5WlDY3448dVRfuMUMGQbCFZjzSavN0Lor0hyM8lXcFwFv/QPQKTx3znVHIlU8T8no afcxxTax6B/49U0pB602hQkurJna100fS6eDts4gU3zCIO1f0ZQ3yiZ+9fjvw6sAV54C UlepETmsTDdpdqI+Aqw1f5QQWiIO0RIgLGFYgg/99WxhBT4TL5pL+b4fJxGkduKCC7t/ xnsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DMyt6E+6; spf=pass (google.com: domain of linux-kernel+bounces-4051-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4051-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 hg20-20020a17090b301400b0028ba37adbfasi683583pjb.55.2023.12.18.08.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:25:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4051-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=DMyt6E+6; spf=pass (google.com: domain of linux-kernel+bounces-4051-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4051-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 B9E31B238F9 for ; Mon, 18 Dec 2023 16:18:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1FBC3D54B; Mon, 18 Dec 2023 16:18:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DMyt6E+6" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-vs1-f43.google.com (mail-vs1-f43.google.com [209.85.217.43]) (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 31BA149888; Mon, 18 Dec 2023 16:18:30 +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-f43.google.com with SMTP id ada2fe7eead31-4665fb8a7e9so451301137.2; Mon, 18 Dec 2023 08:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702916310; x=1703521110; 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=HQFk8KSk4ImJwtsGcFEdS5YHLbNQQV6HJ8e8flUomYs=; b=DMyt6E+6uzq3CjV+VKy8ZhywdEbFlft4BQj6jgg+GTgZiOvedttf4E8usDvbGitkkO 37fyUg5EahhqhjyZaNxVyaqvdagQ+jVJ734O1xKG/wdAMUCRHMIZt4OCWv2vv/XbDg61 97bjK7m+zpfxCBvswCt8nhlZc1v+HbAh8ROsW7AEnWzfGK/5na+IbyFIEJeTicw7WTuF y4mHiw9ltraPbg5dUlzvbZiJPqr/JHS7bwmYIZVzsxDH2Vh0YJ/LlRTm6wU8uuonpWYa AgUZAXYmqkY0ranh27LN/oAXtS9x+rWD+r1FgsOL4GMfYSBoA9Xm/j5DxYONSWwl5/hC m/Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702916310; x=1703521110; 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=HQFk8KSk4ImJwtsGcFEdS5YHLbNQQV6HJ8e8flUomYs=; b=SJRM7POatPLgMr7N+ZTr1sr4lF/dy4M6uGFhZSK788cS5I+q1yr+ikj8nBSXlKlfli rrd8Wbv1t0St/F+l5LbzHPsiLdf5eGgKSJf6lJC14FI7+Le5MbyA1opkdvT/XclMd5pw k31m2cumyHmuHxE6AyVoc3Cd1tGPYXlgAQJY+8vOZlA6N3N1+MeUtRlshoyqMjvpmF48 pn93k1oOlmERZ4i8hx34rY3/KWc/TyrOQZ3WedaG+SzQr18IO/2I7jP+bDqS1/LUZF8a IE33J+jOAtURCJ9DT33eJbzj4VBYAtLMHREdsK1OolefSb0szzuTPygeXp04Eqv/ExP3 Ggjg== X-Gm-Message-State: AOJu0Yyfts5IdvBO8RQnw5+uRfEgnw3h5DLLiw/qGw2a7Jck/zHo9d97 uZQMVFYEsXl/Nm0cLhA5n0I= X-Received: by 2002:a05:6102:c15:b0:464:4518:ba73 with SMTP id x21-20020a0561020c1500b004644518ba73mr10334637vss.8.1702916310005; Mon, 18 Dec 2023 08:18:30 -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 by10-20020a056102504a00b004669c17b944sm84085vsb.11.2023.12.18.08.18.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Dec 2023 08:18:29 -0800 (PST) Sender: Guenter Roeck Message-ID: <6732bd18-2157-4ccb-b02c-43f3350e89cb@roeck-us.net> Date: Mon, 18 Dec 2023 08:18:26 -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> <8b6fc14f-28a5-4caf-80b6-747ff485dcef@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//7d92Uf3EArDlDShwR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SuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/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 01:12, Matyas, Daniel wrote: > > >> -----Original Message----- >> From: Guenter Roeck On Behalf Of Guenter Roeck >> Sent: Saturday, December 16, 2023 3:33 AM >> 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 >> Subject: Re: [PATCH 1/3] hwmon: max31827: Add PEC support >> >> [External] >> >> On 12/15/23 12:28, Matyas, Daniel wrote: >>> >>> >>>> -----Original Message----- >>>> From: Guenter Roeck On Behalf Of Guenter >> Roeck >>>> Sent: Thursday, December 14, 2023 6:10 PM >>>> 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 >>>> Subject: Re: [PATCH 1/3] hwmon: max31827: Add PEC support >>>> >>>> [External] >>>> >>>> On 12/14/23 06:36, Daniel Matyas wrote: >>>>> Removed regmap and used my functions to read, write and update >> bits. >>>>> In these functions i2c_smbus_ helper functions are used. These check >>>>> if there were any PEC errors during read. In the write function, if >>>>> PEC is enabled, I check for PEC Error bit, to see if there were any >> errors. >>>>> >>>>> Signed-off-by: Daniel Matyas >>>> >>>> The "PEC" attribute needs to be attached to the I2C device. >>>> See lm90.c or pmbus_core.c for examples. >>>> >>> >>> I added pec_show() and pec_store() functions and created the pec file >> within the max31827_groups. >>> I did not set the flags, because I want them to be set only in pec_store. >> By default the PEC flag should not be set. >>> >> >> That is not the point. Again, >> >> >> The "PEC" attribute needs to be attached to the I2C device. >> >> See lm90.c or pmbus_core.c for examples. >> >> That is not about regmap, it is about the location of the "pec" attribute. >> > > I understand that this is not about regmap. Still, I would argue, that when I am registering the device with groups, the "pec" attribute is attached. > Sure. To the hwmon device. I asked you to attach it to the i2c device, as implemented all other hwmon drivers supporting this attribute. I am not inclined to make an exception for this driver, and I do not see a reason to do so. Guenter