Lines Matching +full:i2c +full:- +full:retry +full:- +full:count
2 * arch/arm/mach-orion5x/kurobox_pro-setup.c
20 #include <linux/i2c.h>
23 #include <asm/mach-types.h>
26 #include <linux/platform_data/mtd-orion_nand.h>
32 * KUROBOX-PRO Info
65 .size = SZ_256M - (SZ_4M + SZ_64M),
72 .end = KUROBOX_PRO_NAND_BASE + KUROBOX_PRO_NAND_SIZE - 1,
85 .id = -1,
104 .end = KUROBOX_PRO_NOR_BOOT_BASE + KUROBOX_PRO_NOR_BOOT_SIZE - 1,
108 .name = "physmap-flash",
127 * Check for devices with hard-wired IRQs. in kurobox_pro_pci_map_irq()
130 if (irq != -1) in kurobox_pro_pci_map_irq()
136 return -1; in kurobox_pro_pci_map_irq()
167 * RTC 5C372a on I2C bus
181 * Kurobox Pro specific power off method via UART1-attached microcontroller
186 static int kurobox_pro_miconread(unsigned char *buf, int count) in kurobox_pro_miconread() argument
191 for (i = 0; i < count; i++) { in kurobox_pro_miconread()
195 if (--timeout == 0) in kurobox_pro_miconread()
209 static int kurobox_pro_miconwrite(const unsigned char *buf, int count) in kurobox_pro_miconwrite() argument
213 while (count--) { in kurobox_pro_miconwrite()
222 static int kurobox_pro_miconsend(const unsigned char *data, int count) in kurobox_pro_miconsend() argument
229 int retry = 2; in kurobox_pro_miconsend() local
232 for (i = 0; i < count; i++) in kurobox_pro_miconsend()
233 checksum -= data[i]; in kurobox_pro_miconsend()
237 kurobox_pro_miconwrite(data, count); in kurobox_pro_miconsend()
281 } while (retry--); in kurobox_pro_miconsend()
286 return -1; in kurobox_pro_miconsend()
297 pr_info("%s: triggering power-off...\n", __func__); in kurobox_pro_power_off()
378 /* register Kurobox Pro specific power-off method */ in kurobox_pro_init()