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]
Message-Id: <D0HE07BHD1T8.HQLIBUHTRVGT@matfyz.cz>
Date: Thu, 11 Apr 2024 17:09:40 +0200
From: "Karel Balej" <balejk@...fyz.cz>
To: "Lee Jones" <lee@...nel.org>
Cc: "Rob Herring" <robh@...nel.org>,
        "Krzysztof Kozlowski"
 <krzysztof.kozlowski+dt@...aro.org>,
        "Conor Dooley" <conor+dt@...nel.org>,
        "Dmitry Torokhov" <dmitry.torokhov@...il.com>,
        "Liam Girdwood"
 <lgirdwood@...il.com>,
        "Mark Brown" <broonie@...nel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-input@...r.kernel.org>,
        Duje Mihanović
 <duje.mihanovic@...le.hr>,
        <~postmarketos/upstreaming@...ts.sr.ht>, <phone-devel@...r.kernel.org>
Subject: Re: [PATCH 2/5] mfd: add driver for Marvell 88PM886 PMIC

Lee Jones, 2024-04-11T12:37:26+01:00:
[...]
> > diff --git a/drivers/mfd/88pm886.c b/drivers/mfd/88pm886.c
> > new file mode 100644
> > index 000000000000..e06d418a5da9
> > --- /dev/null
> > +++ b/drivers/mfd/88pm886.c
> > @@ -0,0 +1,157 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +#include <linux/i2c.h>
> > +#include <linux/mfd/core.h>
> > +#include <linux/module.h>
> > +#include <linux/notifier.h>
> > +#include <linux/of.h>
> > +#include <linux/reboot.h>
> > +#include <linux/regmap.h>
> > +
> > +#include <linux/mfd/88pm886.h>
> > +
> > +#define PM886_REG_INT_STATUS1			0x05
> > +
> > +#define PM886_REG_INT_ENA_1			0x0a
> > +#define PM886_INT_ENA1_ONKEY			BIT(0)
> > +
> > +#define PM886_IRQ_ONKEY				0
> > +
> > +#define PM886_REGMAP_CONF_MAX_REG		0xef
>
> Why have you split the defines up between here and the header?

I tried to keep defines tied to the code which uses them and only put
defines needed in multiple places in the header. With the exception of
closely related things, such as register bits which I am keeping
together with the respective register definitions for clarity. Does that
not make sense?

> Please place them all in the header.

Would you then also have me move all the definitions from the regulators
driver there?

[...]

> > +	err = devm_mfd_add_devices(dev, 0, pm886_devs, ARRAY_SIZE(pm886_devs),
>
> Why 0?

PLATFORM_DEVID_AUTO then? Or will PLATFORM_DEVID_NONE suffice since the
cells all have different names now (it would probably cause problems
though if the driver was used multiple times for some reason, wouldn't
it?)?

Thank you,
K. B.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ