Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp732510imm; Wed, 23 May 2018 04:49:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoRGxO4Mal71WbWsGNWNvy/cMDVvW2ArwSqFNo16pxAtnT3Opm1v49uWk1hPxyvmmT0glcT X-Received: by 2002:a17:902:8bc5:: with SMTP id r5-v6mr2682199plo.182.1527076172797; Wed, 23 May 2018 04:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527076172; cv=none; d=google.com; s=arc-20160816; b=keJrAVKIxTLEsA8ZXnMCPC7aOLx4h3ijt9FPe27zoC8HrLpsbytGMU8L8jT291ZDNn 6IS1rZUla+BR8iCDGRT3nqpKk3MvvIEiInyKzxmwoDV4oJ6JVHVeIiUL8K3scr/UHd2d xK/QZHbHh+oNQ/se4IRddEKtDl/SEP7KhD5HK3xgPFMxcuGG2yNKHcWH1OLh+CHt+kEL Rx6TtlAocUwzL+zeviM7LsnGmk2np6hmhF9M7pzjxWyhhxqfRKcmbrfdHM6AqCnD2oiH eydHIdNJ1yAaBMmvIBJXQ3+wP9XSePeWK2Yb94DOMDSfjST94cJYVuHjzrzJ1vhWrItX LM2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=uiEB3MtAZk2FNcbhEqdQeDpCuymj5QGBQjML9eaV5tw=; b=n2FZtfnJd+j7aevDae07mgqLhVUccJxkrtqYnoKPgR/62M6Y5ns4VXWcq8IKiOlyS2 Xq7mOfp8oIQ6pQhc6srwDjEU1vjgKiAOO3a1LO+j/kORZBx69R2V4OKKmHHtMjR8c0Jx yc7mDHiQtNl4T4PGoBS7rmS7s4ep+0b17yacyqv6mwka8keJDEBL70FYrUg+BdvMP1f0 2vO0LR/F+rBk10ZaanEIIHkSvM+tqnkFAQR6vkwHqSTA3q7u+PBHVlYiYvPW23mhx/sD QFY+6sq5SF0nSQeS/JX9vI6NbEyADv4dvuY8F7kgwgYyDDe9cbjXRLAIumV02tZXWf46 kFGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SMKZ01BU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d90-v6si18776498pld.92.2018.05.23.04.49.17; Wed, 23 May 2018 04:49:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SMKZ01BU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932810AbeEWLsr (ORCPT + 99 others); Wed, 23 May 2018 07:48:47 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:51995 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932796AbeEWLsk (ORCPT ); Wed, 23 May 2018 07:48:40 -0400 Received: by mail-it0-f67.google.com with SMTP id d10-v6so3408463itj.1 for ; Wed, 23 May 2018 04:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uiEB3MtAZk2FNcbhEqdQeDpCuymj5QGBQjML9eaV5tw=; b=SMKZ01BU8fzpLWNXz87ARay2R9eS+2/SHsxdO3qvlmC1bPHIlMh/ikTEjro2BCk1jH kIqU6Wcn3P/Ow5tzKGbr2ZwDivDrDIOxLH9VKvDp01FOI0a984Y/dvB+viRsvxI3CYn3 sFsWb2UZAdDRVtug5C4fK2n1d5RnKEbUpE7t4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uiEB3MtAZk2FNcbhEqdQeDpCuymj5QGBQjML9eaV5tw=; b=XSQjFraJpzT6aaqIn5Xq2qoV6uz1ugt3Hei8Ac5enG9ZnV7aomfu/NLlB+duZYn3fV pf9QM4sKp1CqVuRMm+NjNYiMS23xcNjrr9FtIaq73nbTpWTJtEuxavFPkyEGtMLEOjSf UD4EW8mroebHLQc00jxPhxWqmQo28/IKuhbGQuKR4wXS4JAKSItXo2JqAMen7bZpvzZI sLU3Hw9DLz5g30eXOdHw14KFW2BCLwx04UbzyZ1W0RdQCpLDmE2QXyyoOy+e1GdKM0o3 GhnkPeQf1c0TbJ04/Ej9xqOSxllZIj/tnHvp7P9vH+Lz0ahHbj9msNunx4iCrPdJ9QiR 5Paw== X-Gm-Message-State: ALKqPwdNqiw1meI4x0cAvzoNdsMoNEM5lusvo+eTMxWF5tVDuVvNBF3Z 9aZJay3Izz/y4cpEhWZ2sR1Xy1wHcdfgZIcFGKSZtg== X-Received: by 2002:a24:7d0f:: with SMTP id b15-v6mr4830921itc.135.1527076119779; Wed, 23 May 2018 04:48:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:4c95:0:0:0:0:0 with HTTP; Wed, 23 May 2018 04:48:38 -0700 (PDT) In-Reply-To: References: From: Linus Walleij Date: Wed, 23 May 2018 13:48:38 +0200 Message-ID: Subject: Re: [PATCH v7 3/3] gpio: pca953x: fix address calculation for pcal6524 To: "H. Nikolaus Schaller" Cc: Kumar Gala , Andy Shevchenko , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Alexandre Courbot , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Discussions about the Letux Kernel , kernel@pyra-handheld.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 6:59 AM, H. Nikolaus Schaller wrote: > The register constants are so far defined in a way that they fit > for the pcal9555a when shifted by the number of banks, i.e. are > multiplied by 2 in the accessor function. > > Now, the pcal6524 has 3 banks which means the relative offset > is multiplied by 4 for the standard registers. > > Simply applying the bit shift to the extended registers gives > a wrong result, since the base offset is already included in > the offset. > > Therefore, we have to add code to the 24 bit accessor functions > that adjusts the register number for these exended registers. > > The formula finally used was developed and proposed by > Andy Shevchenko . > > Suggested-by: Andy Shevchenko > Signed-off-by: H. Nikolaus Schaller Patch applied. Yours, Linus Walleij