linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: wsa@the-dreams.de, lho@apm.com, Ken.Xue@amd.com,
	linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] i2c: designware: Do not require clock when SSCN and FFCN are provided
Date: Wed, 16 Dec 2015 16:28:10 +0200	[thread overview]
Message-ID: <20151216142810.GW1762@lahna.fi.intel.com> (raw)
In-Reply-To: <56717100.3020602@amd.com>

On Wed, Dec 16, 2015 at 08:11:12AM -0600, Suravee Suthikulpanit wrote:
> >The clk framework should work fine if the returned clock is NULL (which
> >I think is your case).
> >
> >The driver gates clocks when the device is suspended and on Intel LPSS
> >there actually is a clock that gets gated.
> >
> >>[..]
> >>@@ -203,13 +223,11 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
> >>  		dev->master_cfg =  DW_IC_CON_MASTER | DW_IC_CON_SLAVE_DISABLE |
> >>  			DW_IC_CON_RESTART_EN | DW_IC_CON_SPEED_FAST;
> >>
> >>-	dev->clk = devm_clk_get(&pdev->dev, NULL);
> >>-	dev->get_clk_rate_khz = i2c_dw_get_clk_rate_khz;
> >>-	if (IS_ERR(dev->clk))
> >>-		return PTR_ERR(dev->clk);
> 
> Actually, if we don't provide the clock (which is the case for ACPI), this
> would also return and cause the probing to fail.

Indeed it seems that when you have CONFIG_COMMON_CLK selected the clock
framework starts returning errors if the clock is not found.

Since we need the clock for Intel LPSS I2C host controllers (and they
may have *CNT methods), I think you just need to provide the clock for
AMD I2C host controller in similar way than we do in
drivers/acpi/acpi_lpss.c.

  reply	other threads:[~2015-12-16 14:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 22:38 [PATCH] i2c: designware: Do not require clock when SSCN and FFCN are provided Suravee Suthikulpanit
2015-12-16  9:42 ` Mika Westerberg
2015-12-16 14:11   ` Suravee Suthikulpanit
2015-12-16 14:28     ` Mika Westerberg [this message]
2015-12-16 14:44       ` Suravee Suthikulpanit
2015-12-16 15:04         ` Mika Westerberg
2015-12-17  0:55 ` Loc Ho

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=20151216142810.GW1762@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Ken.Xue@amd.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=lho@apm.com \
    --cc=linux-acpi@vger.kernel.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).