sm501.c (f61be273d3699d174bc1438e6804f9f9e52bb932) | sm501.c (60e540d617b40eb3d37f1dd99c97af588ff9b70b) |
---|---|
1/* linux/drivers/mfd/sm501.c 2 * 3 * Copyright (C) 2006 Simtec Electronics 4 * Ben Dooks <ben@simtec.co.uk> 5 * Vincent Sanders <vince@simtec.co.uk> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 982 unchanged lines hidden (view full) --- 991}; 992 993static int __devinit sm501_gpio_register_chip(struct sm501_devdata *sm, 994 struct sm501_gpio *gpio, 995 struct sm501_gpio_chip *chip) 996{ 997 struct sm501_platdata *pdata = sm->platdata; 998 struct gpio_chip *gchip = &chip->gpio; | 1/* linux/drivers/mfd/sm501.c 2 * 3 * Copyright (C) 2006 Simtec Electronics 4 * Ben Dooks <ben@simtec.co.uk> 5 * Vincent Sanders <vince@simtec.co.uk> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 982 unchanged lines hidden (view full) --- 991}; 992 993static int __devinit sm501_gpio_register_chip(struct sm501_devdata *sm, 994 struct sm501_gpio *gpio, 995 struct sm501_gpio_chip *chip) 996{ 997 struct sm501_platdata *pdata = sm->platdata; 998 struct gpio_chip *gchip = &chip->gpio; |
999 unsigned base = pdata->gpio_base; | 999 int base = pdata->gpio_base; |
1000 1001 memcpy(chip, &gpio_chip_template, sizeof(struct gpio_chip)); 1002 1003 if (chip == &gpio->high) { | 1000 1001 memcpy(chip, &gpio_chip_template, sizeof(struct gpio_chip)); 1002 1003 if (chip == &gpio->high) { |
1004 base += 32; | 1004 if (base > 0) 1005 base += 32; |
1005 chip->regbase = gpio->regs + SM501_GPIO_DATA_HIGH; 1006 gchip->label = "SM501-HIGH"; 1007 } else { 1008 chip->regbase = gpio->regs + SM501_GPIO_DATA_LOW; 1009 gchip->label = "SM501-LOW"; 1010 } 1011 1012 gchip->base = base; --- 434 unchanged lines hidden (view full) --- 1447 .fb_route = SM501_FB_OWN, 1448 .fb_crt = &sm501_pdata_fbsub, 1449 .fb_pnl = &sm501_pdata_fbsub, 1450}; 1451 1452static struct sm501_platdata sm501_pci_platdata = { 1453 .init = &sm501_pci_initdata, 1454 .fb = &sm501_fb_pdata, | 1006 chip->regbase = gpio->regs + SM501_GPIO_DATA_HIGH; 1007 gchip->label = "SM501-HIGH"; 1008 } else { 1009 chip->regbase = gpio->regs + SM501_GPIO_DATA_LOW; 1010 gchip->label = "SM501-LOW"; 1011 } 1012 1013 gchip->base = base; --- 434 unchanged lines hidden (view full) --- 1448 .fb_route = SM501_FB_OWN, 1449 .fb_crt = &sm501_pdata_fbsub, 1450 .fb_pnl = &sm501_pdata_fbsub, 1451}; 1452 1453static struct sm501_platdata sm501_pci_platdata = { 1454 .init = &sm501_pci_initdata, 1455 .fb = &sm501_fb_pdata, |
1456 .gpio_base = -1, |
|
1455}; 1456 1457static int sm501_pci_probe(struct pci_dev *dev, 1458 const struct pci_device_id *id) 1459{ 1460 struct sm501_devdata *sm; 1461 int err; 1462 --- 175 unchanged lines hidden --- | 1457}; 1458 1459static int sm501_pci_probe(struct pci_dev *dev, 1460 const struct pci_device_id *id) 1461{ 1462 struct sm501_devdata *sm; 1463 int err; 1464 --- 175 unchanged lines hidden --- |