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: <20091006115543.GH27168@sirena.org.uk>
Date:	Tue, 6 Oct 2009 12:55:44 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Mike Frysinger <vapier@...too.org>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	linux-kernel@...r.kernel.org,
	Michael Hennerich <michael.hennerich@...log.com>,
	Bryan Wu <cooloney@...nel.org>
Subject: Re: [PATCH v3] mfd: ADP5520 Multifunction LCD Backlight and Keypad
	Input Device Driver

On Tue, Oct 06, 2009 at 03:44:31AM -0400, Mike Frysinger wrote:

> +int adp5520_register_notifier(struct device *dev, struct notifier_block *nb,
> +				unsigned int events)
> +{

This notifier stuff looks an awful lot like an interrupt controller
driver.  Now that it's possible to implement support for an I2C/SPI
driven interrupt controller it'd be good to use that rather than having
a custom API if that's possible.

> +#define GPIO_R3		(1 << 3)	/* LED3 or GPIO3 aka R3 */
> +#define GPIO_R2		(1 << 2)
> +#define GPIO_R1		(1 << 1)
> +#define GPIO_R0		(1 << 0)

> +struct adp5520_gpio_platfrom_data {
> +	unsigned gpio_start;
> +	u8 gpio_en_mask;
> +	u8 gpio_pullup_mask;
> +};

Since there's platform data in here it'd probably be better to namespace
the #defines or put them in a separate header in case there are
collisions with some other chip used on a board.

> +struct adp5520_leds_platfrom_data {

There's some 'platfrom' rather than 'platform' typos.

> +	int num_leds;
> +	struct led_info	*leds;
> +	u8 fade_in;		/* Backlight Fade-In Timer */
> +	u8 fade_out;		/* Backlight Fade-Out Timer */
> +	u8 led_on_time;

I don't know exactly what the on_time option does but if it controls
hardware-implemented blinking there's actually a callback function the
LED driver can implement to allow triggers to use the hardware assisted
blinking at runtime.  If it returns an error or isn't implemented
there's a software fallback.
--
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