Re: [PATCH v5 2/3] iio: pressure: Honeywell mprls0025pa pressure sensor

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

 




> 
> > +	if (dev_fwnode(dev)) {  
> 
> Why not simply use defaults?

Potential for inconsistent set if a firmware provides some but not others?
(at least that was my assumption that could well be wrong)

> 
> > +		ret = device_property_read_u32(dev, "honeywell,pmin-pascal",
> > +								&data->pmin);
> > +		if (ret)
> > +			return dev_err_probe(dev, ret,
> > +				"honeywell,pmin-pascal could not be read\n");
> > +		ret = device_property_read_u32(dev, "honeywell,pmax-pascal",
> > +								&data->pmax);
> > +		if (ret)
> > +			return dev_err_probe(dev, ret,
> > +				"honeywell,pmax-pascal could not be read\n");
> > +		ret = device_property_read_u32(dev,
> > +				"honeywell,transfer-function", &data->function);
> > +		if (ret)
> > +			return dev_err_probe(dev, ret,
> > +				"honeywell,transfer-function could not be read\n");
> > +		if (data->function > MPR_FUNCTION_C)
> > +			return dev_err_probe(dev, -EINVAL,  



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux