9
0
Fork 0

Merge branch 'delivery/at91_fixes' of git://git.jcrosoft.org/barebox

This commit is contained in:
Sascha Hauer 2013-01-15 15:33:08 +01:00
commit cbc3e0f6d4
5 changed files with 9 additions and 7 deletions

View File

@ -46,6 +46,7 @@
struct w1_gpio_platform_data w1_pdata = { struct w1_gpio_platform_data w1_pdata = {
.pin = AT91_PIN_PB18, .pin = AT91_PIN_PB18,
.ext_pullup_enable_pin = -EINVAL,
.is_open_drain = 0, .is_open_drain = 0,
}; };

View File

@ -155,15 +155,15 @@ static struct i2c_gpio_platform_data pdata_i2c1 = {
void at91_add_device_i2c(short i2c_id, struct i2c_board_info *devices, int nr_devices) void at91_add_device_i2c(short i2c_id, struct i2c_board_info *devices, int nr_devices)
{ {
struct i2c_gpio_platform_data *pdata = &pdata_i2c; struct i2c_gpio_platform_data *pdata;
i2c_register_board_info(i2c_id, devices, nr_devices); i2c_register_board_info(i2c_id, devices, nr_devices);
switch (i2c_id) { switch (i2c_id) {
case 0; case 0:
pdata = &pdata_i2c0; pdata = &pdata_i2c0;
break; break;
case 1; case 1:
pdata = &pdata_i2c1; pdata = &pdata_i2c1;
break; break;
default: default:

View File

@ -244,6 +244,8 @@ static int qt1070_probe(struct device_d *dev)
sprintf(buf, "0x%x", chip_id); sprintf(buf, "0x%x", chip_id);
dev_add_param_fixed(dev, "chip_ip", buf); dev_add_param_fixed(dev, "chip_ip", buf);
memcpy(data->code, default_code, sizeof(int) * ARRAY_SIZE(default_code));
ret = qt1070_pdata_init(dev, data); ret = qt1070_pdata_init(dev, data);
if (ret) { if (ret) {
dev_err(dev, "can not get pdata (%d)\n", ret); dev_err(dev, "can not get pdata (%d)\n", ret);
@ -258,7 +260,6 @@ static int qt1070_probe(struct device_d *dev)
} }
data->start = get_time_ns(); data->start = get_time_ns();
memcpy(data->code, default_code, sizeof(int) * ARRAY_SIZE(default_code));
data->fifo_size = 50; data->fifo_size = 50;
data->recv_fifo = kfifo_alloc(data->fifo_size); data->recv_fifo = kfifo_alloc(data->fifo_size);

View File

@ -400,7 +400,7 @@ static int atmel_spi_probe(struct device_d *dev)
as->cs_pins = pdata->chipselect; as->cs_pins = pdata->chipselect;
as->regs = dev_request_mem_region(dev, 0); as->regs = dev_request_mem_region(dev, 0);
for (i = 0; i <= master->num_chipselect; i++) { for (i = 0; i < master->num_chipselect; i++) {
ret = gpio_request(as->cs_pins[i], dev_name(dev)); ret = gpio_request(as->cs_pins[i], dev_name(dev));
if (ret) if (ret)
goto out_gpio; goto out_gpio;

View File

@ -16,10 +16,10 @@
* @is_open_drain: GPIO pin is configured as open drain * @is_open_drain: GPIO pin is configured as open drain
*/ */
struct w1_gpio_platform_data { struct w1_gpio_platform_data {
unsigned int pin; int pin;
unsigned int is_open_drain:1; unsigned int is_open_drain:1;
void (*enable_external_pullup)(int enable); void (*enable_external_pullup)(int enable);
unsigned int ext_pullup_enable_pin; int ext_pullup_enable_pin;
}; };
#endif /* _LINUX_W1_GPIO_H */ #endif /* _LINUX_W1_GPIO_H */