LKML Archive mirror
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: amergnat@baylibre.com, broonie@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, djakov@kernel.org,
	gustavoars@kernel.org, henryc.chen@mediatek.com,
	keescook@chromium.org, kernel@collabora.com,
	krzysztof.kozlowski+dt@linaro.org, lgirdwood@gmail.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-pm@vger.kernel.org, matthias.bgg@gmail.com,
	robh@kernel.org, wenst@chromium.org
Subject: Re: [PATCH v5 6/7] regulator: Add refactored mtk-dvfsrc-regulator driver
Date: Wed, 24 Apr 2024 12:35:04 +0200	[thread overview]
Message-ID: <93c12354-2e4d-4b21-bc96-eeb55442e365@wanadoo.fr> (raw)
In-Reply-To: <20240424095416.1105639-7-angelogioacchino.delregno@collabora.com>

Le 24/04/2024 à 11:54, AngeloGioacchino Del Regno a écrit :
> The previous driver never worked, and never got even compiled because
> it was missing the DVFSRC driver entirely, including needed neaders.
> 
> This is a full (or nearly full) refactoring of the MediaTek DVFSRC
> controlled Regulators driver, retaining support for the MT6873, MT8183
> and MT8192 SoC, and adding MT8195.
> 
> As part of the refactoring, this driver is now probed using its own
> devicetree compatible, as this is a child of the main DVFSRC driver
> and gets probed as a subnode of that.
> 
> Reviewed-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
> ---
>   drivers/regulator/mtk-dvfsrc-regulator.c | 196 +++++++++++++++++++++++
>   1 file changed, 196 insertions(+)
>   create mode 100644 drivers/regulator/mtk-dvfsrc-regulator.c
> 

...

> +static int dvfsrc_vcore_regulator_probe(struct platform_device *pdev)
> +{
> +	struct regulator_config config = { .dev = &pdev->dev };
> +	const struct dvfsrc_regulator_pdata *pdata;
> +	int i;
> +
> +	pdata = device_get_match_data(&pdev->dev);
> +	if (!pdata)
> +		return -EINVAL;
> +
> +	for (i = 0; i < pdata->size; i++) {
> +		struct regulator_desc *vrdesc = &pdata->descs[i];
> +		struct regulator_dev *rdev;
> +
> +		rdev = devm_regulator_register(&pdev->dev, vrdesc, &config);
> +		if (IS_ERR(rdev)) {
> +			dev_err(&pdev->dev, "failed to register %s\n", vrdesc->name);
> +			return PTR_ERR(rdev);

Hi,

Nit: (in case of v6)

	dev_err_probe()?

> +		}
> +	}
> +
> +	return 0;
> +}

...

CJ


  reply	other threads:[~2024-04-25  0:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  9:54 [PATCH v5 0/7] MediaTek DVFSRC Bus Bandwidth and Regulator knobs AngeloGioacchino Del Regno
2024-04-24  9:54 ` [PATCH v5 1/7] dt-bindings: regulator: Add bindings for MediaTek DVFSRC Regulators AngeloGioacchino Del Regno
2024-04-24  9:54 ` [PATCH v5 2/7] dt-bindings: interconnect: Add MediaTek EMI Interconnect bindings AngeloGioacchino Del Regno
2024-04-24  9:54 ` [PATCH v5 3/7] dt-bindings: soc: mediatek: Add DVFSRC bindings for MT8183 and MT8195 AngeloGioacchino Del Regno
2024-04-24  9:54 ` [PATCH v5 4/7] soc: mediatek: Add MediaTek DVFS Resource Collector (DVFSRC) driver AngeloGioacchino Del Regno
2024-04-24 19:04   ` Nathan Chancellor
2024-04-29  8:08     ` AngeloGioacchino Del Regno
2024-04-29 14:13   ` Georgi Djakov
2024-04-24  9:54 ` [PATCH v5 5/7] regulator: Remove mtk-dvfsrc-regulator.c AngeloGioacchino Del Regno
2024-04-24  9:54 ` [PATCH v5 6/7] regulator: Add refactored mtk-dvfsrc-regulator driver AngeloGioacchino Del Regno
2024-04-24 10:35   ` Christophe JAILLET [this message]
2024-04-24 12:53     ` AngeloGioacchino Del Regno
2024-04-24 12:54       ` AngeloGioacchino Del Regno
2024-04-24  9:54 ` [PATCH v5 7/7] interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver AngeloGioacchino Del Regno
2024-05-03 11:53   ` Georgi Djakov
2024-05-06 10:49     ` AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93c12354-2e4d-4b21-bc96-eeb55442e365@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djakov@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=henryc.chen@mediatek.com \
    --cc=keescook@chromium.org \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).