Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1449568lqp; Mon, 15 Apr 2024 07:01:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWx+ziOpwj7h7dOOnVAnuSHOBNXwvmkPWDwpXC56o8fn7IfURz04R4r9nLKNgurOifbvM2537XuL97v2ZYbyb6Gxo6u10TkmAeczoLB+Q== X-Google-Smtp-Source: AGHT+IHIOSv+e6xEVGdZuiSBG+7pHQ2iQobczeXtodAPjB2wFIyhHfcTSOwz2qsacJPg9MVmhbSP X-Received: by 2002:a17:906:1355:b0:a52:1770:965 with SMTP id x21-20020a170906135500b00a5217700965mr6149327ejb.42.1713189700188; Mon, 15 Apr 2024 07:01:40 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w16-20020a170906b19000b00a4e588e654dsi4449359ejy.427.2024.04.15.07.01.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 07:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=YYy7YDQ4; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-145313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (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 am.mirrors.kernel.org (Postfix) with ESMTPS id 424CB1F22340 for ; Mon, 15 Apr 2024 14:01:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 064CA74429; Mon, 15 Apr 2024 14:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YYy7YDQ4" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 2B26873189; Mon, 15 Apr 2024 14:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713189675; cv=none; b=dG8Oky7s2knWYGRKj/Fif93wlVtGclnJrhfowU+usyd2NqbjgNm901oj+bBTq1U+80ilR483qt/mt+cwprGxHha5aU8wxZki8+NpX38NHEN2RymONNBqdPXu05+e8xeSQvsYu8PcLh+Gu4fFURnWIFxJkUxwJIjf8mBIEaMfKPI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713189675; c=relaxed/simple; bh=lpBPkRDdCzQNZjrZ+c7eHd34o93n0pvgK/Pf7ypBlwA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ALRhmPXjajJNctqOiAWAC07ByQ3KWZnyRcJ2ArhErBRtdCrFyBE8SxN0jBpuJclX7q1UCxeaZUuYLAqioNRnLkE9zarTtCdj5lvhtezz+jWeB2Xv3RkbMF1h3B6Hvqyhb88b3SNEVQWxG+2sj4CjFYZNW/uieMwTuthI7yofDUs= 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=YYy7YDQ4; arc=none smtp.client-ip=209.85.208.49 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-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-570175e8e6fso1991071a12.3; Mon, 15 Apr 2024 07:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713189668; x=1713794468; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p24MW4lT8Qhns1Y9ZBylqR7BJKJfhrh/oDdc/sbfEQk=; b=YYy7YDQ4ruW5DHpniNynHooTjnzHWdQpQJLKOP93yhJyq7ZSK1lguAXFxIGzSq7Tsl ptEjrb15JY3BZJjco7y/jbqs4kBGBd+ZH4uePhscuD3wvzeRnc4aizIoTuHB8W2ARd7K GJJkaqTra80UR5vMLcpyGf4ag09OxG3U+P5v3DWvJhSQbqh812o4vVB7p5Rn42VVsvbE iK/DK3AFeerzGNLS/DN+g0cs+ctyfTh4Gi2BaOGU2YTqPJj3/NPvnZYNLcSkSUKsx7p2 wo8QPSwbjH3mF7CRLR5bAqqPzZuqb3AkZk0q94earTjvfwD6E3Tl8qE6l5pav6zsze0D uNlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713189668; x=1713794468; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p24MW4lT8Qhns1Y9ZBylqR7BJKJfhrh/oDdc/sbfEQk=; b=Dmuz3BcfW93mDntMQ86WIJkJOP3Xafq/Oz4IMFnUp+MVTC14BQm84z+q/lva/iCb9a rpB+7xat+VcILl1rP846FHyXWMkLZ9r3ndcblSxkz5t361z1tEewJpcxxHiikZw/EFI5 aQc3EPBNRnFm0g+fSZ8aB5+bdE+9kRgiVVE76XzToK8h4ZJP4CH1NaxoyAhFmXNpOVeL 9/03cQC/JDWbkAkCAokudOJZLPqio7q0ZqHSBtVxWkWHGEdZFovYmC7ucDFmNU56yaxx RwWLr9rYhe3BBjxXWSGueuSfJxuMo0nWGNQvkNUXc6//+sJh4FiJuzAuAFLtBkBVz4eA Hb1A== X-Forwarded-Encrypted: i=1; AJvYcCU1yX8UW6RUZdPZbP2AZY9Yvf73ljjFgnH0PkA2GGgvbZlskk+dP4Z6VOPbssXKkHtaQGh0KZmSxS0MVpPv2ipoUes7BIVFEC495oWPIjte616Yj0pzUBRIb6NtXYpGcS3XvBBHWk8AVqaVcqG9pYnIKo/oDyP17ToasIqXJ9BEVZHJW90= X-Gm-Message-State: AOJu0YzlBJMcTsa/MPchpxgtkjSRRbogBRpEL0L4HbJzBQP7hlnz3SPY +H5Ftun4oh687MIImh+BvTxyZOrbB4EkdmEYnSEu2Bmu1bK6AJvhWEp+o8Z+zBF3PX51k9Czzw3 vq4Bhby20paF1zDH2udi1XoOOP2w= X-Received: by 2002:a17:907:b9d5:b0:a54:c130:21fd with SMTP id xa21-20020a170907b9d500b00a54c13021fdmr983688ejc.13.1713189668195; Mon, 15 Apr 2024 07:01:08 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240415-pinctrl-scmi-v10-0-59c6e7a586ee@nxp.com> <20240415-pinctrl-scmi-v10-4-59c6e7a586ee@nxp.com> In-Reply-To: <20240415-pinctrl-scmi-v10-4-59c6e7a586ee@nxp.com> From: Andy Shevchenko Date: Mon, 15 Apr 2024 17:00:31 +0300 Message-ID: Subject: Re: [PATCH v10 4/4] pinctrl: Implementation of the generic scmi-pinctrl driver To: "Peng Fan (OSS)" Cc: Sudeep Holla , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Dan Carpenter , Dhruva Gole , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Peng Fan , Oleksii Moisieiev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 15, 2024 at 11:43=E2=80=AFAM Peng Fan (OSS) wrote: > > From: Peng Fan > > scmi-pinctrl driver implements pinctrl driver interface and using > SCMI protocol to redirect messages from pinctrl subsystem SDK to > SCMI platform firmware, which does the changes in HW. Below are some cosmetics, but in general LGTM, thanks! Reviewed-by: Andy Shevchenko .. > +#include > +#include The second one is guaranteed to be included by the first one, so dev_printk.h can be removed. > +#include + errno.h as ENOTSUPP is defined there and surprisingly err.h doesn't include that. + mod_devicetable.h (for the ID table type definition) > +#include > +#include > +#include > +#include .. > +/* Define num configs, if not large than 4 use stack, else use kcalloc *= / kcalloc() .. > + ret =3D pinctrl_ops->settings_get_one(pmx->ph, pin, PIN_TYPE, typ= e, > + &config_value); > + if (ret) { > + /* Convert SCMI error code to PINCTRL expected error code= */ > + if (ret =3D=3D -EOPNOTSUPP) > + ret =3D -ENOTSUPP; > + return ret; > + } It can be split as ret =3D pinctrl_ops->settings_get_one(pmx->ph, pin, PIN_TYPE, type, &config_value); /* Convert SCMI error code to PINCTRL expected error code */ if (ret =3D=3D -EOPNOTSUPP) return -ENOTSUPP; if (ret) return ret; .. > + ret =3D pinctrl_ops->settings_get_one(pmx->ph, group, GROUP_TYPE,= type, > + &config_value); > + if (ret) { > + /* Convert SCMI error code to PINCTRL expected error code= */ > + if (ret =3D=3D -EOPNOTSUPP) > + ret =3D -ENOTSUPP; > + return ret; > + } As per above. -- With Best Regards, Andy Shevchenko