From patchwork Wed Apr 6 20:51:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 558402 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 106BDC433F5 for ; Wed, 6 Apr 2022 21:37:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236375AbiDFVjp (ORCPT ); Wed, 6 Apr 2022 17:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237039AbiDFVh5 (ORCPT ); Wed, 6 Apr 2022 17:37:57 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1118C156099 for ; Wed, 6 Apr 2022 13:54:03 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id b21so6193118lfb.5 for ; Wed, 06 Apr 2022 13:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eeGHdFfh5VhQWNvv5IFYwXioLDFPoHM5b7mw7PLA+Oo=; b=YNHEYGfNZMp6swwFFqRx8OevK88MjuRAO/DMMsFvFnPR3cMlwqKW3HruQ8fnVZjiPm Nj3hakK+mGhPMgH5GxK5Y/DIHF1sNsqYVBFzl2hfE2haRB20ICOd9yuG0AXFcd/dCc6B pcGORDX70MDxYC3wZyIin8RKgytWDUT4a0ip7k0wX7s5p/6Q60qTONZIQrmlW24KbZAP eKXFiewoV3Mbyv19mv2qCjwzhXADmtyFlZ1Q7+jDFR2/w0MQQ4NoztmuzfSSRt4w8Wu2 R3PGe2coK41p7nZoyc9mnEVLpmW1+y4huGJvmMarll0a9zCsZuxsY1ZrAW4ZH4Kx5QmJ SCdg== 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=eeGHdFfh5VhQWNvv5IFYwXioLDFPoHM5b7mw7PLA+Oo=; b=5i6QAdktnzEK814QSdjx5CgHMjr10cDo0VpLauKjeHU1FVrNCYJ2B7KtoUcB9eqRmq xw94kOa9vFTGwSL5KvTK/JGCxP66O0Rmtt/Dd8pH7r3wB1EQvxydhSKfKsEejtxwE7DU VyLh3TGrXVeXHKbqM17aL3V1nh2BDEh6zrlexEWeAVkE+ecnqRndERjalLmi3vipkAE6 AmkTm04UIyQJztQ/L3pDpdMiY6pf5K0dD0AcXD2gyy2p5vYh0BZq3mk3PfLy9Dd+MSjZ 06wP/hARaS74p7PqlJMuYNpKEqqmuLMMhZdiFqKFeRaXTCwTMvi+hECk2cSwQF088WaA f85w== X-Gm-Message-State: AOAM5334O5LrF+O4MNXJIf2nXvx/QpLzSOHxcR6BF8PoyWmwtY9bHeG6 YyfLTFj1SCQPdiRmnuIjhazd4yBLJDP0Ag== X-Google-Smtp-Source: ABdhPJzrMfVIzt7TOHsFctT/nslRVLO2dCN95fdkUszlvHoMnnZMNu4BRYbSRpzSwDNh1ePy+W1aJQ== X-Received: by 2002:a05:6512:3192:b0:44a:b43f:d58f with SMTP id i18-20020a056512319200b0044ab43fd58fmr7179844lfe.179.1649278441105; Wed, 06 Apr 2022 13:54:01 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id x40-20020a056512132800b004489691436esm1951647lfu.146.2022.04.06.13.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 13:54:00 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Bartosz Golaszewski Cc: Linus Walleij Subject: [PATCH v2] gpio: ixp4xx: Detect special machines by compatible Date: Wed, 6 Apr 2022 22:51:56 +0200 Message-Id: <20220406205156.2332627-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org There are some special clock amendments for two machines formerly detected by their machine_is() boardfile macro. They are now migrated to device tree so use of_machine_is_compatible() instead. Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebase on v5.18-rc1 --- drivers/gpio/Kconfig | 1 - drivers/gpio/gpio-ixp4xx.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 45764ec3b2eb..075a5d0feef7 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -353,7 +353,6 @@ config GPIO_IOP config GPIO_IXP4XX bool "Intel IXP4xx GPIO" - depends on ARM # For depends on ARCH_IXP4XX select GPIO_GENERIC select GPIOLIB_IRQCHIP diff --git a/drivers/gpio/gpio-ixp4xx.c b/drivers/gpio/gpio-ixp4xx.c index b3b050604e0b..1acda980d119 100644 --- a/drivers/gpio/gpio-ixp4xx.c +++ b/drivers/gpio/gpio-ixp4xx.c @@ -17,8 +17,6 @@ /* Include that go away with DT transition */ #include -#include - #define IXP4XX_REG_GPOUT 0x00 #define IXP4XX_REG_GPOE 0x04 #define IXP4XX_REG_GPIN 0x08 @@ -240,7 +238,8 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev) * Make sure GPIO 14 and 15 are NOT used as clocks but GPIO on * specific machines. */ - if (machine_is_dsmg600() || machine_is_nas100d()) + if (of_machine_is_compatible("dlink,dsm-g600-a") || + of_machine_is_compatible("iom,nas-100d")) __raw_writel(0x0, g->base + IXP4XX_REG_GPCLK); /*