Skip to content

Commit

Permalink
ARM: sa1100/shannon: convert to generic CF sockets
Browse files Browse the repository at this point in the history
Convert shannon to use the generic CF socket support.

Signed-off-by: Russell King <[email protected]>
  • Loading branch information
Russell King committed Apr 6, 2018
1 parent 80c799d commit b51af86
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 109 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-sa1100/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ config SA1100_PLEB
config SA1100_SHANNON
bool "Shannon"
select ARM_SA1100_CPUFREQ
select REGULATOR
select REGULATOR_FIXED_VOLTAGE
help
The Shannon (also known as a Tuxscreen, and also as a IS2630) was a
limited edition webphone produced by Philips. The Shannon is a SA1100
Expand Down
38 changes: 38 additions & 0 deletions arch/arm/mach-sa1100/shannon.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@

#include <linux/init.h>
#include <linux/device.h>
#include <linux/gpio/machine.h>
#include <linux/kernel.h>
#include <linux/platform_data/sa11x0-serial.h>
#include <linux/tty.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>

#include <video/sa1100fb.h>

Expand Down Expand Up @@ -72,8 +75,43 @@ static struct sa1100fb_mach_info shannon_lcd_info = {
.lccr3 = LCCR3_ACBsDiv(512),
};

static struct gpiod_lookup_table shannon_pcmcia0_gpio_table = {
.dev_id = "sa11x0-pcmcia.0",
.table = {
GPIO_LOOKUP("gpio", 24, "detect", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("gpio", 26, "ready", GPIO_ACTIVE_HIGH),
{ },
},
};

static struct gpiod_lookup_table shannon_pcmcia1_gpio_table = {
.dev_id = "sa11x0-pcmcia.1",
.table = {
GPIO_LOOKUP("gpio", 25, "detect", GPIO_ACTIVE_LOW),
GPIO_LOOKUP("gpio", 27, "ready", GPIO_ACTIVE_HIGH),
{ },
},
};

static struct regulator_consumer_supply shannon_cf_vcc_consumers[] = {
REGULATOR_SUPPLY("vcc", "sa11x0-pcmcia.0"),
REGULATOR_SUPPLY("vcc", "sa11x0-pcmcia.1"),
};

static struct fixed_voltage_config shannon_cf_vcc_pdata __initdata = {
.supply_name = "cf-power",
.microvolts = 3300000,
.enabled_at_boot = 1,
.gpio = -EINVAL,
};

static void __init shannon_init(void)
{
sa11x0_register_fixed_regulator(0, &shannon_cf_vcc_pdata,
shannon_cf_vcc_consumers,
ARRAY_SIZE(shannon_cf_vcc_consumers));
sa11x0_register_pcmcia(0, &shannon_pcmcia0_gpio_table);
sa11x0_register_pcmcia(1, &shannon_pcmcia1_gpio_table);
sa11x0_ppc_configure_mcp();
sa11x0_register_lcd(&shannon_lcd_info);
sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1);
Expand Down
1 change: 0 additions & 1 deletion drivers/pcmcia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ sa1100_cs-y += sa1100_generic.o
sa1100_cs-$(CONFIG_SA1100_COLLIE) += pxa2xx_sharpsl.o
sa1100_cs-$(CONFIG_SA1100_H3100) += sa1100_h3600.o
sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o
sa1100_cs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o
sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o

pxa2xx_cm_x2xx_cs-y += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o
Expand Down
3 changes: 0 additions & 3 deletions drivers/pcmcia/sa1100_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ static int (*sa11x0_pcmcia_legacy_hw_init[])(struct device *dev) = {
#if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600)
pcmcia_h3600_init,
#endif
#ifdef CONFIG_SA1100_SHANNON
pcmcia_shannon_init,
#endif
#ifdef CONFIG_SA1100_SIMPAD
pcmcia_simpad_init,
#endif
Expand Down
1 change: 0 additions & 1 deletion drivers/pcmcia/sa1100_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ extern int pcmcia_graphicsmaster_init(struct device *);
extern int pcmcia_h3600_init(struct device *);
extern int pcmcia_pangolin_init(struct device *);
extern int pcmcia_pfs168_init(struct device *);
extern int pcmcia_shannon_init(struct device *);
extern int pcmcia_simpad_init(struct device *);
extern int pcmcia_stork_init(struct device *);
extern int pcmcia_system3_init(struct device *);
Expand Down
104 changes: 0 additions & 104 deletions drivers/pcmcia/sa1100_shannon.c

This file was deleted.

0 comments on commit b51af86

Please sign in to comment.