[Letux-kernel] [PATCH RFC 4/5] gnss: sirf: add a separate supply for a lna

Andreas Kemnade andreas at kemnade.info
Fri Nov 30 07:38:04 CET 2018


Hi,

On Tue, 27 Nov 2018 19:03:57 +0100
Pavel Machek <pavel at ucw.cz> wrote:

> Hi!
> 
> > Devices might have a separate lna between antenna output of the gps
> > chip and the antenna which might have a separate supply  
> 
> Might have.
> 
> > @@ -340,6 +349,12 @@ static int sirf_probe(struct serdev_device *serdev)
> >  		goto err_put_device;
> >  	}
> >  
> > +	data->lna = devm_regulator_get(dev, "lna");
> > +	if (IS_ERR(data->lna)) {
> > +		ret = PTR_ERR(data->lna);
> > +		goto err_put_device;
> > +	}
> > +  
> 
> But it is not optional in the code. Probably should be?

well, if it no lna regulator is defined in the dtb, the regulator
framework will return a dummy regulator. devm_regulator_get_optional()
would not do that and would require more error checking in the code.
But if there is some rule which says that devm_regulator_get_optional()
should be used here, I can of course change that.
Before sending a v2, is that the only issue here?

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20181130/138329a8/attachment.asc>


More information about the Letux-kernel mailing list