[PATCH v1 5/7] misc: qcom-coincell: Migrate to devm_spmi_subdevice_alloc_and_add()
Greg KH
gregkh at linuxfoundation.org
Mon Jul 21 01:58:27 PDT 2025
On Mon, Jul 21, 2025 at 09:55:23AM +0200, AngeloGioacchino Del Regno wrote:
> Some Qualcomm PMICs integrate a charger for coincells, usually
> powering an RTC when external (or main battery) power is missing.
>
> Instead of using the parent SPMI device (the main PMIC) as a kind
> of syscon in this driver, register a new SPMI sub-device and
> initialize its own regmap with this sub-device's specific base
> address, retrieved from the devicetree.
>
> This allows to stop manually adding the register base address to
> every R/W call in this driver, as this can be, and is now, handled
> by the regmap API instead.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> ---
> drivers/misc/qcom-coincell.c | 37 ++++++++++++++++++++++++++----------
> 1 file changed, 27 insertions(+), 10 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
More information about the linux-phy
mailing list