lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250731134148.GI1049189@google.com>
Date: Thu, 31 Jul 2025 14:41:48 +0100
From: Lee Jones <lee@...nel.org>
To: Alex Elder <elder@...cstar.com>
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 Thu, 31 Jul 2025, Alex Elder wrote:

> 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.

Likewise!  =:-)

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ