Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752708AbbFDIWp (ORCPT ); Thu, 4 Jun 2015 04:22:45 -0400 Received: from mail-oi0-f51.google.com ([209.85.218.51]:35809 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039AbbFDIWh (ORCPT ); Thu, 4 Jun 2015 04:22:37 -0400 MIME-Version: 1.0 In-Reply-To: <1433171567-24571-1-git-send-email-stefan@agner.ch> References: <1433171567-24571-1-git-send-email-stefan@agner.ch> Date: Thu, 4 Jun 2015 10:22:37 +0200 Message-ID: Subject: Re: [RFC] pinctrl: pinctrl-imx: implement suspend/resume From: Linus Walleij To: Stefan Agner Cc: Shawn Guo , Sascha Hauer , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 925 Lines: 29 On Mon, Jun 1, 2015 at 5:12 PM, Stefan Agner wrote: > In some SoC's using the IMX pin controller, the IP looses its state > when entering lowest power modes. Enhance the driver with suspend/ > resume functions restoring the pin states. (...) This is weird: > + for (i = 0; i < info->ninput_regs; i++) > + writel(ipctl->input_regs[i], ipctl->base + > + info->input_regs_offset + i * sizeof(u32 *)); sizeof(u32 *)? Don't you mean sizeof(u32). sizeof(u32 *) will be 4 bytes on a 32bit system, 8 bytes on a 64bit system ... but I think your registers are always 32 bits, 4 bytes, apart. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/