Re: [RFC PATCH v3 2/5] mfd: add driver for Marvell 88PM886 PMIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > +static int pm886_initialize_subregmaps(struct pm886_chip *chip)
> > > +{
> > > +	struct device *dev = &chip->client->dev;
> > > +	struct i2c_client *page;
> > > +	struct regmap *regmap;
> > > +	int err;
> > > +
> > > +	/* regulators page */
> > > +	page = devm_i2c_new_dummy_device(dev, chip->client->adapter,
> > > +				chip->client->addr + PM886_PAGE_OFFSET_REGULATORS);
> > > +	if (IS_ERR(page)) {
> > > +		err = PTR_ERR(page);
> > > +		dev_err(dev, "Failed to initialize regulators client: %d\n", err);
> > > +		return err;
> > > +	}
> > > +	regmap = devm_regmap_init_i2c(page, &pm886_i2c_regmap);
> > > +	if (IS_ERR(regmap)) {
> > > +		err = PTR_ERR(regmap);
> > > +		dev_err(dev, "Failed to initialize regulators regmap: %d\n", err);
> > > +		return err;
> > > +	}
> > > +	chip->regmaps[PM886_REGMAP_REGULATORS] = regmap;
> >
> > Except for the regulator driver, where else is the regulators regmap used?
> 
> Nowhere, at least as of now. So you are saying that I should initialize
> the regmap in the regulator driver?

I am.

-- 
Lee Jones [李琼斯]




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux