From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
ben-linux@fluff.org, Jean Delvare <khali@linux-fr.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Christian Ruppert <christian.ruppert@abilis.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH v2 4/7] i2c-designware: use dynamic adapter numbering on Lynxpoint
Date: Wed, 10 Apr 2013 13:36:39 +0300 [thread overview]
Message-ID: <1365590202-1623-4-git-send-email-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <1365590202-1623-1-git-send-email-mika.westerberg@linux.intel.com>
It is not good idea to mix static and dynamic I2C adapter numbering. In
this particular case on Lynxpoint we had graphics I2C adapter which took
the first numbers preventing the designware I2C driver from using the
adapter numbers it preferred.
Since Lynxpoint support was just introduced and there is no hardware available
outside Intel we can fix this by switching to use dynamic adapter numbering
instead of static.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
Changes to v1:
- Updated commit message to mention that this change should not
cause regressions as there are no real users for Lynxpoint
I2C controller driver yet.
drivers/i2c/busses/i2c-designware-platdrv.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 94b3a4d..0735ccf 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -56,20 +56,11 @@ static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
static int dw_i2c_acpi_configure(struct platform_device *pdev)
{
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
- struct acpi_device *adev;
- int busno, ret;
if (!ACPI_HANDLE(&pdev->dev))
return -ENODEV;
- ret = acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev);
- if (ret)
- return -ENODEV;
-
dev->adapter.nr = -1;
- if (adev->pnp.unique_id && !kstrtoint(adev->pnp.unique_id, 0, &busno))
- dev->adapter.nr = busno;
-
dev->tx_fifo_depth = 32;
dev->rx_fifo_depth = 32;
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2013-04-10 10:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 10:36 [PATCH v2 1/7] i2c-designware: move to managed functions (devm_*) Mika Westerberg
[not found] ` <1365590202-1623-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-04-10 10:36 ` [PATCH v2 2/7] i2c-designware-pci: use dev_err() instead of printk() Mika Westerberg
2013-04-10 10:36 ` [PATCH v2 6/7] i2c-designware: use usleep_range() in the busy-loop Mika Westerberg
2013-04-15 16:20 ` [PATCH v2 1/7] i2c-designware: move to managed functions (devm_*) Wolfram Sang
2013-04-10 10:36 ` [PATCH v2 3/7] i2c-designware-pci: use managed functions pcim_* and devm_* Mika Westerberg
2013-04-10 10:36 ` Mika Westerberg [this message]
2013-04-10 10:36 ` [PATCH v2 5/7] i2c-designware: enable/disable the controller properly Mika Westerberg
2013-04-10 10:36 ` [PATCH v2 7/7] i2c-designware: switch to use runtime PM autosuspend Mika Westerberg
[not found] ` <CAM=Q2cvp3U=-SDdWwjZQScSgesUD4Oq4_Om=sE7JNPko-HtVoQ@mail.gmail.com>
2013-04-10 11:56 ` Mika Westerberg
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=1365590202-1623-4-git-send-email-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ben-linux@fluff.org \
--cc=christian.ruppert@abilis.com \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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).