[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aH4lwVpaiau1Ick3@smile.fi.intel.com>
Date: Mon, 21 Jul 2025 14:34:25 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: sboyd@...nel.org, jic23@...nel.org, dlechner@...libre.com,
nuno.sa@...log.com, andy@...nel.org, arnd@...db.de,
gregkh@...uxfoundation.org, srini@...nel.org, vkoul@...nel.org,
kishon@...nel.org, sre@...nel.org, krzysztof.kozlowski@...aro.org,
u.kleine-koenig@...libre.com, linux-arm-msm@...r.kernel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-pm@...r.kernel.org,
kernel@...labora.com, wenst@...omium.org
Subject: Re: [PATCH v1 1/7] spmi: Implement spmi_subdevice_alloc_and_add()
and devm variant
On Mon, Jul 21, 2025 at 09:55:19AM +0200, AngeloGioacchino Del Regno wrote:
> Some devices connected over the SPMI bus may be big, in the sense
> that those may be a complex of devices managed by a single chip
> over the SPMI bus, reachable through a single SID.
>
> Add new functions aimed at managing sub-devices of a SPMI device
> spmi_subdevice_alloc_and_add() and a spmi_subdevice_put_and_remove()
> for adding a new subdevice and removing it respectively, and also
> add their devm_* variants.
>
> The need for such functions comes from the existance of those
> complex Power Management ICs (PMICs), which feature one or many
> sub-devices, in some cases with these being even addressable on
> the chip in form of SPMI register ranges.
>
> Examples of those devices can be found in both Qualcomm platforms
> with their PMICs having PON, RTC, SDAM, GPIO controller, and other
> sub-devices, and in newer MediaTek platforms showing similar HW
> features and a similar layout with those also having many subdevs.
...
> EXPORT_SYMBOL_GPL(devm_spmi_controller_add);
> +EXPORT_SYMBOL_GPL(devm_spmi_subdevice_alloc_and_add);
I am wondering how hard to move these to a dedicated namespace.
Basically you can define a default namespace, and at the same time
add import to all (current) users.
...
> + dev_set_name(&sdev->dev,
> + "%d-%02x.%d.auto", sdev->ctrl->nr, sdev->usid, sub_sdev->devid);
No error check?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists