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 D16A5C43334 for ; Thu, 21 Jul 2022 21:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9iZ51G5BJFpGG6+qyJqeqGnyFTOJ6pqmU8SqbDwCxtM=; b=eUaon4QdJXqr0V v5yTxvNvuXNheitnk1f6gHc8x+Jk1sMnczgtD47WSV0LhxnwqP8ECwCdLxFas0C2t1f8+gaqnzbv+ /+oQpV3OITa4ZO/Ahknwxmz0X64H3+hXSc/QgrVsT0IvYN55A3JtbltrHgY7F08vA1j3pW5y/Bxqp f6qHD+ZwEvfkJHeX940Yna6BXdPLIZNZynYFrqOrpEjiUpyn+/sp2KGFcuUxnrNcKBZgzU3BkJ36m XNhl834EoCVIYExyAUgiLpaa0yCHU6WymDJuVXRRuXwgdhmFW7JWxheL6Ik5DUIo0dcVgChVlz3VC NjTxY7rDrY425PGwZMOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEdNz-00CMbC-TM; Thu, 21 Jul 2022 21:07:08 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEdNx-00CMZI-84 for linux-arm-kernel@lists.infradead.org; Thu, 21 Jul 2022 21:07:06 +0000 Received: by mail-wr1-x432.google.com with SMTP id b26so3991501wrc.2 for ; Thu, 21 Jul 2022 14:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h0RfnX9XMJl4X8UHK/m6AG5Gy5dhWkWCW2AH3mBwMPI=; b=dTwi4uuci2y7aTcCisEkoclFqwpMlHDg+3siL6lW/gzhcCYHuaJFEdKG1+qDPJevc3 tqz9ial2Jng+ui+xwc2RMjHevo52tt1GpqXyLijxxb56CkUxVrik5SDiHKtV4NFtI61/ lthdj8seLlSSUPOGfofE5swJQ/4gwYxFHAh8t6cXZkm6TG5SvDbpE2+mLzDf5PSITsEB Ta0as9y9CTHmVQ8PzM1FOe4U9aWCD5Jii8GClJlNhlXDDe/Ts8pASQDroV9DI1GRe6HH DB5Gy2R9H6GlqVlqRJe2eVVmq8lCsjMqBN4ii37wd5yF6YyMoFaiv4rbVvAlokxR0SDQ tuIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h0RfnX9XMJl4X8UHK/m6AG5Gy5dhWkWCW2AH3mBwMPI=; b=s0pu+H2oiQnwH4QnuQzWioyBRhydtL+PHHSgR4pbW5xW0jh9pdA6uMBG3X+eysiOZ+ FwIsKPcMaz8I5QBTHGfryS4i1zcWpFbDvkPjt5D0o4BcctVt445oRP8fPWSsMV9euGYs 56skB1bCsO+CyNsNCt3jIb7inpeCGctcPCdF/zHEYCKBtiTEnUdGBy8qwmC2Bsxmj5Ox 2ML36puexodh1ziHQCDO5RKG6ousz0g77ddopQtREk1lanGIKfBgtPEYUXJ8UJ0Dp5RI BkzOlBLnCwdtb6JV56Anmbu0+NnEGKnb06Yxut0kyJCSwy6WpqYO2rTyGrnp4JKNmLsx gkfA== X-Gm-Message-State: AJIora9oWVa8kyNkE7BnMDKEAfUHcsWPL8BVjubOjr05VzulyIiV1wii CuQFQ0c21Kb3upicsnN/NFdUoIiSIWY= X-Google-Smtp-Source: AGRyM1sZsJesu6UJNG3d32sCD9qZGiug5bUqeC6Cv2x+pSxwzYm41ScXjBwxLts3dkAapsJ8MfkBtw== X-Received: by 2002:a5d:598e:0:b0:21d:869c:f6b5 with SMTP id n14-20020a5d598e000000b0021d869cf6b5mr201994wri.399.1658437620509; Thu, 21 Jul 2022 14:07:00 -0700 (PDT) Received: from localhost.localdomain ([45.12.242.3]) by smtp.gmail.com with ESMTPSA id q17-20020a05600000d100b0021e428a9286sm2911639wrx.50.2022.07.21.14.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 14:06:59 -0700 (PDT) From: Laurence de Bruxelles To: linux-arm-kernel@lists.infradead.org Cc: Linus Walleij , Arnd Bergmann , Laurence de Bruxelles Subject: [PATCH] ARM: pxa: spitz: Fix GPIO dev_name for SPI devices Date: Thu, 21 Jul 2022 22:06:42 +0100 Message-Id: <20220721210642.26178-1-lfdebrux@gmail.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_140705_315571_F5FF0DBE X-CRM114-Status: GOOD ( 19.96 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Kernel >5.18 on Zaurus has a bug where the power management code can't talk to devices, emitting the following errors: sharpsl-pm sharpsl-pm: Error: AC check failed: voltage -22. sharpsl-pm sharpsl-pm: Charging Error! sharpsl-pm sharpsl-pm: Warning: Cannot read main battery! Looking at the recent changes, I found that commit 31455bbda208 ("spi: pxa2xx_spi: Convert to use GPIO descriptors") replaced the deprecated SPI chip select platform device code with a gpiod lookup table. However, this didn't seem to work until I changed the `dev_id` member from the device name to the bus id. I'm not entirely sure why this is necessary, but I suspect it is related to the fact that in sysfs SPI devices are attached under /sys/devices/.../dev_name/spi_master/spiB/spiB.C, rather than directly to the device. One thing I'm not clear on is whether the same change needs to be made to other PXA devices. The previous commit affected 10 devices, this commit only fixes one, but I only have hardware for that one, so possibly other hardware is different. Fixes: 31455bbda208 ("spi: pxa2xx_spi: Convert to use GPIO descriptors") --- arch/arm/mach-pxa/spitz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index edc2d63ee20d..b1b9385149fc 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -578,7 +578,7 @@ static struct pxa2xx_spi_controller spitz_spi_info = { }; static struct gpiod_lookup_table spitz_spi_gpio_table = { - .dev_id = "pxa2xx-spi.2", + .dev_id = "spi2", .table = { GPIO_LOOKUP_IDX("gpio-pxa", SPITZ_GPIO_ADS7846_CS, "cs", 0, GPIO_ACTIVE_LOW), GPIO_LOOKUP_IDX("gpio-pxa", SPITZ_GPIO_LCDCON_CS, "cs", 1, GPIO_ACTIVE_LOW), -- 2.37.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel