[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8f5c79e0-5f7e-4fe4-b9d7-60375e779892@collabora.com>
Date: Wed, 14 Jan 2026 10:26:42 +0100
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: 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, neil.armstrong@...aro.org,
sre@...nel.org, sboyd@...nel.org, krzk@...nel.org,
dmitry.baryshkov@....qualcomm.com, quic_wcheng@...cinc.com,
melody.olvera@....qualcomm.com, quic_nsekar@...cinc.com,
ivo.ivanov.ivanov1@...il.com, abelvesa@...nel.org, luca.weiss@...rphone.com,
konrad.dybcio@....qualcomm.com, mitltlatltl@...il.com,
krishna.kurapati@....qualcomm.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, Abel Vesa <abel.vesa@...aro.org>
Subject: Re: [PATCH v7 07/10] phy: qualcomm: eusb2-repeater: Migrate to
devm_spmi_subdevice_alloc_and_add()
Il 14/01/26 09:59, Andy Shevchenko ha scritto:
> On Wed, Jan 14, 2026 at 09:39:54AM +0100, AngeloGioacchino Del Regno wrote:
>> Some Qualcomm PMICs integrate an USB Repeater device, used to
>> convert between eUSB2 and USB 2.0 signaling levels, reachable
>> in a specific address range over SPMI.
>>
>> Instead of using the parent SPMI device (the main PMIC) as a kind
>> of syscon in this driver, register a new SPMI sub-device for EUSB2
>> 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.
>
> Same comments and actually one more.
>
> ...
>
>> + struct regmap_config eusb2_regmap_config = {
>> + .reg_bits = 16,
>> + .val_bits = 8,
>> + .max_register = 0x100,
>> + .fast_io = true,
>> + };
>
> This is third time of the same. Make it part of SPMI core and export to
> the users. Or are they semantically different like different slices?
> In that case you can export it under generic name like
>
> spmi_default_slice_regmap_config
>
There are more complicated devices around that I didn't port to the new
spmi subdevices, and I really don't want to make a default for now.
At least some of those need different params (including some MediaTek ones
that are not upstream yet).
Can we please let this in and *then* see how much can be commonized after
the majority of more complicated drivers are migrated in the future?
Regards,
Angelo
Powered by blists - more mailing lists