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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCshPOIHVqluhXYs@smile.fi.intel.com>
Date: Mon, 19 May 2025 15:17:00 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: jic23@...nel.org, dlechner@...libre.com, nuno.sa@...log.com,
	corbet@....net, lucas.p.stankus@...il.com, lars@...afoo.de,
	Michael.Hennerich@...log.com, linux-iio@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 10/12] iio: accel: adxl313: add inactivity sensing

On Sun, May 18, 2025 at 11:13:19AM +0000, Lothar Rubusch wrote:
> Extend the interrupt handler to process interrupts as inactivity events.
> Add functions to set threshold and period registers for inactivity. Add
> functions to enable / disable inactivity. Extend the fake iio channel to
> deal with inactivity events on x, y and z combined with AND.

...

>  	en = false;

You see, now it becomes even useless code.

> -	if (type == ADXL313_ACTIVITY)
> +	if (type == ADXL313_ACTIVITY) {
>  		en = cmd_en && threshold;
> +	} else {
> +		ret = regmap_read(data->regmap, ADXL313_REG_TIME_INACT, &inact_time_s);
> +		if (ret)
> +			return ret;
> +
> +		en = cmd_en && threshold && inact_time_s;
> +	}

...

> +			case IIO_EV_DIR_FALLING:
> +				ret = regmap_read(data->regmap,
> +						  adxl313_act_thresh_reg[ADXL313_INACTIVITY],
> +						  &inact_threshold);
> +				if (ret)
> +					return ret;
> +				*val = inact_threshold * 15625;
> +				*val2 = 1000000;

MICRO ?

> +				return IIO_VAL_FRACTIONAL;
>  			default:
>  				return -EINVAL;
>  			}

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ