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]
Date:	Tue, 3 May 2011 18:28:17 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Jorge Eduardo Candelaria <jedu@...mlogic.co.uk>
Cc:	linux-kernel@...r.kernel.org, sameo@...ux.intel.com, lrg@...com,
	Graeme Gregory <gg@...mlogic.co.uk>, grant.likely@...retlab.ca
Subject: Re: [PATCH 5/5] TPS65911: Comparator: Add comparator driver

On Tue, May 03, 2011 at 11:19:07AM -0500, Jorge Eduardo Candelaria wrote:

> +/* Comparator 1 voltage selection table in milivolts */
> +static const u16 COMP1_VSEL_TABLE[] = {
> +	0, 2500, 2500, 2500, 2500, 2550, 2600, 2650,
> +	2700, 2750, 2800, 2850, 2900, 2950, 3000, 3050,
> +	3100, 3150, 3200, 3250, 3300, 3350, 3400, 3450,
> +	3500,
> +};
> +
> +/* Comparator 2 voltage selection table in milivolts */
> +static const u16 COMP2_VSEL_TABLE[] = {
> +	0, 2500, 2500, 2500, 2500, 2550, 2600, 2650,
> +	2700, 2750, 2800, 2850, 2900, 2950, 3000, 3050,
> +	3100, 3150, 3200, 3250, 3300, 3350, 3400, 3450,
> +	3500,
> +};

These look remarkably similar...

> +static DEVICE_ATTR(comp1_threshold, S_IRUGO, comp_threshold_show, NULL);
> +static DEVICE_ATTR(comp2_threshold, S_IRUGO, comp_threshold_show, NULL);

We should really have a proper API for this, it's a pretty common
feature on devices with an auxilliary ADC of some kind.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ