From patchwork Sat Jun 22 20:42:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 13708376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C44BBC27C53 for ; Sat, 22 Jun 2024 20:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=P5XgKBpDi3THJPHfD0RkMG/eJrm8KfwifEQRqIr5T9w=; b=g/zUHf/TtzmbZIYPuqjKgfonC1 7ab5tCKJ/6F2ltKzAh7/iqvQhtE/R4bPx+d7UmSrREAdsOggw+0lEsU+pUYKGswmvIWztJZfyYsY2 IczSfnnT+KA3+vbLLFy34XQ1fqCHJNnwsVKBIbGVNdWXawGqKNFiVZ0ns/x34eA4M6KJ9qvWLkOVO pJ/3sJ1vfG2ggXr/zX9kYuj9GNa6ZG5MZgy9IZOaWy2gtbK4X7+pIWqhqnmCy5ADV/oyiIGgjlk9V RMRy+ldSZ9uIZYYFfHuZzVELDkhnbTzrKyCh3CclbSALtLa4xh4hI+pZUcGeEBkI3/1VqQGtkoh1I NTdkYZVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sL7Z2-0000000Clih-1EbX; Sat, 22 Jun 2024 20:42:24 +0000 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sL7Yw-0000000Clgs-165A for linux-arm-kernel@lists.infradead.org; Sat, 22 Jun 2024 20:42:20 +0000 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-25cb3f1765bso1682794fac.1 for ; Sat, 22 Jun 2024 13:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719088936; x=1719693736; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=P5XgKBpDi3THJPHfD0RkMG/eJrm8KfwifEQRqIr5T9w=; b=C3XAXXvUQLgP+i2tF5y7lUu/jVtZ+F5+Msd7ZfTgzEl7uePfBm3ZngqLHoXynmawCV 5vJo5iahxAhDuLhS5eQXVWUt5bCM0+1jSn3YEIVIldZskeldEZwFDqmM8BOXiNJIDLko i3y+3x2i5cbelYBRCtOAeCn6H89MLjmYzFle+tZ80Hd5Z269tqg0E76w+WmCcj4hCWzW cTxqoZy0d1FQq+28UkrvQNiLhN0emVYGSiGvUCSvXPbpq0beYUHz73SWdCYOcWQkdyTl /0xtcmdHOQMEXx2LjIyoSQeOHntq+WDGhTSE4tdY8aQ789WRDyqe9YoZLwtLyBFLwSQc fd3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719088936; x=1719693736; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P5XgKBpDi3THJPHfD0RkMG/eJrm8KfwifEQRqIr5T9w=; b=NV9PozD2o6ujK8k3lzAlSznzygG2Zq7McvKYmZ8UW4rlh0KHzcBRwP90vhSn9AlnJ6 IDMsQXbSs8xCRM2MrDUWXIlI4RrhN/9813fv+QLnkEZAshEhcxWjWLR+6vrWa61l6CrW 6vglCZACll0gqZW0Cuz9q0RMTABe3NfU3qkzQBKCZTxpIBkg4V5hYKt7OOXyPw909ZEj QCeAWjTzLAgUOtA3NFrlMpbPw+wCDwdVhFHVlRTIY8Ha2HKirpayvMQR7XpFyZ+F6Ng2 xfqyVSpYTJthLE54GZpVxEkEyAaDhQJpdAZ0jlvQxut6ea8mx+YSMNz3bXYKlpY/eRjz Na2w== X-Forwarded-Encrypted: i=1; AJvYcCWSyQ2xq5IzTB1RfOWMsOT7tBGXgCENyDEwSnM/AWhBC7Kz1mUYgsvRmPyGZbIr+FEnSWssz+dfzNKFDPglygZMoAomdu5OsW7oOywN14p7iLlv6hI= X-Gm-Message-State: AOJu0Yw2fZ632GkEjDOSZliDh7YnhQY85LgXreTK2VTWE02tru+3CFVo /olMitzKmoqXvXR5cVLKP+VX0NeEzV9NoC0MPhJ+tReg7fi8CSo6 X-Google-Smtp-Source: AGHT+IGtXy+bZztPd+TWjBQZAs+WBJGh1vx8nunagsjtajUmAJM5HGMHNVq7/uhqFIEzL57suTCCiw== X-Received: by 2002:a05:6870:2054:b0:24c:57b4:fb2c with SMTP id 586e51a60fabf-25d06eb9ef1mr867159fac.52.1719088935649; Sat, 22 Jun 2024 13:42:15 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:d2ec:59a0:2c5f:4460]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7065107cc88sm3594974b3a.15.2024.06.22.13.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 13:42:15 -0700 (PDT) Date: Sat, 22 Jun 2024 13:42:12 -0700 From: Dmitry Torokhov To: Linus Walleij Cc: Haojian Zhuang , Daniel Mack , Robert Jarzmik , Russell King , Arnd Bergmann , Lee Jones , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: spitz: fix GPIO assignment for backlight Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240622_134218_723381_19432600 X-CRM114-Status: GOOD ( 14.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org GPIOs controlling backlight on Spitz and Akita are coming from GPIO expanders, not the pxa27xx-gpio block, correct it. Additionally GPIO lookup tables operate with pin numbers rather than legacy GPIO numbers, fix that as well. Use raw numbers instead of legacy GPIO names to avoid confusion. Fixes: ee0c8e494cc3 ("backlight: corgi: Convert to use GPIO descriptors") Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij --- Linus, I am not sure if this is actually an issue, but I strongly suspect that it is. I have no hardware, so no means to test it, sorry. arch/arm/mach-pxa/spitz.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 3c5f5a3cb480..10ab16dcd827 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -520,10 +520,8 @@ static struct gpiod_lookup_table spitz_ads7846_gpio_table = { static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { .dev_id = "spi2.1", .table = { - GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_BACKLIGHT_CONT, - "BL_CONT", GPIO_ACTIVE_LOW), - GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_BACKLIGHT_ON, - "BL_ON", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.1", 6, "BL_CONT", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("sharp-scoop.1", 7, "BL_ON", GPIO_ACTIVE_HIGH), { }, }, }; @@ -531,10 +529,8 @@ static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { static struct gpiod_lookup_table akita_lcdcon_gpio_table = { .dev_id = "spi2.1", .table = { - GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_CONT, - "BL_CONT", GPIO_ACTIVE_LOW), - GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_ON, - "BL_ON", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("i2c-max7310", 3, "BL_ON", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("i2c-max7310", 4, "BL_CONT", GPIO_ACTIVE_LOW), { }, }, }; @@ -964,12 +960,9 @@ static inline void spitz_i2c_init(void) {} static struct gpiod_lookup_table spitz_audio_gpio_table = { .dev_id = "spitz-audio", .table = { - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE, - "mute-l", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE, - "mute-r", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("sharp-scoop.1", SPITZ_GPIO_MIC_BIAS - SPITZ_SCP2_GPIO_BASE, - "mic", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.1", 8, "mic", GPIO_ACTIVE_HIGH), { }, }, }; @@ -977,12 +970,9 @@ static struct gpiod_lookup_table spitz_audio_gpio_table = { static struct gpiod_lookup_table akita_audio_gpio_table = { .dev_id = "spitz-audio", .table = { - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE, - "mute-l", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE, - "mute-r", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("i2c-max7310", AKITA_GPIO_MIC_BIAS - AKITA_IOEXP_GPIO_BASE, - "mic", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("i2c-max7310", 2, "mic", GPIO_ACTIVE_HIGH), { }, }, };