[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e3cd0e11-e516-4cf6-b8f8-5cf2b5a236a4@riscstar.com>
Date: Thu, 31 Jul 2025 08:28:21 -0500
From: Alex Elder <elder@...cstar.com>
To: Lee Jones <lee@...nel.org>
Cc: lgirdwood@...il.com, broonie@...nel.org, alexandre.belloni@...tlin.com,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org, mat.jonczyk@...pl,
dlan@...too.org, paul.walmsley@...ive.com, palmer@...belt.com,
aou@...s.berkeley.edu, alex@...ti.fr, linux.amoon@...il.com,
troymitchell988@...il.com, guodong@...cstar.com, linux-rtc@...r.kernel.org,
devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
spacemit@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 2/8] mfd: simple-mfd-i2c: specify max_register
On 7/31/25 8:18 AM, Lee Jones wrote:
> On Sat, 26 Jul 2025, Alex Elder wrote:
>
>> All devices supported by simple MFD use the same 8-bit register 8-bit
>> value regmap configuration. There is an option available for a device
>> to specify a custom configuration, but no existing device uses it.
>>
>> Rather than requiring a "full" regmap configuration to be provided to
>> change only the max_register value, Lee Jones suggested allowing
>> max_register to be specified in the simple_mfd_data structure. The
>> 8-bit register 8-bit configuration is still used by default, but
>> max_register is also applied if it is non-zero.
>>
>> If both regmap_config and max_register are provided, the max_register
>> field in the regmap_config structure is ignored.
>>
>> Signed-off-by: Alex Elder <elder@...cstar.com>
>> Suggested-by: Lee Jones <lee@...nel.org>
>> ---
>> v10: - Rename simple_regmap_config() -> simple_regmap_config_get()
>> - Introduce simple_regmap_config_put() to free regmap_config
>>
>> drivers/mfd/simple-mfd-i2c.c | 45 ++++++++++++++++++++++++++++++++----
>> drivers/mfd/simple-mfd-i2c.h | 5 +---
>> 2 files changed, 41 insertions(+), 9 deletions(-)
>
> This has gone from an in-function 11 line change to 50 lines and the
> inclusion of 2 new functions. As much as I _really_ appreciate the time
> and effort you have put into this [0], the added complexity being added
> here doesn't sit right with me. How would you like to go back to your
> v4 idea of providing a bespoke regmap_config for for device?
I LOVE this suggestion. I will send v11 shortly and it will
be very much like v6 (or something like that).
> [0] Beers on me for sending you down this path!
I'm looking forward to seeing you again, beer or not.
Thanks Lee.
-Alex
Powered by blists - more mailing lists