Re: [PATCH] i2c: i2c-sh_mobile bus speed platform data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 28, 2011 at 10:06:38AM +0900, Magnus Damm wrote:
> On Thu, Apr 28, 2011 at 7:14 AM, Simon Horman <horms@xxxxxxxxxxxx> wrote:
> > Hi Magnus,
> >
> > On Thu, Apr 21, 2011 at 10:22:54PM +0900, Magnus Damm wrote:
> >> From: Magnus Damm <damm@xxxxxxxxxxxxx>
> >>
> >> Add support to the i2c-sh_mobile driver for setting
> >> the I2C bus speed using platform data.
> >>
> >> Signed-off-by: Magnus Damm <damm@xxxxxxxxxxxxx>
> >> ---
> >>
> >> Âdrivers/i2c/busses/i2c-sh_mobile.c | Â 13 +++++++++++--
> >> Âinclude/linux/i2c-sh_mobile.h   Â|  10 ++++++++++
> >> Â2 files changed, 21 insertions(+), 2 deletions(-)
> >>
> >> --- 0013/drivers/i2c/busses/i2c-sh_mobile.c
> >> +++ work/drivers/i2c/busses/i2c-sh_mobile.c  2011-04-21 20:20:23.000000000 +0900
> >> @@ -32,6 +32,7 @@
> >> Â#include <linux/clk.h>
> >> Â#include <linux/io.h>
> >> Â#include <linux/slab.h>
> >> +#include <linux/i2c-sh_mobile.h>
> >>
> >> Â/* Transmit operation: Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â*/
> >> Â/* Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â*/
> >> @@ -117,7 +118,7 @@ struct sh_mobile_i2c_data {
> >> Â Â Â struct device *dev;
> >> Â Â Â void __iomem *reg;
> >> Â Â Â struct i2c_adapter adap;
> >> -
> >> + Â Â unsigned long bus_speed;
> >> Â Â Â struct clk *clk;
> >> Â Â Â u_int8_t icic;
> >> Â Â Â u_int8_t iccl;
> >> @@ -205,7 +206,7 @@ static void activate_ch(struct sh_mobile
> >> Â Â Â Â* We also round off the result.
> >> Â Â Â Â*/
> >> Â Â Â num = i2c_clk * 5;
> >> - Â Â denom = NORMAL_SPEED * 9;
> >> + Â Â denom = pd->bus_speed * 9;
> >
> > I believe that on the sh73a0 and so far only the sh73a0
> > denom needs to be doubled.
> 
> Uhm, I don't think this patch is specific to any SoC type. It may of
> course be used on sh73a0 to adjust the denom value, but setting the
> I2C bus speed is something that can be used on any SoC. So I'd say
> that this is a fairly generic feature.

I'm just saying that that I've observed the value being doubled for sh73a0.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux