Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: at91: do not configure at91sam9g10 twi pio as open-drain

As indicated in the datasheet, TWD and TWCK must not be programmed as
open-drain.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nikolaus Voss <n.voss@weinmann.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

authored by

Ludovic Desroches and committed by
Wolfram Sang
94e73465 774c8018

+3 -3
+3 -3
arch/arm/mach-at91/at91sam9261_devices.c
··· 327 327 /* IP version is not the same on 9261 and g10 */ 328 328 if (cpu_is_at91sam9g10()) { 329 329 at91sam9261_twi_device.name = "i2c-at91sam9g10"; 330 + /* I2C PIO must not be configured as open-drain on this chip */ 330 331 } else { 331 332 at91sam9261_twi_device.name = "i2c-at91sam9261"; 333 + at91_set_multi_drive(AT91_PIN_PA7, 1); 334 + at91_set_multi_drive(AT91_PIN_PA8, 1); 332 335 } 333 336 334 337 /* pins used for TWI interface */ 335 338 at91_set_A_periph(AT91_PIN_PA7, 0); /* TWD */ 336 - at91_set_multi_drive(AT91_PIN_PA7, 1); 337 - 338 339 at91_set_A_periph(AT91_PIN_PA8, 0); /* TWCK */ 339 - at91_set_multi_drive(AT91_PIN_PA8, 1); 340 340 341 341 i2c_register_board_info(0, devices, nr_devices); 342 342 platform_device_register(&at91sam9261_twi_device);