Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4144831pxb; Tue, 19 Apr 2022 18:28:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySNSqSofIYEXNp9f0gy7P2nyvlZ7jrwIStXHB34Lc4iUhnPTdPNekrSnibdKLfhCgFABhP X-Received: by 2002:a05:6402:27d4:b0:423:fb6b:644c with SMTP id c20-20020a05640227d400b00423fb6b644cmr7549125ede.409.1650418111240; Tue, 19 Apr 2022 18:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650418111; cv=none; d=google.com; s=arc-20160816; b=WbhA1+pu7zcqlr3JI5jXwBAqhunlIAYC7GM0Xw5Bb8o6ZcYk3G3m9CCOqgnW/RYp26 na84rfkkBirHTVJmIlNRcqGmhO5D/zOMP0rYwemHMABxlG/NzZw1c1eRfk7pL7xvrGN7 +p9Ik7lx3ElOOS6a5a9F1Nt2BVIySmZ3U8kyDcl3FcIkKFEfzWw3l/w8eHEokvy4lY+e l8TXD2XBjBNIkz6y3qcTxLUXbluhNz/8iPs0uJskwbARIfTq3a/L06gTjb5hDMlmS5k4 WvxE0isjvbSA/9BuU30XXzaNjtOIseZCpIYhQfdCt/MT0ie9mQMEvZOS7wgZTI7nX2P4 8kCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=MM3dkn9p+yFAxFN7ULbQqW0gJLZo6w5hF/ikiKgGNds=; b=gm3UpR6peOqajZXm4fJBY5X/IRmJkld+9x830yfNtbQr8VIf1/QrT4aaGSR3CZOdR8 uIpfBadIOct+ZiYOQ4HCpq7hNtfEZFUcdF6VxaG7UWtr6IY1qN9aJYX3fgTqa6F6uHKc /0lGC4bDJ/msZI8chR5/6xNIVbUo6+U5sHZlJgWXuWpWRQgl062/vn0sTDs4LyvNxyRu m08BxzF39naeylLinhmsXoCO1RIEIQRxodKF4Gzare3vLTAkd8qXZsofSvmiEtyd4NIx c3WNIJCkyQR9eFq87Y8XL/56eBUOJjrNlFBtQaK416ecjbiAkrxy91v7pOX3CdN2dIzp 02EA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a170906184a00b006e881990592si654989eje.951.2022.04.19.18.28.05; Tue, 19 Apr 2022 18:28:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233599AbiDSK23 (ORCPT + 99 others); Tue, 19 Apr 2022 06:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350669AbiDSK1d (ORCPT ); Tue, 19 Apr 2022 06:27:33 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FA57389E; Tue, 19 Apr 2022 03:24:49 -0700 (PDT) Received: from localhost ([31.220.114.252]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MCbMz-1npJkn4351-009fUR; Tue, 19 Apr 2022 12:24:27 +0200 Date: Tue, 19 Apr 2022 12:24:26 +0200 From: Andreas Klinger To: Jonathan Cameron Cc: Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH v1 1/1] iio: proximity: mb1232: Switch to use fwnode_irq_get() Message-ID: References: <20220413183123.20292-1-andriy.shevchenko@linux.intel.com> <20220416120726.0ba78960@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220416120726.0ba78960@jic23-huawei> X-Provags-ID: V03:K1:h28I5PaIB1AGwZVfL+JEIK0W7L2gRQU9pIM8fijwncou7OulhXQ i0QT2/BlAmO8EpRN7HVoeQDoPn+4cux2VnJyYPR2syiR1Kl1TossTGE3g+sC8AvhKtF1QE5 oYYbKWSjVqZd7Z9wVa4uESUIMgTWti9GTmlZTEQ+3g9Fp5xK9yneilMoOG7l04O1b4TQ1gM 5lIiD23u9tIMNcXyZKzUw== X-UI-Out-Filterresults: notjunk:1;V03:K0:otICPBEuBO0=:00N7IK7k89SMBuOxXaHP50 IV1cN06/tnBYlHpdSe/U2DX3I46714cy+SHR06+RIH9wwvAIkCZ/oPZPmgPeCFw7XL04xlMwc NsTieuByThtsDyoj66X4NmhPSSkExWawGkzn233vVvagXPi9olBAXX5xOo1ufJfc891UHeSMP raAUN84+i3j6PrLEfnLlBk835uoFIehkK+77KQ0fnPAPIhksa1czlYtokb0QKCQP0qKqdLRkj 5ZERZQXwKeFT6zAEtbzJTtI8Bic5z0p0Q/o5X3VaKg+n7+GrUfp3VYTlBUDk79D26HljKZpP/ SnJaQxCR6rvB0MQgXYMrFspGVx/Fq6SMlZG35tROJHWbvtarmAWwW1dTkGHThfKp+Omt2viV1 i2jB4sP8F2uePmYE3vnVlGbogIsm2cO+rE+RyEN/iLSYrE8uPhT7r3RUrmW2tSEJW/j4V5D23 dLffRvHLAWrhugHaZrFMFCnKR7fRrG1l8vZvRR8mMbP1L0CQoAh4TUi47ufxo6oVcjAE9FRwn fotXrDAQ8I95MTOP/KJTfP24tGvVDMGhat6cM0f7ZwyAaNo+lbXNd6kkt7/zOuYb++hjdF0wi lLAnejuYtNaYOTYZ+wq5QQrsybzFJZyywn2quxMKLcBMVgB9qCdJoPY53HKaYp5WYH1g8Awof IE9I4BKKOcwqGckHGulsT8Wicu309iL+Tvitsvf850PyvMKTPvwHlpH0tg3JpVSYxEIU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Jonathan Cameron schrieb am Sa, 16. Apr 12:07: > On Wed, 13 Apr 2022 21:31:23 +0300 > Andy Shevchenko wrote: > > > We have OF-centric variant of fwnode_irq_get() in the driver. > > Replace it with a call to an agnostic implementation. > > > > Signed-off-by: Andy Shevchenko > > Whilst I 'think' this ends up being functionally identical > I'd like to leave it a little longer to see if Andreas has > time to take a look and verify this change is fine. > > There seem to be subtle differences in the irq setup as the > new code does a sanity check on the domain being available > and defers if not which I don't think happens with the > existing code. Anyway interrupts are optional and the driver will work without i don't see any issue here. Acked-by: Andreas Klinger > > Thanks, > > Jonathan > > > > --- > > drivers/iio/proximity/mb1232.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iio/proximity/mb1232.c b/drivers/iio/proximity/mb1232.c > > index ad4b1fb2607a..0bca5f74de68 100644 > > --- a/drivers/iio/proximity/mb1232.c > > +++ b/drivers/iio/proximity/mb1232.c > > @@ -10,12 +10,14 @@ > > * https://www.maxbotix.com/documents/I2CXL-MaxSonar-EZ_Datasheet.pdf > > */ > > > > +#include > > #include > > #include > > -#include > > #include > > +#include > > #include > > -#include > > +#include > > + > > #include > > #include > > #include > > @@ -209,7 +211,7 @@ static int mb1232_probe(struct i2c_client *client, > > > > init_completion(&data->ranging); > > > > - data->irqnr = irq_of_parse_and_map(dev->of_node, 0); > > + data->irqnr = fwnode_irq_get(dev_fwnode(&client->dev), 0); > > if (data->irqnr <= 0) { > > /* usage of interrupt is optional */ > > data->irqnr = -1; > -- Andreas Klinger Grabenreith 27 84508 Burgkirchen +49 8623 919966 ak@it-klinger.de www.it-klinger.de www.grabenreith.de