On Fri, 2014-11-07 at 20:46 +0100, Hans de Goede wrote:
> From: Oliver Schinagl <[email protected]>
> 
> The A31 uses a new push-pull two wire interface, which features higher
> transfer speeds (upto 6 MHz) in theory. While the hardware can burst 8
> bytes each time, this driver will only see very little use and thus is
> limited to single byte transmission only.
> 
> Signed-off-by: Oliver Schinagl <[email protected]>
> Signed-off-by: Hans de Goede <[email protected]>

Acked-by: Ian Campbell <[email protected]>

One question:
> +int p2wi_change_to_p2wi_mode(u8 slave_addr, u8 ctrl_reg, u8 init_data)
> +{
> +     struct sunxi_p2wi_reg *p2wi = (struct sunxi_p2wi_reg *)SUNXI_P2WI_BASE;
> +     unsigned long tmo = timer_get_us() + 1000000;
> +
> +     writel(P2WI_PM_DEV_ADDR(slave_addr) |
> +            P2WI_PM_CTRL_ADDR(ctrl_reg) |
> +            P2WI_PM_INIT_DATA(init_data) |
> +            P2WI_PM_INIT_SEND,
> +            &p2wi->pm);
> +
> +     while ((readl(&p2wi->pm) & P2WI_PM_INIT_SEND)) {
> +             if (timer_get_us() > tmo)
> +                     return -EFAULT;

You don't mean ETIME(DOUT) or something here, do you? EFAULT seems a bit
odd.

Ian.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to