Re: [PATCH 3/7] i2c/pxa2xx: Add PCI support for PXA I2C controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Dooks wrote:
+#define IBMR            (0x14)
+#define IDBR            (0x0c)
+#define ICR             (0x00)
+#define ISR             (0x04)
+
+#define _IBMR(i2c)	((i2c)->reg_base + IBMR)
+#define _IDBR(i2c)	((i2c)->reg_base + IDBR)
+#define _ICR(i2c)	((i2c)->reg_base + ICR)
+#define _ISR(i2c)	((i2c)->reg_base + ISR)

couldn't these be in common code?

Yes. I'm going to move these back into the driver and ifdef x86 & arm
specific.

--- /dev/null
+++ b/drivers/i2c/busses/i2c-pxa-pci.c
+static void __devexit ce4100_i2c_remove(struct pci_dev *dev)
+{
+	struct ce4100_devices *sds;
+	unsigned int i;
+
+	sds = pci_get_drvdata(dev);
+	pci_set_drvdata(dev, NULL);
+
+	for (i = 0; i < CE4100_PCI_I2C_DEVS; i++)
how about using ARRAY_SIZE of sds->sd[i] ?

I'm still thinking whether to use this or pci_select_bars() as Florian
suggested.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux