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: <200902051612.20475.david-b@pacbell.net>
Date:	Thu, 5 Feb 2009 16:12:20 -0800
From:	David Brownell <david-b@...bell.net>
To:	Alessandro Zummo <azummo-lists@...ertech.it>
Cc:	jordan@...micpenguin.net, linux-geode@...ts.infradead.org,
	dilinger@...ued.net, dsaxena@...top.org,
	"Martin-Éric Racine" <q-funk@....fi>,
	lkml <linux-kernel@...r.kernel.org>, rpurdie@...ys.net,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] AMD Geode CS5535/5536 GPIO driver

On Thursday 05 February 2009, Alessandro Zummo wrote:
> --- linux-2.6.28.orig/arch/x86/Kconfig	2009-02-03 19:38:43.000000000 +0100
> +++ linux-2.6.28/arch/x86/Kconfig	2009-02-03 20:15:25.000000000 +0100
> @@ -1911,6 +1911,16 @@ config GEODE_MFGPT_TIMER
>  	  MFGPTs have a better resolution and max interval than the
>  	  generic PIT, and are suitable for use as high-res timers.
>  
> +config GEODE_GPIO
> +	bool "Geode GPIO support"
> +	depends on MGEODE_LX && !CS5535_GPIO

and also GPIOLIB ... maybe can you just "select GPIOLIB".


> +	default n
> +	help


> +static int cs5535_direction_output(struct gpio_chip *chip, unsigned offset,
> +					int value)
> +{
> +	cs5535_gpio_set(chip, offset, value);
> +
> +	geode_gpio_set(geode_gpio(offset), GPIO_OUTPUT_ENABLE);
> +	geode_gpio_clear(geode_gpio(offset), GPIO_INPUT_ENABLE);

Unless this hardware misbehaves when both output and input
modes are enabled (e.g. in the window between those two calls),
I'd suggest just not clearing INPUT_ENABLE.  It's legit to
ask for the *actual* value of an output line, e.g. for when
it uses open drain mode.  (And didn't this hardware have an
option for open drain GPIO signaling?)


Otherwise this has about the right shape for platform GPIOs.

- Dave
--
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