Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1377883

Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl high/low count from DT

From Jisheng Zhang <jszhang@marvell.com>
Newsgroups linux.kernel
Subject Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl high/low count from DT
Date 2016-04-13 14:20 +0200
Message-ID <rnrW2-15F-13@gated-at.bofh.it> (permalink)
References <rkQee-sD-17@gated-at.bofh.it> <rlmxs-7V5-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Dear Rob,

On Thu, 7 Apr 2016 12:57:59 -0500 Rob Herring wrote:

> On Wed, Apr 06, 2016 at 03:28:00PM +0800, Jisheng Zhang wrote:
> > Sometimes, it's convenient to define the scl's high/low count directly,
> > e.g HW people would do some measurement then directly give out the
> > optimum counts. Previously, we solved the sda falling time and scl
> > falling time by i2c_dw_scl_hcnt() and i2c_dw_scl_lcnt(), then put them
> > into dt, but what we really care isn't the sda/scl falling time.  
> 
> This is just so you can put specific clock count instead of converting 
> from nanoseconds with standard properties or you gain some additional 
> control of the timing. If only the former, then I prefer we stick with 
> the common properties.

To be honest, both. Let me show how I gain additional control of the timing
with this patch while I can't do this w/o it.

I want the similar high percent of SCL high for both standard-mode and
fast-mode. Before this patch, this is not achievable because the parameters
to cal the hcnt/lcnt via i2c_dw_scl_hcnt() and i2c_dw_scl_lcnt() are different
for standard-mode and fast-mode.

Thanks,
Jisheng



> 
> > From another side, the dw_i2c_acpi_configure() on ACPI platform also
> > get hcnt/lcnt values rather than the sda/scl falling time from ACPI
> > method, we want similar feature for DT platforms.  
> 
> That's nice, but not really a reason IMO.
> 
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> > ---
> >  Documentation/devicetree/bindings/i2c/i2c-designware.txt | 16 ++++++++++++++++
> >  drivers/i2c/busses/i2c-designware-platdrv.c              |  8 ++++++++
> >  2 files changed, 24 insertions(+)  

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] i2c: designware-platdrv: get fast/std speed scl high/low count from DT Jisheng Zhang <jszhang@marvell.com> - 2016-04-06 09:40 +0200
  Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl high/low  count from DT Rob Herring <robh@kernel.org> - 2016-04-07 20:10 +0200
    Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl  high/low count from DT Jisheng Zhang <jszhang@marvell.com> - 2016-04-13 14:20 +0200
  Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl high/low  count from DT Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-04-07 20:10 +0200
    Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl  high/low count from DT Jisheng Zhang <jszhang@marvell.com> - 2016-04-13 14:30 +0200
      Re: [PATCH] i2c: designware-platdrv: get fast/std speed scl  high/low count from DT Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-04-13 15:30 +0200

csiph-web