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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC204C7EE2D for ; Sat, 3 Jun 2023 20:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbjFCU10 (ORCPT ); Sat, 3 Jun 2023 16:27:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbjFCU1Y (ORCPT ); Sat, 3 Jun 2023 16:27:24 -0400 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0FC412E for ; Sat, 3 Jun 2023 13:27:23 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id 0b25cecc-024d-11ee-b3cf-005056bd6ce9; Sat, 03 Jun 2023 23:27:22 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Sat, 3 Jun 2023 23:27:21 +0300 To: Nikita Shubin Cc: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Mark Brown , Michael Peters , Kris Bahnsen , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 18/43] spi: ep93xx: add DT support for Cirrus EP93xx Message-ID: References: <20230424123522.18302-1-nikita.shubin@maquefel.me> <20230601053546.9574-19-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230601053546.9574-19-nikita.shubin@maquefel.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Jun 01, 2023 at 08:34:09AM +0300, Nikita Shubin kirjoitti: > - find register range from the device tree > - provide clock access via of > - use_dma as a DT node ... > +static struct ep93xx_spi_info *ep93xx_spi_get_platdata(struct platform_device *pdev) > +{ > + struct device_node *np = pdev->dev.of_node; > + if (np && of_property_read_bool(np, "ep9301,use-dma")) Excessive check for np to be NULL, this is implied by the _read_bool() anyway. > + dt_spi_info.use_dma = 1; > + return &dt_spi_info; > +} ... > + master->dev.of_node = pdev->dev.of_node; device_set_node(); -- With Best Regards, Andy Shevchenko