I fail really to see why this would be necessary here. So get rid of it and see if
anything breaks...
SVN-Revision: 17052
#include <mach/hardware.h>
#include <asm/mach-types.h>
-#include <linux/gta02-shadow.h>
#include <mach/gta02.h>
#include <linux/mfd/pcf50633/gpio.h>
bt_data = dev_get_drvdata(dev);
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, !on);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, !on);
if (on) {
if (!regulator_is_enabled(bt_data->regulator))
regulator_disable(bt_data->regulator);
}
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, on);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on);
}
__gta02_pm_bt_toggle_radio(dev, on);
} else if (!strcmp(attr->attr.name, "reset")) {
/* reset is low-active, so we need to invert */
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1);
}
return count;
/* we pull reset to low to make sure that the chip doesn't
* drain power through the reset line */
- gta02_gpb_setpin(GTA02_GPIO_BT_EN, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, 0);
rfkill = rfkill_allocate(&pdev->dev, RFKILL_TYPE_BLUETOOTH);
#include <asm/mach-types.h>
-#include <linux/gta02-shadow.h>
-
#include <mach/gta02.h>
#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/pmic.h>
#include <linux/mfd/pcf50633/gpio.h>
#include <mach/regs-gpio.h>
#include <mach/regs-gpioj.h>
-#include <linux/gta02-shadow.h>
int gta_gsm_interrupts;
EXPORT_SYMBOL(gta_gsm_interrupts);
msleep(100);
- gta02_gpb_setpin(GTA02_GPIO_MODEM_ON, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_MODEM_ON, 1);
msleep(500);
- gta02_gpb_setpin(GTA02_GPIO_MODEM_ON, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_MODEM_ON, 0);
/*
* workaround for calypso firmware moko10 and earlier,
#include <mach/hardware.h>
#include <asm/mach-types.h>
-#include <linux/gta02-shadow.h>
#include <mach/gta02.h>
#include <mach/gta02-pm-wlan.h>
+++ /dev/null
-/*
- * Common utility code for GTA02
- *
- * Copyright (C) 2008 by Openmoko, Inc.
- * Author: Holger Hans Peter Freyther <freyther@openmoko.org>
- * All rights reserved.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- */
-
-#include <linux/module.h>
-#include <linux/io.h>
-#include <linux/irq.h>
-
-#include <asm/gpio.h>
-#include <mach/regs-gpio.h>
-#include <linux/gta02-shadow.h>
-
-/**
- * Shadow GPIO bank B handling. For the LEDs we need to keep track of the state
- * in software. The s3c2410_gpio_setpin must not be used for GPIOs on bank B
- */
-static unsigned long gpb_mask;
-static unsigned long gpb_state;
-
-void gta02_gpb_add_shadow_gpio(unsigned int gpio)
-{
- unsigned long offset = S3C2410_GPIO_OFFSET(gpio);
- unsigned long flags;
-
- local_irq_save(flags);
- gpb_mask |= 1L << offset;
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(gta02_gpb_add_shadow_gpio);
-
-static void set_shadow_gpio(unsigned long offset, unsigned int value)
-{
- unsigned long state = value != 0;
-
- gpb_state &= ~(1L << offset);
- gpb_state |= state << offset;
-}
-
-void gta02_gpb_setpin(unsigned int pin, unsigned to)
-{
- void __iomem *base = S3C24XX_GPIO_BASE(S3C2410_GPB0);
- unsigned long offset = S3C2410_GPIO_OFFSET(pin);
- unsigned long flags;
- unsigned long dat;
-
- BUG_ON(base != S3C24XX_GPIO_BASE(pin));
-
- local_irq_save(flags);
- dat = __raw_readl(base + 0x04);
-
- /* Add the shadow values */
- dat &= ~gpb_mask;
- dat |= gpb_state;
-
- /* Do the operation like s3c2410_gpio_setpin */
- dat &= ~(1L << offset);
- dat |= to << offset;
-
- /* Update the shadow state */
- if ((1L << offset) & gpb_mask)
- set_shadow_gpio(offset, to);
-
- __raw_writel(dat, base + 0x04);
- local_irq_restore(flags);
-}
-EXPORT_SYMBOL(gta02_gpb_setpin);
#include <asm/fiq.h>
#include <linux/gta02-vibrator.h>
-#include <linux/gta02-shadow.h>
/* arbitrates which sensor IRQ owns the shared SPI bus */
static spinlock_t motion_irq_lock;
led ^= 1;
s3c2410_gpio_cfgpin(GTA02_GPIO_AUX_LED, S3C2410_GPIO_OUTPUT);
- gta02_gpb_setpin(GTA02_GPIO_AUX_LED, led);
+ s3c2410_gpio_setpin(GTA02_GPIO_AUX_LED, led);
last_blink = count;
return delay;
switch (cmd) {
case S3C2410_UDC_P_ENABLE:
printk(KERN_DEBUG "%s S3C2410_UDC_P_ENABLE\n", __func__);
- gta02_gpb_setpin(GTA02_GPIO_USB_PULLUP, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_USB_PULLUP, 1);
break;
case S3C2410_UDC_P_DISABLE:
printk(KERN_DEBUG "%s S3C2410_UDC_P_DISABLE\n", __func__);
- gta02_gpb_setpin(GTA02_GPIO_USB_PULLUP, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_USB_PULLUP, 0);
break;
case S3C2410_UDC_P_RESET:
printk(KERN_DEBUG "%s S3C2410_UDC_P_RESET\n", __func__);
>a02_resume_reason_device,
};
-static void gta02_register_glamo() {
+static void gta02_register_glamo(void)
+{
platform_device_register(>a02_glamo_dev);
- if (!gpio_request(GTA02_GPIO_GLAMO(4), "jbt6k74 reset"))
+ if (gpio_request(GTA02_GPIO_GLAMO(4), "jbt6k74 reset"))
printk("gta02: Failed to request jbt6k74 reset pin\n");
- if (!gpio_direction_output(GTA02_GPIO_GLAMO(4), 1))
+ if (gpio_direction_output(GTA02_GPIO_GLAMO(4), 1))
printk("gta02: Failed to configure jbt6k74 reset pin\n");
platform_device_register(&spigpio_device);
}
{
switch (n) {
case 0:
- gta02_gpb_setpin(GTA02_GPIO_PWR_LED1, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_PWR_LED1, 1);
break;
case 1:
- gta02_gpb_setpin(GTA02_GPIO_PWR_LED2, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_PWR_LED2, 1);
break;
default:
- gta02_gpb_setpin(GTA02_GPIO_AUX_LED, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_AUX_LED, 1);
break;
}
}
return 0;
if ((u8)gta02_vib_priv.fiq_count == gta02_vib_priv.vib_pwm_latched)
- gta02_gpb_setpin(gta02_vib_priv.vib_gpio_pin, 0);
+ s3c2410_gpio_setpin(gta02_vib_priv.vib_gpio_pin, 0);
if ((u8)gta02_vib_priv.fiq_count)
return 1;
gta02_vib_priv.vib_pwm_latched = gta02_vib_priv.vib_pwm;
if (gta02_vib_priv.vib_pwm_latched)
- gta02_gpb_setpin(gta02_vib_priv.vib_gpio_pin, 1);
+ s3c2410_gpio_setpin(gta02_vib_priv.vib_gpio_pin, 1);
return 1;
}
gta02_vib_priv.pdata = pdev->dev.platform_data;
platform_set_drvdata(pdev, >a02_vib_led);
- gta02_gpb_setpin(gta02_vib_led.gpio, 0); /* off */
+ s3c2410_gpio_setpin(gta02_vib_led.gpio, 0); /* off */
s3c2410_gpio_cfgpin(gta02_vib_led.gpio, S3C2410_GPIO_OUTPUT);
/* safe, kmalloc'd copy needed for FIQ ISR */
gta02_vib_priv.vib_gpio_pin = gta02_vib_led.gpio;
#include <asm/mach-types.h>
#include <mach/gta02.h>
#include <plat/regs-timer.h>
-#include <linux/gta02-shadow.h>
#define MAX_LEDS 3
#define COUNTER 256
struct gta02_led_priv *lp = to_priv(led_cdev);
spin_lock_irqsave(&lp->lock, flags);
- gta02_gpb_setpin(lp->gpio, value ? 1 : 0);
+ s3c2410_gpio_setpin(lp->gpio, value ? 1 : 0);
spin_unlock_irqrestore(&lp->lock, flags);
}
case S3C2410_GPB1:
case S3C2410_GPB2:
s3c2410_gpio_cfgpin(lp->gpio, S3C2410_GPIO_OUTPUT);
- gta02_gpb_add_shadow_gpio(lp->gpio);
break;
default:
break;
+++ /dev/null
-/*
- * include/linux/gta02-shadow.h
- *
- * Common utility code for GTA02
- *
- * Copyright (C) 2008 by Openmoko, Inc.
- * Author: Holger Hans Peter Freyther <freyther@openmoko.org>
- * All rights reserved.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- */
-
-#ifndef GTA02_SHADOW_H
-#define GTA02_SHADOW_H
-
-void gta02_gpb_add_shadow_gpio(unsigned int gpio);
-void gta02_gpb_setpin(unsigned int pin, unsigned to);
-
-#endif
endif
--- a/arch/arm/mach-s3c2442/Makefile
+++ b/arch/arm/mach-s3c2442/Makefile
-@@ -14,3 +14,9 @@ obj-$(CONFIG_CPU_S3C2442) += clock.o
+@@ -14,3 +14,8 @@ obj-$(CONFIG_CPU_S3C2442) += clock.o
# Machine support
+ gta02-pm-gsm.o \
+ gta02-pm-gps.o \
+ gta02-pm-bt.o \
-+ gta02-pm-wlan.o \
-+ gta02-shadow.o
++ gta02-pm-wlan.o
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -21,3 +21,6 @@ obj-$(CONFIG_HP_ILO) += hpilo.o