Skip to content

Commit

Permalink
ARM: SAMSUNG: Update the name of regarding Samsung GPIO
Browse files Browse the repository at this point in the history
According to gpio-samsung.c, this patch updates the name of
regarding Samsung GPIO. Basically the samsung_xxx prefix is
used in gpio-samsung.c instead of s3c_xxx, because unified
name can reduce its complexity.

Note: some s3c_xxx stil remains because it is used widely.
It will be updated next time.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Kukjin Kim committed Sep 21, 2011
1 parent 1b39d5f commit 782d8a3
Show file tree
Hide file tree
Showing 20 changed files with 250 additions and 384 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-exynos4/include/mach/pm-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static inline void s3c_pm_restored_gpios(void)
/* nothing here yet */
}

static inline void s3c_pm_saved_gpios(void)
static inline void samsung_pm_saved_gpios(void)
{
/* nothing here yet */
}
99 changes: 1 addition & 98 deletions arch/arm/mach-s3c2410/include/mach/gpio-fns.h
Original file line number Diff line number Diff line change
@@ -1,98 +1 @@
/* arch/arm/mach-s3c2410/include/mach/gpio-fns.h
*
* Copyright (c) 2003-2009 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* S3C2410 - hardware
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef __MACH_GPIO_FNS_H
#define __MACH_GPIO_FNS_H __FILE__

/* These functions are in the to-be-removed category and it is strongly
* encouraged not to use these in new code. They will be marked deprecated
* very soon.
*
* Most of the functionality can be either replaced by the gpiocfg calls
* for the s3c platform or by the generic GPIOlib API.
*
* As of 2.6.35-rc, these will be removed, with the few drivers using them
* either replaced or given a wrapper until the calls can be removed.
*/

#include <plat/gpio-cfg.h>

static inline void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int cfg)
{
/* 1:1 mapping between cfgpin and setcfg calls at the moment */
s3c_gpio_cfgpin(pin, cfg);
}

/* external functions for GPIO support
*
* These allow various different clients to access the same GPIO
* registers without conflicting. If your driver only owns the entire
* GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
*/

extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);

/* s3c2410_gpio_getirq
*
* turn the given pin number into the corresponding IRQ number
*
* returns:
* < 0 = no interrupt for this pin
* >=0 = interrupt number for the pin
*/

extern int s3c2410_gpio_getirq(unsigned int pin);

/* s3c2410_gpio_irqfilter
*
* set the irq filtering on the given pin
*
* on = 0 => disable filtering
* 1 => enable filtering
*
* config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
* width of filter (0 through 63)
*
*
*/

extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
unsigned int config);

/* s3c2410_gpio_pullup
*
* This call should be replaced with s3c_gpio_setpull().
*
* As a note, there is currently no distinction between pull-up and pull-down
* in the s3c24xx series devices with only an on/off configuration.
*/

/* s3c2410_gpio_pullup
*
* configure the pull-up control on the given pin
*
* to = 1 => disable the pull-up
* 0 => enable the pull-up
*
* eg;
*
* s3c2410_gpio_pullup(S3C2410_GPB(0), 0);
* s3c2410_gpio_pullup(S3C2410_GPE(8), 0);
*/

extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);

extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);

extern unsigned int s3c2410_gpio_getpin(unsigned int pin);

#endif /* __MACH_GPIO_FNS_H */
#include <plat/gpio-fns.h>
6 changes: 3 additions & 3 deletions arch/arm/mach-s3c2410/include/mach/gpio-track.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

#include <mach/regs-gpio.h>

extern struct s3c_gpio_chip s3c24xx_gpios[];
extern struct samsung_gpio_chip s3c24xx_gpios[];

static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin)
static inline struct samsung_gpio_chip *samsung_gpiolib_getchip(unsigned int pin)
{
struct s3c_gpio_chip *chip;
struct samsung_gpio_chip *chip;

if (pin > S3C_GPIO_END)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/include/mach/pm-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs,
}

static inline void s3c_pm_restored_gpios(void) { }
static inline void s3c_pm_saved_gpios(void) { }
static inline void samsung_pm_saved_gpios(void) { }
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c2410/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no)

void __init s3c2410_map_io(void)
{
s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up;
s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;

iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc));
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2412/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state)
{
struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin);
struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin);
unsigned long offs = pin - chip->chip.base;
unsigned long flags;
unsigned long slpcon;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c2416/s3c2416.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)

void __init s3c2416_map_io(void)
{
s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown;
s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown;
s3c24xx_gpiocfg_default.set_pull = samsung_gpio_setpull_updown;
s3c24xx_gpiocfg_default.get_pull = samsung_gpio_getpull_updown;

/* initialize device information early */
s3c2416_default_sdhci0();
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c2440/s3c2440.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ void __init s3c2440_map_io(void)
{
s3c244x_map_io();

s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up;
s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;
s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;
}
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c2440/s3c2442.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@ void __init s3c2442_map_io(void)
{
s3c244x_map_io();

s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1down;
s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1down;
s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1down;
s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1down;
}
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c2443/s3c2443.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no)

void __init s3c2443_map_io(void)
{
s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_s3c2443;
s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_s3c2443;
s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull;
s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull;

iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc));
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c64xx/include/mach/pm-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static inline void s3c_pm_restored_gpios(void)
__raw_writel(0, S3C64XX_SLPEN);
}

static inline void s3c_pm_saved_gpios(void)
static inline void samsung_pm_saved_gpios(void)
{
/* turn on the sleep mode and keep it there, as it seems that during
* suspend the xCON registers get re-set and thus you can end up with
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s5pv210/include/mach/pm-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs,
}

static inline void s3c_pm_restored_gpios(void) { }
static inline void s3c_pm_saved_gpios(void) { }
static inline void samsung_pm_saved_gpios(void) { }
10 changes: 5 additions & 5 deletions arch/arm/plat-s5p/irq-gpioint.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct s5p_gpioint_bank {
int start;
int nr_groups;
int irq;
struct s3c_gpio_chip **chips;
struct samsung_gpio_chip **chips;
void (*handler)(unsigned int, struct irq_desc *);
};

Expand Down Expand Up @@ -87,7 +87,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc)
chained_irq_enter(chip, desc);

for (group = 0; group < bank->nr_groups; group++) {
struct s3c_gpio_chip *chip = bank->chips[group];
struct samsung_gpio_chip *chip = bank->chips[group];
if (!chip)
continue;

Expand All @@ -110,7 +110,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc)
chained_irq_exit(chip, desc);
}

static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip)
static __init int s5p_gpioint_add(struct samsung_gpio_chip *chip)
{
static int used_gpioint_groups = 0;
int group = chip->group;
Expand All @@ -130,7 +130,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip)
return -EINVAL;

if (!bank->handler) {
bank->chips = kzalloc(sizeof(struct s3c_gpio_chip *) *
bank->chips = kzalloc(sizeof(struct samsung_gpio_chip *) *
bank->nr_groups, GFP_KERNEL);
if (!bank->chips)
return -ENOMEM;
Expand Down Expand Up @@ -173,7 +173,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip)

int __init s5p_register_gpio_interrupt(int pin)
{
struct s3c_gpio_chip *my_chip = s3c_gpiolib_getchip(pin);
struct samsung_gpio_chip *my_chip = samsung_gpiolib_getchip(pin);
int offset, group;
int ret;

Expand Down
Loading

0 comments on commit 782d8a3

Please sign in to comment.