lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251115181254.32b00b34@jic23-huawei>
Date: Sat, 15 Nov 2025 18:12:54 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: "Miclaus, Antoniu" <Antoniu.Miclaus@...log.com>
Cc: "robh@...nel.org" <robh@...nel.org>, "conor+dt@...nel.org"
 <conor+dt@...nel.org>, "linux-iio@...r.kernel.org"
 <linux-iio@...r.kernel.org>, "linux-kernel@...r.kernel.org"
 <linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
 <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] iio: amplifiers: adl8113: add driver support


> > > +
> > > +static int adl8113_read_raw(struct iio_dev *indio_dev,
> > > +			    struct iio_chan_spec const *chan,
> > > +			    int *val, int *val2, long mask)
> > > +{
> > > +	struct adl8113_state *st = iio_priv(indio_dev);
> > > +	int ret;
> > > +
> > > +	switch (mask) {
> > > +	case IIO_CHAN_INFO_HARDWAREGAIN:
> > > +		switch (st->current_mode) {
> > > +		case ADL8113_INTERNAL_AMPLIFIER:
> > > +			*val = 14;
> > > +			*val2 = 0;
> > > +			ret = IIO_VAL_INT_PLUS_MICRO_DB;  
> > return ...
> >   
> > > +			break;
> > > +		case ADL8113_INTERNAL_BYPASS:
> > > +			*val = 0;
> > > +			*val2 = 0;  
> > gain of bypass = 1.0 rather than 0.0 which is open circuit gain.  
> Isn't this supposed to be a dB value since I am returning IIO_VAL_INT_PLUS_MICRO_DB? Linear gain of 1 = 0dB.

Good point. I missed the DB type.


Thanks,

J

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ