Re: [PATCH 3/8] iio: adc: ad7124: Switch from of specific to fwnode based property handling

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

 



On Mon, 19 Feb 2024 13:58:20 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Sun, Feb 18, 2024 at 05:27:26PM +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > Using the generic firmware data access functions from property.h
> > provides a number of advantages:
> >  1) Works with different firmware types.
> >  2) Doesn't provide a 'bad' example for new IIO drivers.
> >  3) Lets us use the new _scoped() loops with automatic reference count
> >     cleanup for fwnode_handle  
> 
> Similar remarks as per other patch series...
> 
> ...
> 
> >  	struct ad7124_state *st = iio_priv(indio_dev);
> >  	struct ad7124_channel_config *cfg;
> >  	struct ad7124_channel *channels;
> > -	struct device_node *child;
> >  	struct iio_chan_spec *chan;
> >  	unsigned int ain[2], channel = 0, tmp;  
> 
> Shouldn't ain be u32?
> 
> >  	int ret;  
> 
> ...
> 
> > +		ret = fwnode_property_read_u32_array(child, "diff-channels",
> > +						     ain, 2);  
> 
> ARRAY_SIZE()
> 
> 

Agreed.  Nuno or other Analog folk, want to clean these up?

Jonathan




[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