From patchwork Wed Dec 14 22:20:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13073624 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 50498C4332F for ; Wed, 14 Dec 2022 22:21:39 +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:References:In-Reply-To: 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: List-Owner; bh=M5nULP7mgDYQMxc5KoHmWsFfqx5wuIQqB02LyUlc2rk=; b=2mzFn4PROaAZkm IE7cfLug+skJIKYcGhYR0+GDT7PglLIlT+EFxl1dwmXuBWRyvQbQlvMuEhxJvRyDtRQ/NXyy5oVTy 76QzKExr3rc2hp79fl2uxrMbr/RaZNixV6aH75bfrzHX83tCAY3c2XAzv2wK/lKcVH6S6fgJm2u5/ DTSetkyNvM3mn6AIQ17JI/ekE5SvBB2sDIGRnCF3LVf4PA/OqXKMWneMY/ZRasy0x8HXydzrDvfRm lwDWC1OTCU6/QkBJjZlcDqDcAxWzOxarEquIsMKf7uGVwKeJLQaFqcNPdXT+n3YrHats61yGDpGhq qLA8cEzgGdHDhCY9KCHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5a7G-003bp6-65; Wed, 14 Dec 2022 22:20:42 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5a74-003bgw-AN for linux-arm-kernel@lists.infradead.org; Wed, 14 Dec 2022 22:20:31 +0000 Received: by mail-wm1-x333.google.com with SMTP id f13-20020a1cc90d000000b003d08c4cf679so506591wmb.5 for ; Wed, 14 Dec 2022 14:20:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wPREbJk824mHynEMZOnSi0K0a5V18kJznKBGD4RRywY=; b=l66GEwC5C6VAS63K9J3rZjKXv9Ah6JEmGkuUGTVHgliCPY1cXbu5ewkG01mSuzfOXD tDbxZKkVQiouTZLeMmdg8ADhLgjvkP2wFX/bPfh+phz68l/x5yxvzk2PuceUI81df6Wn cOjmzuKX0dQJMpWSv6CzEZySAEl9bbDI5wBAt9rXkH0czm+jeEvmQg+aLeZ8gYzFAYD6 mV29/0ZPxC6sI/8oT/T2Cc3aUQw6lvAFKYpQrlfEFWIQPSTMebp8pO0puAK+W6JX1SPO 8Bgo844ywOv1nreOSxlJtW45S4yK6i7govngZIKnx73r0zaR33+EmSbRLTWrl8pAEcue gQTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wPREbJk824mHynEMZOnSi0K0a5V18kJznKBGD4RRywY=; b=HI6LOAxUNHUGB9h+zp7/t7h0VCtNKS6RNQ2DyWbLjIZvYHYcNwU6Dp8SrqZHYhIRCd IKEZwtrkt8cwDIDSQgwIpoXCHW4MGPQwXoHxqqY1rn7e1awO1Aypg2mMxRZbyE9Pg7IX LArKAiPd9zO9+pzfy0cHSf0bDZ1glva+VsmvVyMutn/AUdUUu+uPf7kvYJnAgdCVg30t kha6oo0PM9GLjKhDCNfghC+0e7mz76qwhmOFQoisQ2we0bY0FRoYHKIaJ+iaDF0szBHK TasWuJ2lXwo4jlqmQyfHIO85wxUWgbVskB/8vQS75ez4TCjpMG/cqpuWa17eyifBkuFP 42jw== X-Gm-Message-State: ANoB5pm/372tq3KlvFH8W6aRrqU65Dv9ctFU2YMsdHBGunH314WburIG 14o7D+4LMh908ZW/tezMOQk= X-Google-Smtp-Source: AA0mqf5Ji4XUil9erQ2oeZMLnbnZyZcIGBqTvrqtrXfVbfgMHW3zGU9xw1FA1j3kxScoRn5UhzdNJA== X-Received: by 2002:a05:600c:1d98:b0:3cf:74b4:c3c8 with SMTP id p24-20020a05600c1d9800b003cf74b4c3c8mr20435849wms.17.1671056428101; Wed, 14 Dec 2022 14:20:28 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id w23-20020a05600c099700b003d1de805de5sm3512107wmp.16.2022.12.14.14.20.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Dec 2022 14:20:27 -0800 (PST) From: Alexander Sverdlin To: linux-iio@vger.kernel.org Cc: Alexander Sverdlin , Hartley Sweeten , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] iio: adc: ep93xx: Add OF support Date: Wed, 14 Dec 2022 23:20:24 +0100 Message-Id: <20221214222024.951984-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221214222024.951984-1-alexander.sverdlin@gmail.com> References: <20221214222024.951984-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221214_142030_375277_F83AA03D X-CRM114-Status: GOOD ( 14.05 ) 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 Prepare for EP93xx conversion to DT. Signed-off-by: Alexander Sverdlin --- drivers/iio/adc/ep93xx_adc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c index fd5a9404c8dc..e530a37180e1 100644 --- a/drivers/iio/adc/ep93xx_adc.c +++ b/drivers/iio/adc/ep93xx_adc.c @@ -21,6 +21,7 @@ #include #include #include +#include /* * This code could benefit from real HR Timers, but jiffy granularity would @@ -227,9 +228,18 @@ static int ep93xx_adc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id ep93xx_adc_of_ids[] = { + { .compatible = "cirrus,ep9301-adc" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids); +#endif + static struct platform_driver ep93xx_adc_driver = { .driver = { .name = "ep93xx-adc", + .of_match_table = of_match_ptr(ep93xx_adc_of_ids), }, .probe = ep93xx_adc_probe, .remove = ep93xx_adc_remove,