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]
Date:   Mon, 19 Aug 2019 12:55:19 +0200
From:   Pavel Machek <pavel@....cz>
To:     Dan Murphy <dmurphy@...com>
Cc:     jacek.anaszewski@...il.com, tony@...mide.com, sre@...nel.org,
        nekit1000@...il.com, mpartap@....net, merlijn@...zup.org,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] leds: lm3532: Add full scale current configuration

Hi!

> Allow the full scale current to be configured at init.
> Valid rangles are 5mA->29.8mA.
> 
> Signed-off-by: Dan Murphy <dmurphy@...com>

> @@ -121,6 +125,7 @@ struct lm3532_als_data {
>   * @mode - Mode of the LED string
>   * @ctrl_brt_pointer - Zone target register that controls the sink
>   * @num_leds - Number of LED strings are supported in this array
> + * @full_scale_current - The full-scale current setting for the current sink.
>   * @led_strings - The LED strings supported in this array
>   * @label - LED label
>   */
> @@ -130,8 +135,9 @@ struct lm3532_led {
>  
>  	int control_bank;
>  	int mode;
> -	int ctrl_brt_pointer;
>  	int num_leds;
> +	int ctrl_brt_pointer;
> +	int full_scale_current;
>  	u32 led_strings[LM3532_MAX_CONTROL_BANKS];
>  	char label[LED_MAX_NAME_SIZE];
>  };

No need to move ctrl_brt_pointer... to keep order consistent with docs. 

> +		fs_current_val = led->full_scale_current - LM3532_FS_CURR_MIN /
> +				 LM3532_FS_CURR_STEP;

The computation is wrong ... needs () AFAICT.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ