[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CZZL3MNOT0QG.2WDSNX9XD2RET@matfyz.cz>
Date: Thu, 21 Mar 2024 17:55:17 +0100
From: "Karel Balej" <balejk@...fyz.cz>
To: "Lee Jones" <lee@...nel.org>
Cc: "Rob Herring" <robh+dt@...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: [RFC PATCH v4 2/5] mfd: add driver for Marvell 88PM886 PMIC
Lee Jones, 2024-03-21T16:20:45+00:00:
> On Thu, 21 Mar 2024, Karel Balej wrote:
>
> > Lee Jones, 2024-03-21T15:42:11+00:00:
> > > On Mon, 11 Mar 2024, Karel Balej wrote:
> > > > diff --git a/include/linux/mfd/88pm886.h b/include/linux/mfd/88pm886.h
> > > > new file mode 100644
> > > > index 000000000000..a5e6524bb19d
> > > > --- /dev/null
> > > > +++ b/include/linux/mfd/88pm886.h
> > > > @@ -0,0 +1,38 @@
> > > > +/* SPDX-License-Identifier: GPL-2.0-only */
> > > > +#ifndef __MFD_88PM886_H
> > > > +#define __MFD_88PM886_H
> > > > +
> > > > +#include <linux/i2c.h>
> > > > +#include <linux/regmap.h>
> > > > +
> > > > +#define PM886_A1_CHIP_ID 0xa1
> > > > +
> > > > +#define PM886_REGMAP_CONF_MAX_REG 0xfe
> > > > +
> > > > +#define PM886_REG_ID 0x00
> > > > +
> > > > +#define PM886_REG_STATUS1 0x01
> > > > +#define PM886_ONKEY_STS1 BIT(0)
> > > > +
> > > > +#define PM886_REG_MISC_CONFIG1 0x14
> > > > +#define PM886_SW_PDOWN BIT(5)
> > > > +
> > > > +#define PM886_REG_MISC_CONFIG2 0x15
> > > > +#define PM886_INT_INV BIT(0)
> > > > +#define PM886_INT_CLEAR BIT(1)
> > > > +#define PM886_INT_RC 0x00
> > > > +#define PM886_INT_WC BIT(1)
> > > > +#define PM886_INT_MASK_MODE BIT(2)
> > > > +
> > > > +struct pm886_chip {
> > > > + struct i2c_client *client;
> > > > + unsigned int chip_id;
> > > > + struct regmap *regmap;
> > > > +};
> > > > +
> > > > +static const struct regmap_config pm886_i2c_regmap = {
> > > > + .reg_bits = 8,
> > > > + .val_bits = 8,
> > > > + .max_register = PM886_REGMAP_CONF_MAX_REG,
> > > > +};
> > >
> > > Why is this in here?
> >
> > Because since I moved the regulators regmap initialization into the
> > regulators driver, I need to access it from there.
>
> So move it into the regulators driver?
It is used in the MFD driver too for the base regmap.
K. B.
Powered by blists - more mailing lists