Skip to contentSkip to conversation

some fixes

PATCH In review Jean-Christophe PLAGNIOL-VILLARD 2 participants 7 messages Jan 14, 2013 – Jan 15, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover some fixes

HI,

some fixes for master

The following changes since commit dbdd533232c463da503f6b85ade060153f1b17d6:

fixup! commands: add ubiformat (2013-01-09 18:22:35 +0100)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git delivery/at91_fixes

for you to fetch changes up to 97d4ca970a591b0461df776b10206db33ee79beb:

qt1070: init default key code first (2013-01-15 00:26:19 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (5):
w1: gpio: use int for gpio
at91: sam9x5ek: use -EINVAL for invalid gpio on 1-wire
at91sam9g45: fix i2c typos
atmel_spi: fix spi cs gpio request loop
qt1070: init default key code first

 arch/arm/boards/at91sam9x5ek/init.c      |    1 +
 arch/arm/mach-at91/at91sam9g45_devices.c |    6 +++---
 drivers/input/qt1070.c                   |    3 ++-
 drivers/spi/atmel_spi.c                  |    2 +-
 include/linux/w1-gpio.h                  |    4 ++--
 5 files changed, 9 insertions(+), 7 deletions(-)

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

PATCH RESEND 1/5 w1: gpio: use int for gpio

so we can use negative value for invalid gpio

---
 include/linux/w1-gpio.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/w1-gpio.h +2 -2
index 065e3ae..ae961ee 100644
@@ -16,10 +16,10 @@
  * @is_open_drain: GPIO pin is configured as open drain
  */
 struct w1_gpio_platform_data {
-	unsigned int pin;
+	int pin;
 	unsigned int is_open_drain:1;
 	void (*enable_external_pullup)(int enable);
-	unsigned int ext_pullup_enable_pin;
+	int ext_pullup_enable_pin;
 };
 
 #endif /* _LINUX_W1_GPIO_H */
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH RESEND 2/5 at91: sam9x5ek: use -EINVAL for invalid gpio on 1-wire

---
 arch/arm/boards/at91sam9x5ek/init.c |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boards/at91sam9x5ek/init.c +1 -0
index 8cc119e..f230205 100644
@@ -46,6 +46,7 @@
 
 struct w1_gpio_platform_data w1_pdata = {
 	.pin = AT91_PIN_PB18,
+	.ext_pullup_enable_pin = -EINVAL,
 	.is_open_drain = 0,
 };
 
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/5 at91sam9g45: fix i2c typos

In reply to Jean-Christophe PLAGNIOL-VILLARD

arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_i2c':
arch/arm/mach-at91/at91sam9g45_devices.c:158:42: error: 'pdata_i2c' undeclared (first use in this function) arch/arm/mach-at91/at91sam9g45_devices.c:158:42: note: each undeclared identifier is reported only once for each function it appears in arch/arm/mach-at91/at91sam9g45_devices.c:163:8: error: expected ':' or '...' before ';' token arch/arm/mach-at91/at91sam9g45_devices.c:166:8: error: expected ':' or '...' before ';' token

---
 arch/arm/mach-at91/at91sam9g45_devices.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-at91/at91sam9g45_devices.c +3 -3
index c5f99b1..d2746da 100644
@@ -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)
 {
-	struct i2c_gpio_platform_data *pdata = &pdata_i2c;
+	struct i2c_gpio_platform_data *pdata;
 
 	i2c_register_board_info(i2c_id, devices, nr_devices);
 
 	switch (i2c_id) {
-	case 0;
+	case 0:
 		pdata = &pdata_i2c0;
 		break;
-	case 1;
+	case 1:
 		pdata = &pdata_i2c1;
 		break;
 	default:
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH 4/5 atmel_spi: fix spi cs gpio request loop

In reply to Jean-Christophe PLAGNIOL-VILLARD

it's 0 to num_cs - 1

---
 drivers/spi/atmel_spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/atmel_spi.c +1 -1
index 08cb416..478f5d3 100644
@@ -400,7 +400,7 @@ static int atmel_spi_probe(struct device_d *dev)
 	as->cs_pins = pdata->chipselect;
 	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));
 		if (ret)
 			goto out_gpio;
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 5/5 qt1070: init default key code first

In reply to Jean-Christophe PLAGNIOL-VILLARD

So the key code provided by platform_data are not overwrited

---
 drivers/input/qt1070.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/qt1070.c +2 -1
index c66189e..ebe2b81 100644
@@ -244,6 +244,8 @@ static int qt1070_probe(struct device_d *dev)
 	sprintf(buf, "0x%x", chip_id);
 	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);
 	if (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();
 
-	memcpy(data->code, default_code, sizeof(int) * ARRAY_SIZE(default_code));
 
 	data->fifo_size = 50;
 	data->recv_fifo = kfifo_alloc(data->fifo_size);
Signature · 7 lines
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

some fixes for master

The following changes since commit dbdd533232c463da503f6b85ade060153f1b17d6:

fixup! commands: add ubiformat (2013-01-09 18:22:35 +0100)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git delivery/at91_fixes

Pulled, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox