Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1051424iob; Thu, 28 Apr 2022 17:45:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxueBLanqbaX+d5sas4p7EacOUGg2XS9aO+viWOSyU9toc/ivBRYBUVkzzle68TsHRvzIWO X-Received: by 2002:a2e:9ed1:0:b0:249:3cc7:2d56 with SMTP id h17-20020a2e9ed1000000b002493cc72d56mr22330136ljk.244.1651193152411; Thu, 28 Apr 2022 17:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651193152; cv=none; d=google.com; s=arc-20160816; b=HdbHaUW3jShKn8LjDZxqdNTrdWBijiMB9nsu6xLhCk5eDgvr87OTK+Q02eo5GUEjL2 sOfMpzpK+PDhniBUNRtFsnKw58fK9vYk+FKkWbVZOWDxccc/7bYD/XnblGH48sUEZOWU D5k2WM5rttlAEkDXkK4EaXAuXbCJqPW2y0DYjDMSROYg1xKx7IRVcCxrjRK+7TDJTf6P WPvCwfp5GOBD9mqBzm6Q84LSxYJSLy/kBKHKS4B/1/sEurBkc+Lv2uHdAC8LoWHhvc1B bQKe2lsVHPliwlN7v1R+V1Gc0wcdeifrEKLxwxf+ngXdZAE0VPw/oFoPHT1yGbnGR8wD QqVQ== 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=YwZSHEq9GZ6ksSLocNDG01yUnVh22b3qQkO3NEQIxUw=; b=vT2bfoZktBFJsP0qFb9h493NUkEEblaG6uWC+J68XNyPQCNCs7lljZsxVL9FQuutV/ 5NTHwhQqqdGjecfHLZgQr1kPtYwiIWVa5OVMhnlWf1cncH7M31fWq0LtBqVKh0c6P0vc 1PVVCJ/8iZ/6b6xbppX/vuaUHy3snd4r56X5DNbQ2QZIBtbDPwu44nVaL8UX65UqawoD GEezgApY20zG1pk3yzzRH+dYFDtPoFStfb7Am4IKnaChMSqmUcVLLDzlM0kFOzqUwDUe l0YQh6gTlzZmFUd1dSwQpazc/GvAQQFIjQUk7pbUOMT89T3fkhGonMVCB/SZ0nLYw8+4 Wi3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KDAYk5Em; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020ac24bcb000000b00471988ede35si5989867lfq.315.2022.04.28.17.45.25; Thu, 28 Apr 2022 17:45:52 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KDAYk5Em; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350959AbiD1SYd (ORCPT + 99 others); Thu, 28 Apr 2022 14:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243346AbiD1SYb (ORCPT ); Thu, 28 Apr 2022 14:24:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D8E957B2D; Thu, 28 Apr 2022 11:21:16 -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 EF1676168B; Thu, 28 Apr 2022 18:21:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6274C385A0; Thu, 28 Apr 2022 18:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651170075; bh=imln+1c9r+M+Glr7eY5+sQk5QxndtJrCqKyuS/l1fuY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KDAYk5EmhoVnbsS3jMX2rNM7AyRKVcnu9ulsSNfmEMWvtfPMEVp14rLd/ExcOVqiR KnV8E+kV6zf9zqv2dYN8ApKOqi0BRpCagn1RwHMeAkoKn4pxsTGtE/Zd3fq1popJ0p ahdK+eJsLrPCV87AM7WjzaiqhslHFLo5Tp/PWwnj4wfPZJ4TTl/fxePSBgcMZnbmK9 x4oewtcCmODfvflQ6mNci+sf9LITyZvKKsuqcNGxFHMBH/1OUw1uZvyTR1MYY1A+z0 64BMddQUID1gYioKj0EO4D43+joa2m8pnmZP1Ln9wPMNRn6wPKZEE2bzhBW4X+cb5S cX4YkXOKFXi8A== Date: Thu, 28 Apr 2022 19:29:27 +0100 From: Jonathan Cameron To: Andreas Klinger 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: <20220428192927.660e728c@jic23-huawei> In-Reply-To: References: <20220413183123.20292-1-andriy.shevchenko@linux.intel.com> <20220416120726.0ba78960@jic23-huawei> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; 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=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Tue, 19 Apr 2022 12:24:26 +0200 Andreas Klinger wrote: > 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 Applied to the togreg branch of iio.git and pushed out as testing to see if 0-day can find anything we missed. Thanks, Jonathan > > > > > 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; > > >