[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140820123617.GB1373@katana>
Date: Wed, 20 Aug 2014 07:36:18 -0500
From: Wolfram Sang <wsa@...-dreams.de>
To: Mark Rutland <mark.rutland@....com>
Cc: "atull@...nsource.altera.com" <atull@...nsource.altera.com>,
"baruch@...s.co.il" <baruch@...s.co.il>,
"mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>,
"grant.likely@...aro.org" <grant.likely@...aro.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"skuribay@...ox.com" <skuribay@...ox.com>,
"Romain.Baeriswyl@...lis.com" <Romain.Baeriswyl@...lis.com>,
"rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
"alan@...ux.intel.com" <alan@...ux.intel.com>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"delicious.quinoa@...il.com" <delicious.quinoa@...il.com>,
"dinguyen@...nsource.altera.com" <dinguyen@...nsource.altera.com>,
"yvanderv@...nsource.altera.com" <yvanderv@...nsource.altera.com>
Subject: Re: [PATCH] i2c: designware: deduce speed mode from device tree
setting
> > +
> > + 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.
> 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.
Thanks,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists