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: <20231119142547.6524160d@jic23-huawei>
Date:   Sun, 19 Nov 2023 14:25:47 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Javier Carrasco <javier.carrasco.cruz@...il.com>
Cc:     Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] iio: light: add VEML6075 UVA and UVB light sensor
 driver

On Sun, 19 Nov 2023 06:08:25 +0100
Javier Carrasco <javier.carrasco.cruz@...il.com> wrote:

> On 19.11.23 05:58, Javier Carrasco wrote:
> > The Vishay VEMl6075 is a low power, 16-bit resolution UVA and UVB
> > light sensor with I2C interface and noise compensation (visible and
> > infrarred).
> > 
> > Every UV channel generates an output measured in counts per integration
> > period. Available integration times are 50 ms, 100 ms, 200 ms, 400 ms
> > and 800 ms,
> > 
> > This driver adds support for both UV channels and the ultraviolet
> > index (UVI) inferred from them according to the device application note
> > with open-air (no teflon) coefficients.
> > 
> > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
Hi Javier,

One process note highlighted by this email.
Please crop to only relevant text when replying.  Scrolling takes time!
+ makes it hard to be sure we didn't miss anything buried in hundreds
of lines of unnecessary context.

I'm jet lagged so may be more grumpy than average today :(

Thanks,

Jonathan


> > +static int veml6075_uva_comp(int raw_uva, int comp1, int comp2)
> > +{
> > +	int comp1a_c, comp2a_c, uva_comp;
> > +
> > +	comp1a_c = (comp1 * VEML6075_A_COEF) / 1000U;
> > +	comp2a_c = (comp2 * VEML6075_B_COEF) / 1000U;
> > +	uva_comp = raw_uva - comp1a_c - comp2a_c;
> > +	pr_err("JCC: uva=%d, c1=%d, c2=%d, c1ca=%d, c2ca=%d, uvac=%d\n",
> > +	       raw_uva, comp1, comp2, comp1a_c, comp2a_c, uva_comp);  
> Obviously this debug message should be gone and it will be removed for v2.
> > +
> > +	return clamp_val(uva_comp, 0, U16_MAX);
> > +}
> > +
> > +static int veml6075_uvb_comp(int raw_uvb, int comp1, int comp2)
> > +{
> > +	int comp1b_c, comp2b_c, uvb_comp;
> > +
> > +	comp1b_c = (comp1 * VEML6075_C_COEF) / 1000U;
> > +	comp2b_c = (comp2 * VEML6075_D_COEF) / 1000U;
> > +	uvb_comp = raw_uvb - comp1b_c - comp2b_c;
> > +	pr_err("JCC: uvb=%d, c1=%d, c2=%d, c1cb=%d, c2cb=%d, uvbc=%d\n",
> > +	       raw_uvb, comp1, comp2, comp1b_c, comp2b_c, uvb_comp);  
> Same here.
> > +
> > +	return clamp_val(uvb_comp, 0, U16_MAX);
> > +}
> > +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ