[PATCH] Input: da9052_tsi: make TSI reference regulator configurable

Dmitry Torokhov dmitry.torokhov at gmail.com
Sat Mar 23 02:58:20 EST 2013


On Friday, March 22, 2013 12:51:23 PM Fabio Estevam wrote:
> Philipp Zabel wrote:
> >  	if (!tsi->stopped) {
> > 
> > +		error = regulator_enable(tsi->tsiref);
> > +		if (error < 0) {
> > +			dev_err(tsi->da9052->dev,
> > +				"Failed to enable TSIREF regualtor: %d\n",
> 
> s/regualtor/regulator
> 
> > @@ -274,12 +287,20 @@ static int da9052_ts_probe(struct platform_device
> > *pdev)> 
> >  	/* Disable ADC */
> >  	da9052_ts_adc_toggle(tsi, false);
> > 
> > +	tsi->tsiref = regulator_get(tsi->da9052->dev, "tsiref");
> 
> You could use devm_regulator_get here ...

The rest of the driver does not use managed resources. Mixing styles is not 
the best idea.

Thanks.

-- 
Dmitry


More information about the devicetree-discuss mailing list