Re: [PATCH] i2c: rk3x: Account for repeated start time requirement

From: Doug Anderson
Date: Thu Dec 11 2014 - 16:58:27 EST


Hi,

On Thu, Dec 11, 2014 at 11:18 AM, Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
> - min_low_ns = spec_min_low_ns + fall_ns;
> - min_high_ns = spec_min_high_ns + rise_ns;
> + /*
> + * For repeated start we need at least (spec_setup_start * 2) to meet
> + * (tSU;SDA) requirements. The controller drops data low at half the
> + * high time). Also need to meet normal specification requirements.
> + */
> + if (for_start)
> + min_high_ns = max(spec_setup_start * 2,
> + spec_setup_start + sda_fall_ns +
> + spec_min_high_ns);
> + else
> + min_high_ns = spec_min_high_ns;
> + min_high_ns += scl_rise_ns;
> +
> + min_low_ns = spec_min_low_ns + scl_fall_ns;

Sorry I didn't think about this before, but I think the above has a
slight bug. I need to account for the scl_rise_ns rise time twice in
the repeated start case, I believe. I'll send out a new version
shortly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/