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: <20111206070615.GJ2980@S2100-06.ap.freescale.net>
Date:	Tue, 6 Dec 2011 15:06:16 +0800
From:	Shawn Guo <shawn.guo@...escale.com>
To:	Dong Aisheng <b29396@...escale.com>
CC:	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linus.walleij@...ricsson.com>, <s.hauer@...gutronix.de>,
	<kernel@...gutronix.de>
Subject: Re: [RFC PATCH 1/3] pinctrl: imx: add pinmux imx core driver

On Sun, Dec 04, 2011 at 07:49:42PM +0800, Dong Aisheng wrote:
> ---
> This patch series shows the basic idea of driver design. There're still
> some TODOes like adding more pinmux functions and gpio support.
> The patch is here for request for comments on the driver design
> and other might exist issues.
> 
> Signed-off-by: Dong Aisheng <dong.aisheng@...aro.org>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Sascha Hauer <s.hauer@...gutronix.de>
> Cc: Shawn Guo <shanw.guo@...escale.com>
> ---
>  drivers/pinctrl/Kconfig           |    6 +
>  drivers/pinctrl/Makefile          |    2 +
>  drivers/pinctrl/pinmux-imx-core.c |  284 +++++++++++++++++++++++++++++++++++++
>  drivers/pinctrl/pinmux-imx-core.h |   83 +++++++++++
>  4 files changed, 375 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index ef56644..214d072 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -40,4 +40,10 @@ config PINMUX_U300
>  	help
>  	  Say Y here to enable the U300 pinmux driver
>  
> +config PINMUX_IMX
> +	bool "IMX pinmux driver"
> +	depends on ARCH_MXC
> +	select PINMUX
> +	help
> +	  Say Y here to enable the IMX pinmux driver
>  endif
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index bdc548a..764657b 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -4,5 +4,7 @@ ccflags-$(CONFIG_DEBUG_PINMUX)	+= -DDEBUG
>  
>  obj-$(CONFIG_PINCTRL)		+= core.o
>  obj-$(CONFIG_PINMUX)		+= pinmux.o
> +obj-$(CONFIG_PINMUX_IMX)	+= pinmux-imx-core.o \
> +				   pinmux-imx53.o pinmux-imx6q.o

You do not have pinmux-imx53.c and pinmux-imx6q.c in this patch yet.

>  obj-$(CONFIG_PINMUX_SIRF)	+= pinmux-sirf.o
>  obj-$(CONFIG_PINMUX_U300)	+= pinmux-u300.o
> diff --git a/drivers/pinctrl/pinmux-imx-core.c b/drivers/pinctrl/pinmux-imx-core.c
> new file mode 100644
> index 0000000..1e60932
> --- /dev/null
> +++ b/drivers/pinctrl/pinmux-imx-core.c
> @@ -0,0 +1,284 @@
> +/*
> + * Core driver for the imx pin controller
> + *
> + * Copyright (C) 2011 Freescale Semiconductor, Inc.
> + * Copyright (C) 2011 Linaro Ltd.
> + *
> + * Author: Dong Aisheng <dong.aisheng@...aro.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#include <linux/init.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/io.h>
> +#include <linux/err.h>
> +#include <linux/pinctrl/pinctrl.h>
> +#include <linux/pinctrl/pinmux.h>
> +
> +#include "pinmux-imx-core.h"
> +
> +#define DRIVER_NAME "pinmux-imx"
> +
> +/**
> + * @dev: a pointer back to containing device
> + * @virtbase: the offset to the controller in virtual memory
> + */
> +struct imx_pmx {
> +	struct device *dev;
> +	struct pinctrl_dev *pctl;
> +	void __iomem *virtbase;
> +	struct imx_pinctrl_info *info;
> +};
> +
> +#define IMX_PINCTRL_REG_SIZE 4
> +#define IMX_PINCTRL_MAX_FUNC 7
> +
> +extern struct imx_pinctrl_info mx53_pinctrl_info;
> +extern struct imx_pinctrl_info mx6q_pinctrl_info;
> +

You do not have mx53_pinctrl_info and mx6q_pinctrl_info in this patch
yet.

Regards,
Shawn

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