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]     [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