devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: "atull@opensource.altera.com" <atull@opensource.altera.com>,
	"baruch@tkos.co.il" <baruch@tkos.co.il>,
	"mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"skuribay@pobox.com" <skuribay@pobox.com>,
	"Romain.Baeriswyl@abilis.com" <Romain.Baeriswyl@abilis.com>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"alan@linux.intel.com" <alan@linux.intel.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"delicious.quinoa@gmail.com" <delicious.quinoa@gmail.com>,
	"dinguyen@opensource.altera.com" <dinguyen@opensource.altera.com>,
	"yvanderv@opensource.altera.com" <yvanderv@opensource.altera.com>
Subject: Re: [PATCH] i2c: designware: deduce speed mode from device tree setting
Date: Wed, 20 Aug 2014 13:42:31 +0100	[thread overview]
Message-ID: <20140820124231.GD21734@leverpostej> (raw)
In-Reply-To: <20140820123617.GB1373@katana>

On Wed, Aug 20, 2014 at 01:36:18PM +0100, Wolfram Sang wrote:
> > > +
> > > +		ret = of_property_read_u32(pdev->dev.of_node,
> > > +					   "clock-frequency", &bus_rate);
> > > +		if (!ret && (bus_rate <= 100000))
> > > +			speed = DW_IC_CON_SPEED_STD;
> > 
> > This looks a bit odd.
> > 
> > If the device only supports two particular speeds why do we accept any
> > other speed in the clock-frequency property?
> 
> "clock-frequency" is the default binding for specifying i2c bus speeds
> today. Some controllers can be programmed to do various speeds, some can
> only do a set of fixed values.

Sure. My complaint was that the driver would accept invalid values.
That wasn't meant to be suggestion to use a property other than the
standard clock-freqeuncy.

> > Surely we should at least warn that something was off?
> 
> Yes, I was going to say the same until Romain's old patch showed up
> which does that.

Cool. Sounds like we can use Romain's patch to handle this then.

Cheers,
Mark.

  reply	other threads:[~2014-08-20 12:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 20:18 [PATCH] i2c: designware: deduce speed mode from device tree setting atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
     [not found] ` <1408479529-24249-1-git-send-email-atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2014-08-20  7:52   ` Mika Westerberg
2014-08-20  9:22   ` Mark Rutland
2014-08-20  9:49     ` Romain Baeriswyl
2014-08-20 12:07       ` Romain Baeriswyl
     [not found]       ` <944257148.1724.1408528177642.JavaMail.root-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
2014-08-20 12:32         ` Wolfram Sang
2014-08-20 14:24         ` atull
2014-08-20 14:38           ` Romain Baeriswyl
     [not found]             ` <1791089693.2989.1408545513401.JavaMail.root-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
2014-08-20 15:12               ` atull
2014-08-20 12:36     ` Wolfram Sang
2014-08-20 12:42       ` Mark Rutland [this message]
2014-08-20 14:29         ` [PATCH] i2c designware add support of I2C standard mode Romain Baeriswyl
2014-09-18 15:52           ` atull
     [not found]           ` <1408544948-22339-1-git-send-email-romainba-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
2014-08-20 14:32             ` atull
2014-08-20 15:25               ` atull
2014-09-20  9:24             ` Wolfram Sang
2014-09-28  3:40               ` atull

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=20140820124231.GD21734@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=Romain.Baeriswyl@abilis.com \
    --cc=alan@linux.intel.com \
    --cc=atull@opensource.altera.com \
    --cc=baruch@tkos.co.il \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=skuribay@pobox.com \
    --cc=wsa@the-dreams.de \
    --cc=yvanderv@opensource.altera.com \
    /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).