chost->dat_gpio = cbus_config->dat_gpio;
chost->sel_gpio = cbus_config->sel_gpio;
+#ifdef CONFIG_ARCH_OMAP1
if (!OMAP_GPIO_IS_MPUIO(chost->clk_gpio) ||
!OMAP_GPIO_IS_MPUIO(chost->dat_gpio) ||
!OMAP_GPIO_IS_MPUIO(chost->sel_gpio)) {
ret = -ENODEV;
goto exit1;
}
+#endif
if ((ret = omap_request_gpio(chost->clk_gpio)) < 0)
goto exit1;
static int tahvo_initialized;
static int tahvo_irq_pin;
+static int tahvo_is_betty;
static struct tasklet_struct tahvo_tasklet;
spinlock_t tahvo_lock = SPIN_LOCK_UNLOCKED;
static int __devinit tahvo_probe(struct device *dev)
{
const struct omap_em_asic_bb5_config * em_asic_config;
- int rev, ret;
+ int rev, id, ret;
/* Prepare tasklet */
tasklet_init(&tahvo_tasklet, tahvo_tasklet_handler, 0);
tahvo_initialized = 1;
rev = tahvo_read_reg(TAHVO_REG_ASICR);
- if (((rev >> 8) & 0x0f) != 0x03) {
- printk(KERN_ERR PFX "Tahvo chip not found\n");
+
+ id = (rev >> 8) & 0xff;
+ if (id == 0x03) {
+ if ((rev & 0xff) >= 0x50)
+ tahvo_7bit_backlight = 1;
+ } else if (id == 0x0b) {
+ tahvo_is_betty = 1;
+ tahvo_7bit_backlight = 1;
+ } else {
+ printk(KERN_ERR "Tahvo/Betty chip not found");
return -ENODEV;
}
- rev &= 0xff;
- if (rev >= 0x50)
- tahvo_7bit_backlight = 1;
- printk(KERN_INFO "Tahvo v%d.%d found\n", rev >> 4, rev & 0x0f);
+
+ printk(KERN_INFO "%s v%d.%d found\n", tahvo_is_betty ? "Betty" : "Tahvo",
+ (rev >> 4) & 0x0f, rev & 0x0f);
tahvo_irq_pin = em_asic_config->tahvo_irq_gpio;
{
int ret = 0;
- printk(KERN_INFO "Tahvo driver initialising\n");
+ printk(KERN_INFO "Tahvo/Betty driver initialising\n");
init_completion(&device_release);