Re: [PATCH v6 1/3] iio: proximity: Add sx9360 support

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

 



On Sun, 9 Jan 2022 11:00:00 +0000
Jonathan Cameron <jic23@xxxxxxxxxxxxxxxxxxxxx> wrote:

> On Sat,  1 Jan 2022 12:37:58 -0800
> Gwendal Grignou <gwendal@xxxxxxxxxxxx> wrote:
> 
> > A simplified version of SX9324, it only have one pin and
> > 2 phases (aka channels).
> > Only one event is presented.
> > 
> > Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> > Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> > ---  
> Series applied but I got a build warning which lead me to take another look
> at he below code.

Follow up tweak like the 9324 patch this one had some {A, B } spacing so I've
changed that to { A, B }

The wonders of editing history ;)

Thanks,

Jonathan

> 
> ...
> 
> > +static int sx9360_set_samp_freq(struct sx_common_data *data,
> > +				int val, int val2)
> > +{
> > +	int ret, reg;
> > +	__be16 buf;
> > +
> > +	reg = val * 8192 / SX9360_FOSC_HZ + val2 * 8192 / (SX9360_FOSC_MHZ);
> > +	buf = cpu_to_be16(val);  
> I've changed this to cpu_to_be16(reg) which I'm assuming was the intent.
> 
> > +	mutex_lock(&data->mutex);
> > +
> > +	ret = regmap_bulk_write(data->regmap, SX9360_REG_GNRL_CTRL1, &buf,
> > +				sizeof(buf));
> > +
> > +	mutex_unlock(&data->mutex);
> > +
> > +	return ret;
> > +}  




[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