Justin Vreeland 794d92
From patchwork Wed Mar 24 18:27:46 2021
Justin Vreeland 794d92
Content-Type: text/plain; charset="utf-8"
Justin Vreeland 794d92
MIME-Version: 1.0
Justin Vreeland 794d92
Content-Transfer-Encoding: 7bit
Justin Vreeland 794d92
X-Patchwork-Submitter: Alexandru Ardelean <aardelean@deviqon.com>
Justin Vreeland 794d92
X-Patchwork-Id: 12162001
Justin Vreeland 794d92
Return-Path: <linux-iio-owner@kernel.org>
Justin Vreeland 794d92
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
Justin Vreeland 794d92
	aws-us-west-2-korg-lkml-1.web.codeaurora.org
Justin Vreeland 794d92
X-Spam-Level: 
Justin Vreeland 794d92
X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED,
Justin Vreeland 794d92
	DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,
Justin Vreeland 794d92
	INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,
Justin Vreeland 794d92
	USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0
Justin Vreeland 794d92
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
Justin Vreeland 794d92
	by smtp.lore.kernel.org (Postfix) with ESMTP id 82AC1C433DB
Justin Vreeland 794d92
	for <linux-iio@archiver.kernel.org>; Wed, 24 Mar 2021 18:29:06 +0000 (UTC)
Justin Vreeland 794d92
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
Justin Vreeland 794d92
	by mail.kernel.org (Postfix) with ESMTP id 4E18A619E0
Justin Vreeland 794d92
	for <linux-iio@archiver.kernel.org>; Wed, 24 Mar 2021 18:29:06 +0000 (UTC)
Justin Vreeland 794d92
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
Justin Vreeland 794d92
        id S229914AbhCXS2e (ORCPT <rfc822;linux-iio@archiver.kernel.org>);
Justin Vreeland 794d92
        Wed, 24 Mar 2021 14:28:34 -0400
Justin Vreeland 794d92
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45612 "EHLO
Justin Vreeland 794d92
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
Justin Vreeland 794d92
        with ESMTP id S237592AbhCXS2U (ORCPT
Justin Vreeland 794d92
        <rfc822;linux-iio@vger.kernel.org>); Wed, 24 Mar 2021 14:28:20 -0400
Justin Vreeland 794d92
Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com
Justin Vreeland 794d92
 [IPv6:2a00:1450:4864:20::542])
Justin Vreeland 794d92
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F234C0613DE
Justin Vreeland 794d92
        for <linux-iio@vger.kernel.org>; Wed, 24 Mar 2021 11:28:19 -0700 (PDT)
Justin Vreeland 794d92
Received: by mail-ed1-x542.google.com with SMTP id e7so28692701edu.10
Justin Vreeland 794d92
        for <linux-iio@vger.kernel.org>; Wed, 24 Mar 2021 11:28:19 -0700 (PDT)
Justin Vreeland 794d92
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
Justin Vreeland 794d92
        d=deviqon.com; s=google;
Justin Vreeland 794d92
        h=from:to:cc:subject:date:message-id:mime-version
Justin Vreeland 794d92
         :content-transfer-encoding;
Justin Vreeland 794d92
        bh=eyLMXRzyKHAlRrBe/1Z1s41GJMv95BdW39ViogQEvKA=;
Justin Vreeland 794d92
        b=Xzn9ElipPR5gW7jhTJ17RnslH0rsAe0v8ShnY9MYT3QTFuLChXnKGl2bFh1+iIDo56
Justin Vreeland 794d92
         MVWv9vgpxQDeoA0LDoefsDGyjkBGpyXewlXKtM/vGWN3xYQ5EtQjO6UAin1eDS+OA9sL
Justin Vreeland 794d92
         wwsyx3fqlmHQeHdaeLPElrx5PRNL5YZAI+mrQebrUkgVR3vBB5xxmSFrAfS89GMytz+Q
Justin Vreeland 794d92
         XvP86Pvu/vnNo7Olb01mEr89ranbxzFAqgXOlIG+DN7zx0mdMc5gq5BLIPBPeuSTKyWF
Justin Vreeland 794d92
         347GoGyFJcpdWOAgXnXQv4TygsNoOVJaOR5mvYYvpRPeynQDD70u3+OF22fo0B8rSJ0t
Justin Vreeland 794d92
         GdYQ==
Justin Vreeland 794d92
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
Justin Vreeland 794d92
        d=1e100.net; s=20161025;
Justin Vreeland 794d92
        h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
Justin Vreeland 794d92
         :content-transfer-encoding;
Justin Vreeland 794d92
        bh=eyLMXRzyKHAlRrBe/1Z1s41GJMv95BdW39ViogQEvKA=;
Justin Vreeland 794d92
        b=GH3cL6Bx7zuuC9kpXCCaLx9myYlAuwNAFToAP1QhG//ipMi7mtSg4UBRcUAWdiP8Do
Justin Vreeland 794d92
         m2X4543krJvfY5B38Bs9i3mq8KUClyWie2KaiQ4qLdYKVLSteVSGEtFKsNrUlG7/7bWJ
Justin Vreeland 794d92
         qYiIAPLUrBU/SOodIo9+H/tZ05XL8eJf0eJx6DTD4vKVhlQTK3M2sG4iGylopQZvxcDm
Justin Vreeland 794d92
         EX3mT1bfqTcRoeaKiYGy7F039t2uyEF8bwCP187a/inglN4rE21zr/JT42StMiwGFXbr
Justin Vreeland 794d92
         ffTmkZc5Ey+k0+5N7z/UvRSFWhjQVqy7iKJtv7j/p6chsSGZy4n3KgoAnAKwQVitQvmB
Justin Vreeland 794d92
         RIAA==
Justin Vreeland 794d92
X-Gm-Message-State: AOAM533JV1xc2/ie3PG2QhVXGRd3UDMPbruM/HaOHWyFCjP7Riqezuk/
Justin Vreeland 794d92
        mlz2j4wpmhz1M9wW5xGfp3+46DRrn7sySD5G
Justin Vreeland 794d92
X-Google-Smtp-Source: 
Justin Vreeland 794d92
 ABdhPJzkHaW0PaibM6iQXvD3mxDgi89Ugij3uUU/ZS4rFFh4W+voPoBMEzvj722CYtR0bTmLorKa8w==
Justin Vreeland 794d92
X-Received: by 2002:a05:6402:c8:: with SMTP id
Justin Vreeland 794d92
 i8mr4999991edu.57.1616610497853;
Justin Vreeland 794d92
        Wed, 24 Mar 2021 11:28:17 -0700 (PDT)
Justin Vreeland 794d92
Received: from localhost.localdomain ([188.27.130.90])
Justin Vreeland 794d92
        by smtp.gmail.com with ESMTPSA id
Justin Vreeland 794d92
 r4sm1288360ejd.125.2021.03.24.11.28.16
Justin Vreeland 794d92
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Justin Vreeland 794d92
        Wed, 24 Mar 2021 11:28:17 -0700 (PDT)
Justin Vreeland 794d92
From: Alexandru Ardelean <aardelean@deviqon.com>
Justin Vreeland 794d92
To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Justin Vreeland 794d92
Cc: jic23@kernel.org, linux@deviqon.com,
Justin Vreeland 794d92
        Alexandru Ardelean <aardelean@deviqon.com>,
Justin Vreeland 794d92
        Randy Dunlap <rdunlap@infradead.org>
Justin Vreeland 794d92
Subject: [PATCH] iio: adc: Kconfig: make AD9467 depend on ADI_AXI_ADC symbol
Justin Vreeland 794d92
Date: Wed, 24 Mar 2021 20:27:46 +0200
Justin Vreeland 794d92
Message-Id: <20210324182746.9337-1-aardelean@deviqon.com>
Justin Vreeland 794d92
X-Mailer: git-send-email 2.30.2
Justin Vreeland 794d92
MIME-Version: 1.0
Justin Vreeland 794d92
Precedence: bulk
Justin Vreeland 794d92
List-ID: <linux-iio.vger.kernel.org>
Justin Vreeland 794d92
X-Mailing-List: linux-iio@vger.kernel.org
Justin Vreeland 794d92
Justin Vreeland 794d92
Because a dependency on HAS_IOMEM and OF was added for the ADI AXI ADC
Justin Vreeland 794d92
driver, this makes the AD9467 driver have some build/dependency issues
Justin Vreeland 794d92
when OF is disabled (typically on ACPI archs like x86).
Justin Vreeland 794d92
Justin Vreeland 794d92
This is because the selection of the AD9467 enforces the ADI_AXI_ADC symbol
Justin Vreeland 794d92
which is blocked by the OF (and potentially HAS_IOMEM) being disabled.
Justin Vreeland 794d92
Justin Vreeland 794d92
To fix this, we make the AD9467 driver depend on the ADI_AXI_ADC symbol.
Justin Vreeland 794d92
The AD9467 driver cannot operate on it's own. It requires the ADI AXI ADC
Justin Vreeland 794d92
driver to stream data (or some similar IIO interface).
Justin Vreeland 794d92
Justin Vreeland 794d92
So, the fix here is to make the AD9467 symbol depend on the ADI_AXI_ADC
Justin Vreeland 794d92
symbol. At some point this could become it's own subgroup of high-speed
Justin Vreeland 794d92
ADCs.
Justin Vreeland 794d92
Justin Vreeland 794d92
Fixes: be24c65e9fa24 ("iio: adc: adi-axi-adc: add proper Kconfig dependencies")
Justin Vreeland 794d92
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Justin Vreeland 794d92
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Justin Vreeland 794d92
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Justin Vreeland 794d92
---
Justin Vreeland 794d92
Justin Vreeland 794d92
Apologies for this being too late.
Justin Vreeland 794d92
I made the patch but forgot it in a local tree.
Justin Vreeland 794d92
Justin Vreeland 794d92
Related to discussion:
Justin Vreeland 794d92
   https://lkml.org/lkml/2021/3/18/1007
Justin Vreeland 794d92
Justin Vreeland 794d92
 drivers/iio/adc/Kconfig | 2 +-
Justin Vreeland 794d92
 1 file changed, 1 insertion(+), 1 deletion(-)
Justin Vreeland 794d92
Justin Vreeland 794d92
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
Justin Vreeland 794d92
index e0667c4b3c08..dda0f1e37ec1 100644
Justin Vreeland 794d92
--- a/drivers/iio/adc/Kconfig
Justin Vreeland 794d92
+++ b/drivers/iio/adc/Kconfig
Justin Vreeland 794d92
@@ -249,7 +249,7 @@ config AD799X
Justin Vreeland 794d92
 config AD9467
Justin Vreeland 794d92
 	tristate "Analog Devices AD9467 High Speed ADC driver"
Justin Vreeland 794d92
 	depends on SPI
Justin Vreeland 794d92
-	select ADI_AXI_ADC
Justin Vreeland 794d92
+	depends on ADI_AXI_ADC
Justin Vreeland 794d92
 	help
Justin Vreeland 794d92
 	  Say yes here to build support for Analog Devices:
Justin Vreeland 794d92
 	  * AD9467 16-Bit, 200 MSPS/250 MSPS Analog-to-Digital Converter