Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp401803lqt; Mon, 18 Mar 2024 11:01:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpVemOxkfW1UDSUclZa3QZNyLaAWSsHINpQu05TBGrPor6ve4CRgdnh6Hscn7E9ZRDg+SAN7xzovBj9LhRRNgmkx33PJrBr8BS+TEKLA== X-Google-Smtp-Source: AGHT+IE+Yi5YwV4jjrH80GA6v2K4Bzr+D/x3CQpBzf5nKB43PBgh9uPQUHXU25TUVN/0XTiztqAV X-Received: by 2002:a05:6358:5602:b0:17e:bfb8:dd86 with SMTP id b2-20020a056358560200b0017ebfb8dd86mr410137rwf.3.1710784889845; Mon, 18 Mar 2024 11:01:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710784889; cv=pass; d=google.com; s=arc-20160816; b=zC6m8YJRZLXKZQuCPn+u6/5wLhK+CDTWFjJdulTfkglbz219vS/tlZq0zIAsIBhdOb LXhyKyrFaykh/UCXZbGflI3s2bPJeU4g+iIgXoZiO009bW8lL7Mr8H4vJVVmslhdTLRD 6AzIisz9mx9JB0jKSb4Rorgcu0xAgEhO3K8vY9dpTLOURAyMO+QZp5YwvjHUxxf96tK7 9YEI1npn24MVE70xLgTPDiw4tamfn0vhgTDEIT9a8LA0kc2fzTGyq3uE/nm/ZJX5ql6Z xXB5DUCoxzXIRzM1/uWKcGrP3+Z0nhHSLkZcXrMwaS0vMQ/Bjv6D9lnC8DGDo6HqpN+9 X9tg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=GSD1BKkDRKT4zNl8Y1a8A4oIxqi6RhgxEsOmyYNbPCo=; fh=lG3Oadfr09BLp/UsXNTIBHWtDU3D7c7YAu5s9l07Eu0=; b=hZjWmrYboPQ9nEb4ua0Oenc9Z7dSoQqjofp06FS0EEwCaJn1en2LUl+Rggqn1kNh4h PAqKPIMjuaw0seE6RVX44utRW4Woy2yV2INnOmeAVdZaDwUWnyxMbfRk5R7zi18mElHU x58g/2fakG/3qqQx8w+d2TnIe8tp0KTwCz95OcphvkHWQ/OKLcyFKI9dGImpVXJGc0Lq F5Pt7V3a555vUj82byNGBnW/3jlNo6x6n73VqCiRsHCm/1ILPxS6M27NsBpeslLC1Du8 ybWdWNrO/FP4WomSzlQ4eGN0UcWYxzdrXKWLJOkBDTCrwCygkF88opR/e9kqikA31S1I HnDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=poUywc5M; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-106491-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p19-20020a62ab13000000b006e650049479si9351595pff.96.2024.03.18.11.01.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 11:01:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106491-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=poUywc5M; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-106491-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 D2BD8B22086 for ; Mon, 18 Mar 2024 18:00:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BF2955E60; Mon, 18 Mar 2024 18:00:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="poUywc5M" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.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 ACBD156445 for ; Mon, 18 Mar 2024 18:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710784844; cv=none; b=GxVJHYE3V8qDdatJM6tuuD2lROGxCE5cIoMCZ2Jca3sILDp3sj31XqR5yzVdxpHhGw4KLb46sqGvcv99jA8exaw9OZZTWZDNRb7hwBP6uTyTCUa0QOQDqmS//VUB3CdfahoYYJSVhPMA2uMAuaKay+XsYYGXBbKCW+bnFq40pEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710784844; c=relaxed/simple; bh=JZTERrfhGHZ98bdsXf2rYYX8wFraHwMFYnZf4nSwBO8=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=BcFUSGfPoOCZkqD3qYZbGx4uzWWz8synPCeApf6Uuh31JW7YizqjTr9/lI2yJ6QN8ZBOnrpULPUDgrStSdveh0nULIsw34VAlU+GrNpuHm6m9a9ulDQFFyy4pXzunDUAbUia5StpDwWVGoV+qxT1AZcW/GohbjlmHRSOV65N4lc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=poUywc5M; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a46a7b8e07fso311658766b.2 for ; Mon, 18 Mar 2024 11:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710784841; x=1711389641; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GSD1BKkDRKT4zNl8Y1a8A4oIxqi6RhgxEsOmyYNbPCo=; b=poUywc5MXljQ2hP7OarBtF/S6327rzsXvlTMN8pdPS6y0AHsyMzxk47ZvSx4tq/ErR xbQFrgZOnk1PMEXjuGVSd9JdLqmiSHu4f2V3a2byAnoxA5RviP16kJJAUu/7gtCDvGsn ga1Hs1AiyRvCvVdCoXY/tuCAnBzMTQUwZiCbgyNrs6RsE01bmH7Js5N8kBkrezEfUYgk ajuETanJINB9SHM+AluAJRvtSnBzSksdsdrKE60a8Rd8VpOiXwrTGLS7jirx8gAQXb2G tc2qarHx8spFZ9xEPzMuXx+OOw2cosg1Lzvx9rr4kneiv2bflpM6xTPndUpd4Bn/vD7L tfCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710784841; x=1711389641; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GSD1BKkDRKT4zNl8Y1a8A4oIxqi6RhgxEsOmyYNbPCo=; b=M5YM4qnYcH6ZD7OQYtnEuOClz0Oc7s9EpZPtxvIiQFuTnfZ0KKPZWLqTflHOEVJuSw KbYDubIrOiHDTNiD0gGSzgpuscczfjq/1vS9wW/d372VHMFZCsCAl5VR7TBTMpWOcKNu ktc/NWNl3Yx9osVKkySms2hRh6iWheqq1YM6X0//eScP93Kn+SD+akSrFkcZO68cxkGb f8QWY4R3rdx4OPaGIGl2JcbtcAToN49A9JHtCLWpSLlhhvBMnLdyVRYi7O/iIFUcwxGb oJgfuls+PsY5clyX19ryah2S3XJT8uMo76FkQeXKbdhiseSZq1SYtgyttQWjpSNSoSAc OVbg== X-Forwarded-Encrypted: i=1; AJvYcCWCyZ0g414V8pfqU3eZDFuJOKmAiebZmDVZRaveei6ZcqmgUe+pZMUSW3ER0/qt+iWGHJA7Q2V7Pjl6X7F3ozRUs8Jfbct3yDGefEpS X-Gm-Message-State: AOJu0Ywzougdw+UZRGLwUZfOQgIGLflg0pVdpEyTR6A73RFDnJut0RU7 zIA4UK3abTnoZZQ01fxDnQa3b5uoDo43GPrKu1PS+gJ383TT0huCNfU2RALIWkI= X-Received: by 2002:a17:907:94d1:b0:a46:8846:5abe with SMTP id dn17-20020a17090794d100b00a4688465abemr8273080ejc.62.1710784840993; Mon, 18 Mar 2024 11:00:40 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id jw10-20020a170906e94a00b00a46c743bc6bsm969288ejb.32.2024.03.18.11.00.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 11:00:40 -0700 (PDT) Message-ID: Date: Mon, 18 Mar 2024 19:00:38 +0100 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 2/2] hwmon: pmbus: adp1050 : Add driver support Content-Language: en-US To: Guenter Roeck , Radu Sabau , Jean Delvare , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Delphine CC Chiu , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-i2c@vger.kernel.org References: <20240318112140.385244-1-radu.sabau@analog.com> <20240318112140.385244-3-radu.sabau@analog.com> <04b39945-e4e1-43bd-83bf-0d7eb3730352@linaro.org> <8adceac6-9b23-4457-bb9a-8f7e55a581f9@roeck-us.net> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68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47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <8adceac6-9b23-4457-bb9a-8f7e55a581f9@roeck-us.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 18/03/2024 17:48, Guenter Roeck wrote: > On 3/18/24 09:12, Krzysztof Kozlowski wrote: >> On 18/03/2024 12:21, Radu Sabau wrote: >>> Add support for ADP1050 Digital Controller for Isolated Power Supplies >>> with PMBus interface Voltage, Current and Temperature Monitor. >>> >> >> ... >> >>> +static int adp1050_probe(struct i2c_client *client) >>> +{ >>> + u32 vin_scale_monitor, iin_scale_monitor; >>> + int ret; >>> + >>> + if (!i2c_check_functionality(client->adapter, >>> + I2C_FUNC_SMBUS_WRITE_WORD_DATA)) >>> + return -ENODEV; >>> + >>> + /* Unlock CHIP's password in order to be able to read/write to it's >>> + * VIN_SCALE and IIN_SCALE registers. >>> + */ >>> + ret = i2c_smbus_write_word_data(client, ADP1050_CHIP_PASSWORD, 0xFFFF); >>> + if (ret < 0) { >>> + dev_err_probe(&client->dev, "Device can't be unlocked.\n"); >> >> Syntax is: return dev_err_probe(). Same in other places. >> > > dev_err_probe() expects the error number as second parameter, so I don't > really understand how the above even compiles. I did not explain the arguments, because they are obvious... but if you need so: return dev_err_probe(&client->dev, ret, "Device can't be unlocked.\n"); Best regards, Krzysztof