Re: [PATCH v2 2/2] Input: edt-ft5x06 - add support for iovcc-supply

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

 



On Mon, May 10, 2021 at 11:09:24PM +0300, Andy Shevchenko wrote:
> On Mon, May 10, 2021 at 09:48:48PM +0200, Ondřej Jirman wrote:
> > On Mon, May 10, 2021 at 09:31:08PM +0200, Stephan Gerhold wrote:
> 
> > > +	tsdata->iovcc = devm_regulator_get(&client->dev, "iovcc");
> > > +	if (IS_ERR(tsdata->iovcc)) {
> > > +		error = PTR_ERR(tsdata->iovcc);
> > > +		if (error != -EPROBE_DEFER)
> > > +			dev_err(&client->dev,
> > > +				"failed to request iovcc regulator: %d\n", error);
> > 
> > Please use dev_err_probe instead. If this pattern is used for vcc-supply, maybe
> > change that too. Maybe also consider using a bulk regulator API.
> 
> Dmitry seems is having something against it last time I remember it was
> discussed with him.

It basically does the same thing this does, except that you can figure out
the failure later on from sysfs more easily just by looking at:

   /sys/kernel/debug/devices_deferred

And you'll see the error message there to help you figure out the dependency
that failed. What's to hate about this? :)

kind regards,
	o.

> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 



[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