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, 13 Jun 2016 14:15:43 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	William Breathitt Gray <vilhelm.gray@...il.com>
Cc:	Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald-Stadler <pmeerw@...erw.net>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] iio: stx104: Add GPIO support for the Apex Embedded
 Systems STX104

On Fri, Jun 3, 2016 at 7:42 PM, William Breathitt Gray
<vilhelm.gray@...il.com> wrote:

> The Apex Embedded Systems STX104 device features eight lines of digital
> I/O (four digital inputs and four digital outputs). This patch adds GPIO
> support for these eight lines of digital I/O via GPIOLIB.
>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@...il.com>
> ---
> Changes in v2:
>   - Change GPIOLIB Kconfig selection to a dependency for the STX104 Kconfig
>     option; STX104 should only be available to systems configured for GPIOLIB

Are you sure? I just changed the GPIOLIB Kconfig so any arch/thing can
select GPIOLIB, if this driver needs it, it can just select it now.

> +static int stx104_gpio_get_direction(struct gpio_chip *chip,
> +       unsigned int offset)
> +{
> +       if (offset < 4)
> +               return 1;
> +
> +       return 0;
> +}

If this looks so...

> +static int stx104_gpio_direction_input(struct gpio_chip *chip,
> +       unsigned int offset)
> +{
> +       return 0;
> +}
> +
> +static int stx104_gpio_direction_output(struct gpio_chip *chip,
> +       unsigned int offset, int value)
> +{
> +       return 0;
> +}

These should return -EINVAL or -EIO or something if you try to
set the direction to something the line does not support.

Other than that it looks good.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ