diff options
author | Rob Herring <r.herring@freescale.com> | 2009-10-19 14:43:19 -0500 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2010-03-25 13:59:52 -0400 |
commit | 71bde5760fb31fb4a2cc4a57a3366b2f5a42cb90 (patch) | |
tree | 5690552665f0b7843e6552e4d5fe7b63cbc78f51 /arch/arm/mach-stmp378x/stmp378x_devb_rotdec.c | |
parent | 585e8cb92b96cb7212976468bee5e57e4a53271f (diff) |
ENGR00117389 Port 5.0.0 release to 2.6.31
This is i.MX BSP 5.0.0 release ported to 2.6.31
Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Alan Tull <r80115@freescale.com>
Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Diffstat (limited to 'arch/arm/mach-stmp378x/stmp378x_devb_rotdec.c')
-rw-r--r-- | arch/arm/mach-stmp378x/stmp378x_devb_rotdec.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-stmp378x/stmp378x_devb_rotdec.c b/arch/arm/mach-stmp378x/stmp378x_devb_rotdec.c new file mode 100644 index 000000000000..05270fe39419 --- /dev/null +++ b/arch/arm/mach-stmp378x/stmp378x_devb_rotdec.c @@ -0,0 +1,47 @@ +/* + * Freescale STMP378X Rotary Encoder module pin multiplexing + * + * Author: Drew Benedetti <drewb@embeddedalley.com> + * + * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. + */ + +/* + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ +#include <linux/kernel.h> +#include <linux/io.h> +#include <linux/module.h> +#include <mach/pins.h> +#include <mach/pinmux.h> + +#define ROTARY_FUN PIN_FUN1 + +#define TITLE "stmp3xxx-rotdec" + +int rotdec_pinmux_request(void) +{ + int rc = 0; + + rc |= stmp3xxx_request_pin(PINID_ROTARYA, ROTARY_FUN, TITLE); + rc |= stmp3xxx_request_pin(PINID_ROTARYB, ROTARY_FUN, TITLE); + + return rc; +} +EXPORT_SYMBOL_GPL(rotdec_pinmux_request); + +void rotdec_pinmux_free(void) +{ + stmp3xxx_release_pin(PINID_ROTARYA, TITLE); + stmp3xxx_release_pin(PINID_ROTARYB, TITLE); +} +EXPORT_SYMBOL_GPL(rotdec_pinmux_free); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Drew Benedetti <drewb@embeddedalley.com>"); |