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: <69f05d19-9e0d-3674-ee6f-1cf50b35985c@enneenne.com>
Date:   Sat, 4 Mar 2017 08:42:26 +0100
From:   Rodolfo Giometti <giometti@...eenne.com>
To:     Andrey Drobyshev <immortalguardian1@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     gq@...msu.su
Subject: Re: [PATCH 7/8] LinuxPPS: pps_gen_parport: Add polarity parameter for
 inverted signal.

On 02/15/17 15:31, Andrey Drobyshev wrote:
> From: Alexander GQ Gerasiov <gq@...msu.su>
>
> On some devices it may be necessary to transmit inverted data. This commit
> simply adds polarity parameter to define which state represents presence of
> signal: it equals 0 if signal is on the low level (default), or 1 if signal
> is on the high level (inverted signal).
>
> Signed-off-by: Alexander GQ Gerasiov <gq@...msu.su>
> ---
>  drivers/pps/generators/pps_gen_parport.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pps/generators/pps_gen_parport.c b/drivers/pps/generators/pps_gen_parport.c
> index dcd39fb..7739301 100644
> --- a/drivers/pps/generators/pps_gen_parport.c
> +++ b/drivers/pps/generators/pps_gen_parport.c
> @@ -36,8 +36,8 @@
>
>  #define DRVDESC "parallel port PPS signal generator"
>
> -#define SIGNAL		0
> -#define NO_SIGNAL	PARPORT_CONTROL_STROBE
> +#define SIGNAL		(polarity?PARPORT_CONTROL_STROBE:0)
> +#define NO_SIGNAL	(polarity?0:PARPORT_CONTROL_STROBE)

Add spaces:

> +#define SIGNAL		(polarity ? PARPORT_CONTROL_STROBE : 0)
> +#define NO_SIGNAL	(polarity ? 0 : PARPORT_CONTROL_STROBE)

>  /* module parameters */
>
> @@ -48,6 +48,10 @@ MODULE_PARM_DESC(delay,
>  	"Delay between setting and dropping the signal (ns)");
>  module_param_named(delay, send_delay, uint, 0);
>
> +static unsigned int polarity;
> +MODULE_PARM_DESC(polarity,
> +	"Signal is on the low level (0 - default) or on the high level (1).");
> +module_param(polarity, uint, 0);
>
>  #define SAFETY_INTERVAL	3000	/* set the hrtimer earlier for safety (ns) */

Acked-by: Rodolfo Giometti <giometti@...eenne.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ