Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp96712iof; Sun, 5 Jun 2022 22:15:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKiZw7Soao5mHnyRAOBlyjiw1ABy+K89ETilnZzps6dI/Mo90N1nbeZlaNgevAa4dvT5X/ X-Received: by 2002:a17:903:124b:b0:15e:84d0:ded6 with SMTP id u11-20020a170903124b00b0015e84d0ded6mr22572956plh.141.1654492520813; Sun, 05 Jun 2022 22:15:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654492520; cv=none; d=google.com; s=arc-20160816; b=qA695eB193DhZ70uonfkMzm5iGko1Im5aJx6K0tZvGKWBrd8bU7H8WF99y/xujAvjd XHpUHRPCCIGSB1M59S5zG5wXW6EJ5gKvOabo59y/BXvyr170+nrIniz1K92TBkSOLb4K oKaoTwPCiMHz2ScgrJnH4qDBkBC+hTeI2YDi5dCC3vhKBGhHGb5Nv39yW8SbBdlik/fa iDM/oVPMz2HulQNf0G+29kOPduvvH1+vJP0q7o6lV43/e4wfpzmQzDBp4CD/XtLThmIf bPIqVkK/i6p4cpw19w3HlWYrP3f2IKthsFbCkoTKbmsZ8SjLbXo0Y5p7KPARLHmw6bjS LsDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=NLlnPf7J7Y38rQDZO5A9vT/S1YfohDtqvW7a+A5eHrQ=; b=YGsdQJz692Oo56CWEkhUqigpZgRx3kPrbfJXRKnyFIFcgBaovXDl/Wdevkl0BUhkSQ EV/c1pKUbYy7i6m3bLGw9xxbFY2UjNgxf3PRJ93OwGvC5mc/y0G8SwxmHO2K4kg3aq6i FHBQGCHQrXNCUBaDHwsb9BasiFewWOhrHU0I1TFVup6ZeLtqo3C9rh5o00uPzXj4BoOx i50PZCT0FelL7OeRzbYBhyVBUltIxGr6bj1WNFz/cUWdaS1dq6fKefcvHd42rf3Nd7+8 hmbgs6QPzKE4mH4Hgy8/hNtTtSGPXGALNHbd21OcKGW2b2UP2/Sbez35pHQpzg+c0+pW UB7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pr7p+ki4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s7-20020a632147000000b003c66e022eddsi20660476pgm.10.2022.06.05.22.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:15:20 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pr7p+ki4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4A3BF166468; Sun, 5 Jun 2022 21:20:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344167AbiFCRBK (ORCPT + 99 others); Fri, 3 Jun 2022 13:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243045AbiFCRBI (ORCPT ); Fri, 3 Jun 2022 13:01:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFC07522D8; Fri, 3 Jun 2022 10:01:07 -0700 (PDT) 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 7D2CB61A36; Fri, 3 Jun 2022 17:01:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A025C385A9; Fri, 3 Jun 2022 17:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654275666; bh=RSQ8NkpnOkmzm6/aUP8DpyGlnoqBYtHZOvzZFrlSehs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Pr7p+ki4uN5VzCRliCrBcm2J5wlHvJIcbX83rjlBZbFcnZRpQ0wn5aqLk2IVQ7XTr A4XFHNrZjvtcsIfyIjdKL4nEujpPosu9Ne8rsGecdfnm32FUyxwNkKcChqJP9MIUYQ uqMDUPyNyhBGxbmmxl8+R4OVohvaaEtImdZjmQ8ZU2c0ZRpZrNBa49jqR9824Lawsa 4pylqIseZNCNjoXSx+52+EoexjpnHn/xNNcGLZR0YpNC0AvthI0fq6ECD54b97iB5q LLmYlHsuzv02vt/H8hFrpoWDpwqbnsLo6j9GxJsV5E4NYHgEKSSrCqW79BtBZbZcRo cdm6s+8/BTleA== Date: Fri, 3 Jun 2022 18:10:06 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Subject: Re: [PATCH v1 1/1] iio: adc: mxs-lradc-adc: Get rid of OF specifics Message-ID: <20220603181006.2c5cc6c4@jic23-huawei> In-Reply-To: <20220530173324.921-1-andriy.shevchenko@linux.intel.com> References: <20220530173324.921-1-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 May 2022 20:33:24 +0300 Andy Shevchenko wrote: > First of all, the additional conversion from vIRQ, and this is exactly > what is returned by platform_get_irq_byname(), to vIRQ is not needed. Confusing sentence form. Perhaps: First, the additional conversion from vIRQ (returned by platform_get_irq_byname()) to vIRQ is not needed. > Hence, drop no-op call to irq_of_parse_and_map(). > > Second, assign the firmware node instead of of_node. > > Signed-off-by: Andy Shevchenko Hi, Seems sensible to me, but I'd like a sanity check from someone more familiar with this driver. Thanks, Jonathan > --- > drivers/iio/adc/mxs-lradc-adc.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c > index bca79a93cbe4..25292bb8a13f 100644 > --- a/drivers/iio/adc/mxs-lradc-adc.c > +++ b/drivers/iio/adc/mxs-lradc-adc.c > @@ -17,7 +17,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -692,7 +691,7 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) > struct mxs_lradc_adc *adc; > struct iio_dev *iio; > struct resource *iores; > - int ret, irq, virq, i, s, n; > + int ret, irq, i, s, n; > u64 scale_uv; > const char **irq_name; > > @@ -721,7 +720,7 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) > platform_set_drvdata(pdev, iio); > > iio->name = pdev->name; > - iio->dev.of_node = dev->parent->of_node; > + device_set_node(&iio->dev, dev_fwnode(dev->parent)); > iio->info = &mxs_lradc_adc_iio_info; > iio->modes = INDIO_DIRECT_MODE; > iio->masklength = LRADC_MAX_TOTAL_CHANS; > @@ -747,9 +746,7 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev) > if (irq < 0) > return irq; > > - virq = irq_of_parse_and_map(dev->parent->of_node, irq); > - > - ret = devm_request_irq(dev, virq, mxs_lradc_adc_handle_irq, > + ret = devm_request_irq(dev, irq, mxs_lradc_adc_handle_irq, > 0, irq_name[i], iio); > if (ret) > return ret;