From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] i2c/pxa2xx: Add PCI support for PXA I2C controller
Date: Fri, 26 Nov 2010 15:16:05 +0100 [thread overview]
Message-ID: <4CEFC125.8010905@linutronix.de> (raw)
In-Reply-To: <20101125235933.GD15948@trinity.fluff.org>
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
next prev parent reply other threads:[~2010-11-26 14:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 21:20 I2C support for Sodaville Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 1/7] i2c/pxa2xx: Don't touch ISAR if not in slave mode Sebastian Andrzej Siewior
2010-11-25 23:52 ` Ben Dooks
2010-11-26 18:28 ` [sodaville] " Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 2/7] arm/pxa2xx: reorganize I2C files Sebastian Andrzej Siewior
2010-11-25 23:55 ` Ben Dooks
2010-11-26 0:03 ` Russell King - ARM Linux
2010-11-26 14:11 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 3/7] i2c/pxa2xx: Add PCI support for PXA I2C controller Sebastian Andrzej Siewior
2010-11-25 23:59 ` Ben Dooks
2010-11-26 14:16 ` Sebastian Andrzej Siewior [this message]
2010-11-24 21:20 ` [PATCH 4/7] i2c/pxa2xx: add support for shared IRQ handler Sebastian Andrzej Siewior
2010-11-25 2:26 ` Haojian Zhuang
2010-11-25 10:48 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 5/7] i2c/pxa2xx: check timeout correctly Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 6/7] i2c/pxa2xx: reset the chip if the bus is not free Sebastian Andrzej Siewior
2010-11-25 2:30 ` Haojian Zhuang
2010-11-25 2:49 ` Haojian Zhuang
2010-11-25 6:43 ` Igor Grinberg
2010-11-25 7:04 ` Haojian Zhuang
2010-11-25 12:24 ` Sebastian Andrzej Siewior
2010-11-25 13:10 ` Igor Grinberg
2010-11-25 13:39 ` Sebastian Andrzej Siewior
2010-11-24 21:20 ` [PATCH 7/7] i2c/pxa2xx: pass of_node from platform driver to adapter Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CEFC125.8010905@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).