From patchwork Fri Dec 23 16:26:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 13081026 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 D9BDCC46467 for ; Fri, 23 Dec 2022 16:26:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231512AbiLWQ0q (ORCPT ); Fri, 23 Dec 2022 11:26:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231392AbiLWQ0o (ORCPT ); Fri, 23 Dec 2022 11:26:44 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88B235FFF; Fri, 23 Dec 2022 08:26:43 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id jo4so13064825ejb.7; Fri, 23 Dec 2022 08:26:43 -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=wxDL+X8NmnukiauYcA33D3M1w50IAdYmljuXwdjMwII=; b=Ic2NXkxd20lD/6DOmo7za4NfqIesYZ5KwzWGj7PL1MVAd2X5VqAHmFFZkOritE9yWN Xi5samHQOW698C7ygZU0xxC2y46eMVFto07/yxTfKVCNuyXEOmuscQ/al+VDnTPri+SH UhIF5kv3Q2PgaXjY+y+WtJSSDEsjj026I1HnfcIOg2KCgH+nlb7fVhbtCu+/c4tu32XL wuVL7XghWdcFN7D8eL7jqcYBTvdsawX/JyHkRnX+Rg0H/PrebkBKbo1NlFOv6pKSBFGk 3urNCu1b3kktdvtW3pX4R7iA7BJCHV4ofK7zmO8Y8Tw/7CAmRhh+otuZpvulGkJUnTsD tb5Q== 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=wxDL+X8NmnukiauYcA33D3M1w50IAdYmljuXwdjMwII=; b=U3u6t6Mg5qGX4cUvKQPJdwQgLTzu1mtao48BHn24t+OaTuAiNj9n/Ieq5eL8zdFgKk OMk9y2Sjz04dTJDmUTxLzF8q+orKSF4Vlx8Hn++jV7Z/vxIZGtpduchM2k1cl59PIWt8 HJwwxh5AnMEwRdTtWOiZJL1pXYEzZG2zJAOYEOUN8l0HXi1aCuRj60uJkZFZyVorlNY8 D8Uyz/9xPJGljmgwWj1IMJLmdJeqGO7jEtYC7zJDUMCsHG+xfLjfdHzNKDhRI5n4jv2/ yyBfO5K5W3rzVSj1VBxg/uXO806RT3TYYAzmRogDwbKrI1dB+WtKE7rt7e6YHske1Qvw XgIg== X-Gm-Message-State: AFqh2kpXvS3dE75L0Rv18uIw+yXoMSbnrkgi8qOdL2nyemzKgYc/rVdd un/cSVR33lQN6CrkGrVqMUKeOoZP3sM= X-Google-Smtp-Source: AMrXdXsPIDPmGkpmye/C3rLElx/wzoe7cpMFawUaJnMnOf6cyBcP9awLfAw/jesDD6tBb7XqMmdw/Q== X-Received: by 2002:a17:906:5dd2:b0:7c1:7010:f413 with SMTP id p18-20020a1709065dd200b007c17010f413mr12371630ejv.19.1671812802210; Fri, 23 Dec 2022 08:26:42 -0800 (PST) Received: from localhost ([2a02:1210:8629:800:82ee:73ff:feb8:99e3]) by smtp.gmail.com with UTF8SMTPSA id fu19-20020a170907b01300b00781be3e7badsm1550295ejc.53.2022.12.23.08.26.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Dec 2022 08:26:41 -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 v3 2/2] iio: adc: ep93xx: Add OF support Date: Fri, 23 Dec 2022 17:26:36 +0100 Message-Id: <20221223162636.6488-2-alexander.sverdlin@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221223162636.6488-1-alexander.sverdlin@gmail.com> References: <20221223162636.6488-1-alexander.sverdlin@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Prepare for EP93xx conversion to DT. Signed-off-by: Alexander Sverdlin --- Changelog: v3: Removed comma, of_match_ptr() protection and the ifdefs drivers/iio/adc/ep93xx_adc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c index fd5a9404c8dc..a35e6cead67d 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,16 @@ static int ep93xx_adc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_adc_of_ids[] = { + { .compatible = "cirrus,ep9301-adc" }, + {} +}; +MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids); + static struct platform_driver ep93xx_adc_driver = { .driver = { .name = "ep93xx-adc", + .of_match_table = ep93xx_adc_of_ids, }, .probe = ep93xx_adc_probe, .remove = ep93xx_adc_remove,