From mboxrd@z Thu Jan 1 00:00:00 1970 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 4EF4BC433EF for ; Sat, 5 Feb 2022 17:26:07 +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:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=78We0lx9IX3XBnIgoAafnEOlTOcF/iogiMi4FS+juVI=; b=pjxEMEFAx8ytnW iuNJI1uHsOzegin1ueFbowxEvZG7FNT85s3Hp8Icl1TlhCyz5+6aiHv/01QVURUBEj9Oh1mt8siaJ 1LhZQU1ixpRf4zj806wxbq+QYVQ7ARXr7fvvVw5nj/bESEfZQSs3oKh8tas2opnuVbYosjizcU+1z dZyk3sh+/cNmG605Lz9GmnQyZJxe9EE5LriGQrNfytVHYeqmumJWIdZflbsws8BHM0BwJm18bTeuQ 3uHSy40t1iYQGf8nAok2DC1T5KzpBYkxcP3s1UIhUtZTj6sVHf51LV0JdtJe9UBeirz9oeWLmLu0I o/ziFd2KOAHzKiSiMqqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nGOnr-006sZP-Nv; Sat, 05 Feb 2022 17:24:51 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nGOnp-006sYb-2d for linux-arm-kernel@lists.infradead.org; Sat, 05 Feb 2022 17:24:50 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA9E161146; Sat, 5 Feb 2022 17:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03E90C340E8; Sat, 5 Feb 2022 17:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644081885; bh=6w/99GRGMgWgYWe4X+KfojXSRYWk/PfNkbE0hES5fiM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vEptM6qr2UhahzEMsHKHAI5fI/NvwY4hHTg5yr6Nwen7w0VGgwmS1F7ntE3krzCWJ EJX4oTvBObppZGwzwEMahBSyBLY/gPloCdWW1EqguPmwMkRTyW7kIbvHbRVvdRu6BV N9BARRQfKKvVPUQhd5/6xrZZGCxDqq2DhaPHDqC81mx1/d2Ua7yLXBepVOMyIhjQuS i3iRMYcPArqq+B68TBnTyFopBk9cNNvfh9q5JcEKcK3DeT/l0cV83F26XBGpR2Yobw RLPKjpYEiQx8Kk/UGGB2pTJBU+8Z/CY34M/R+Mv7+CVx5e3sMcWkitA58bohHPT6sK d8ay07M1QlJ7Q== Date: Sat, 5 Feb 2022 17:31:14 +0000 From: Jonathan Cameron To: Andy Shevchenko Cc: Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , Fabrice Gasnier Subject: Re: [PATCH v2 1/1] iio: trigger: stm32-timer: Make use of device properties Message-ID: <20220205173114.5a60fc47@jic23-huawei> In-Reply-To: <20220202204112.57095-1-andriy.shevchenko@linux.intel.com> References: <20220202204112.57095-1-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220205_092449_259353_6FE5BB26 X-CRM114-Status: GOOD ( 22.08 ) 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 On Wed, 2 Feb 2022 22:41:12 +0200 Andy Shevchenko wrote: > Convert the module to be property provider agnostic and allow > it to be used on non-OF platforms. > > Signed-off-by: Andy Shevchenko Looks fine to me. The stm32 drivers are well maintained so I'll leave this one on list a little longer for feedback. +Cc: Fabrice > --- > v2: dropped depends on OF > drivers/iio/trigger/Kconfig | 2 +- > drivers/iio/trigger/stm32-timer-trigger.c | 11 ++++++----- > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/trigger/Kconfig b/drivers/iio/trigger/Kconfig > index 8cef2f7452e8..7ecb69725b1d 100644 > --- a/drivers/iio/trigger/Kconfig > +++ b/drivers/iio/trigger/Kconfig > @@ -38,7 +38,7 @@ config IIO_STM32_LPTIMER_TRIGGER > > config IIO_STM32_TIMER_TRIGGER > tristate "STM32 Timer Trigger" > - depends on (ARCH_STM32 && OF && MFD_STM32_TIMERS) || COMPILE_TEST > + depends on (ARCH_STM32 && MFD_STM32_TIMERS) || COMPILE_TEST > help > Select this option to enable STM32 Timer Trigger > > diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c > index 4f9461e1412c..5049d9ecfc1a 100644 > --- a/drivers/iio/trigger/stm32-timer-trigger.c > +++ b/drivers/iio/trigger/stm32-timer-trigger.c > @@ -11,9 +11,10 @@ > #include > #include > #include > +#include > #include > #include > -#include > +#include > > #define MAX_TRIGGERS 7 > #define MAX_VALIDS 5 > @@ -771,11 +772,11 @@ static int stm32_timer_trigger_probe(struct platform_device *pdev) > unsigned int index; > int ret; > > - if (of_property_read_u32(dev->of_node, "reg", &index)) > - return -EINVAL; > + ret = device_property_read_u32(dev, "reg", &index); > + if (ret) > + return ret; > > - cfg = (const struct stm32_timer_trigger_cfg *) > - of_match_device(dev->driver->of_match_table, dev)->data; > + cfg = device_get_match_data(dev); > > if (index >= ARRAY_SIZE(triggers_table) || > index >= cfg->num_valids_table) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel