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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Jan 2024 16:36:12 +0100
From: "Karel Balej" <karelb@...li.ms.mff.cuni.cz>
To: "Lee Jones" <lee@...nel.org>
Cc: "Karel Balej" <balejk@...fyz.cz>, "Rob Herring" <robh+dt@...nel.org>,
 "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>, "Conor Dooley"
 <conor+dt@...nel.org>, "Liam Girdwood" <lgirdwood@...il.com>, "Mark Brown"
 <broonie@...nel.org>, <devicetree@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, Duje Mihanović
 <duje.mihanovic@...le.hr>, <~postmarketos/upstreaming@...ts.sr.ht>,
 <phone-devel@...r.kernel.org>
Subject: Re: [RFC PATCH 1/5] mfd: 88pm88x: differences with respect to the
 PMIC RFC series

On Thu Jan 11, 2024 at 4:25 PM CET, Lee Jones wrote:

[...]

> > > > diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88x.h
> > > > index a34c57447827..9a335f6b9c07 100644
> > > > --- a/include/linux/mfd/88pm88x.h
> > > > +++ b/include/linux/mfd/88pm88x.h
> > > > @@ -49,6 +49,8 @@ struct pm88x_data {
> > > >  	unsigned int whoami;
> > > >  	struct reg_sequence *presets;
> > > >  	unsigned int num_presets;
> > > > +	struct mfd_cell *devs;
> > > > +	unsigned int num_devs;
> > >
> > > Why are you adding extra abstraction?
> > 
> > Right, this is probably not necessary now since I'm only implementing
> > support for one of the chips - it's just that I keep thinking about it
> > as a driver for both of them and thus tend to write it a bit more
> > abstractly. Shall I then drop this and also the `presets` member which
> > is also chip-specific?
>
> Even if you were to support multiple devices, this strategy is unusual
> and isn't likely to be accepted.

May I please ask what the recommended strategy is then? `switch`ing on
the chip ID? I have taken this approach because it seemed to produce a
cleaner/more straightforward code in comparison to that. Or are you only
talking about the chip cells/subdevices in particular?

Thank you,
K. B.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ