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: <20250414193136.3daf0176@jic23-huawei>
Date: Mon, 14 Apr 2025 19:31:36 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 eraretuya@...il.com
Subject: Re: [PATCH v5 08/11] iio: accel: adxl345: add activity event
 feature


> > > @@ -1347,6 +1542,14 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap,
> > >               if (ret)
> > >                       return ret;
> > >
> > > +             ret = regmap_write(st->regmap, ADXL345_REG_ACT_INACT_CTRL, 0);
> > > +             if (ret)
> > > +                     return ret;
> > > +
> > > +             ret = regmap_write(st->regmap, ADXL345_REG_THRESH_ACT, 6);  
> >
> > 6 is a fairly random number. Add a comment for why this default.
> >  
> 
> My general intention is to provide +/- reasonable default configs,
> rather than leave it all to 0 or undefined, to allow to turn the event
> on and already catch at least something. In many cases those
> will be the default values from the older input driver, to keep a bit
> of a compatibility.
> Particular cases have actually recommendations in the datasheet and
> differ slightly to the input
> driver. I'm aware that the input driver probably is not a golden
> standard, but it worked at least for
> my tests. I may leave a general comment on the section, pls have a
> look into v6 if this is ok.
Comment sounds like what we need here so all good.

> 
> > > +             if (ret)
> > > +                     return ret;
> > > +
> > >               ret = regmap_write(st->regmap, ADXL345_REG_THRESH_TAP, tap_threshold);
> > >               if (ret)
> > >                       return ret;  
> >  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ