From patchwork Fri Dec 14 16:19:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 13594 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5FA1D23FB4 for ; Fri, 14 Dec 2012 16:20:02 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id E78E6A19D58 for ; Fri, 14 Dec 2012 16:20:01 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so3226160iag.11 for ; Fri, 14 Dec 2012 08:20:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=jZ8uGVvUcrUqhUvbad6sxnZEuP2azFYdBA1AVq/oAGA=; b=ZKUmR3GU4IybS9dGRiWpLO8xoGWTd+l/iV+S7ucw6fPH8ZYWM6Ba8voXus8XO4DRY+ mHltDaTV0K91XYXVGO5JH3OL1k60AaXliSYNYmJr0a+7cokW7GXD3QH3kalUkVuQnXtR bhNPa0OpMjqusbXtG5n/Fnjf26iSkb870dW19IZ5FLoHjWnhnjUny0fOs59T5UT2ascZ +PSLFkPMIw2AJOCrKGaiPgtJj+doPtYvy8iA8Zl6ToYrRY19wY/ikdGmp/sfdYFug/Nd k8SI+ljo8xEHwV4LGHH45PwkNz5QX30U6JF36Q6nkuIpZjxNO+BlTaRMcY3FegKwHrd0 cqfw== Received: by 10.42.32.200 with SMTP id f8mr4921103icd.18.1355502001349; Fri, 14 Dec 2012 08:20:01 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp81589igt; Fri, 14 Dec 2012 08:20:00 -0800 (PST) X-Received: by 10.180.87.39 with SMTP id u7mr3595517wiz.6.1355502000208; Fri, 14 Dec 2012 08:20:00 -0800 (PST) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by mx.google.com with ESMTPS id x12si6490512wiv.0.2012.12.14.08.19.59 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Dec 2012 08:20:00 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.176 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.176; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.176 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f176.google.com with SMTP id r5so1640363wey.35 for ; Fri, 14 Dec 2012 08:19:59 -0800 (PST) Received: by 10.194.5.74 with SMTP id q10mr4577778wjq.13.1355501999622; Fri, 14 Dec 2012 08:19:59 -0800 (PST) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id u6sm8325248wif.2.2012.12.14.08.19.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Dec 2012 08:19:59 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, Mian Yousaf Kaukab , Lee Jones Subject: [PATCH 08/21] gpio: ab8500: Fix gpio offset bounds for irq mapping Date: Fri, 14 Dec 2012 16:19:26 +0000 Message-Id: <1355501979-1157-9-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355501979-1157-1-git-send-email-lee.jones@linaro.org> References: <1355501979-1157-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmCgV3Yakmg/baMflPZ1FQeCYz1JxVxwtOgqqNoJZmxrb6kIhuPgn6zdsd50DI6BOum1hbY From: Mian Yousaf Kaukab AB8500 gpio numbers start from 1 and not 0 so the offset 0 represents gpio 1. Fixing cluster bounds accordingly for irq mappings. Signed-off-by: Lee Jones Signed-off-by: Mian Yousaf Kaukab Reviewed-by: Jonas ABERG Tested-by: Jonas ABERG --- drivers/gpio/gpio-ab8500.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-ab8500.c b/drivers/gpio/gpio-ab8500.c index d3bbcce..a0253ad 100644 --- a/drivers/gpio/gpio-ab8500.c +++ b/drivers/gpio/gpio-ab8500.c @@ -174,9 +174,9 @@ static int ab8500_gpio_to_irq(struct gpio_chip *chip, unsigned offset) int start; int end; } clusters[] = { - {.start = 6, .end = 13}, - {.start = 24, .end = 25}, - {.start = 36, .end = 41}, + {.start = 5, .end = 12}, /* GPIO numbers start from 1 */ + {.start = 23, .end = 24}, + {.start = 35, .end = 40}, }; struct ab8500_gpio *ab8500_gpio = to_ab8500_gpio(chip); int base = ab8500_gpio->irq_base;