Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1380142pxb; Sat, 16 Apr 2022 06:57:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFUHOQ2mcZHIjxwRMqy3o8c/SogOdYWD5DD+jrt7PSRU18c3kQkSJkUw7fWX4af46BJ13G X-Received: by 2002:a17:902:c443:b0:158:921b:6eb7 with SMTP id m3-20020a170902c44300b00158921b6eb7mr3473061plm.48.1650117441424; Sat, 16 Apr 2022 06:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650117441; cv=none; d=google.com; s=arc-20160816; b=ykf5M01IPz3gjASB0/SYpWrm9lpAsQCLQ0Qh8H9eY3fDaZzfAOtS7Y36Ie0R9AM68A KZoOOXd45QUpfmvEkwWvKm+EXqoETgKtcguRAxMh1Z2+wRdHoWWq4InVvLoQtmFwRf9P 0QWZDZvZIwd9wHi+9BnUYzm3eeyI++lhM0QpzMoJqQcJpJHsTld4WYte3wNR0PFOaw9F s8TnjyVoM6HaF7gNJrKz88riJZUss8s7dVTLWJkJQXUEiX/c6kSuzeiXzFovsEyCIKCD 6KScryIssdRip88cXE8+fuiEmlc92lIvUHgfrtD2GJiN3xy6TEoKP94ILF64pRu7pHpP GDag== 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=Fi3mv9PxObw/E1y2YwEYDk3Dw7ALluZ37dgIrn4Xd6s=; b=nc/Y0N5O9maiV3ZBiq9aQBtLqzd/G9gBwhrbUDzynZFsRzs2SmfK3qkQ6Hvd0h8Lqo BS6ylEFQqgXVTkfrwySqeB5AsAj94QJaKQfwWd9NBuQyLIqRAO6/WfvMt/TqOkDh1/Dw XXQ1tLNgaSyY+6G2NFnxgRap6zlRbq+G+hTZeYLTzXTxMdp5/nFi6v3rvsy7kEfZEYE/ mXtNPWs/3JoL4naalAq60R4ARFYsQRQhq4tkK5sZFnpBHxHGt8StyORlVIQa7jKSX3Ha wshjf80okB11Dq7OkeArayfDIJRm2Vl6cF1lAedlNT1E9euoZ3pu+N+6jamv4Krkg+31 YAIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GXQGfM+K; 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 b4-20020a656684000000b003995a4f48c4si3933318pgw.377.2022.04.16.06.57.04; Sat, 16 Apr 2022 06:57:21 -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=GXQGfM+K; 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 S231588AbiDPLCE (ORCPT + 99 others); Sat, 16 Apr 2022 07:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231572AbiDPLCC (ORCPT ); Sat, 16 Apr 2022 07:02:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A4655A146; Sat, 16 Apr 2022 03:59:31 -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 ams.source.kernel.org (Postfix) with ESMTPS id F067CB80687; Sat, 16 Apr 2022 10:59:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF6F3C385A1; Sat, 16 Apr 2022 10:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650106768; bh=sibJV/RKG56aZPeMc2C4JBMgg/l3MOrABmFndh0H3Po=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GXQGfM+K4pX4aqbmQXpchU0gvK4qvcXc+m/kkubMvS4D+QBjxSO8aIxofIJ9ic51y kTF45RY3p0CCo2Kz7YFPo/gmvORuKH4QaAissW3qQvc288rHQfOCjBIt+vagmB+wb0 02KmXXZgv3NuD5Fg+aZZyv9TeCaq0FoE4COHrur9FZoLHGTnsjBUIx7X/dLvW7adC7 A3ZuqwzxuO9p6bQBX30S37NXdWSA2gelq4WJDHZLxwwk3jnDPLmIkjeMvKAB5PfKzC 7TtXZilo33K8ZrKHSHhh5n4ciXD4m1gN9E9QJ4ZDLHLFgv30IqCqK/epFe2mM1SpK+ yUMt6Lh4yEosA== Date: Sat, 16 Apr 2022 12:07:26 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Klinger , Lars-Peter Clausen Subject: Re: [PATCH v1 1/1] iio: proximity: mb1232: Switch to use fwnode_irq_get() Message-ID: <20220416120726.0ba78960@jic23-huawei> In-Reply-To: <20220413183123.20292-1-andriy.shevchenko@linux.intel.com> References: <20220413183123.20292-1-andriy.shevchenko@linux.intel.com> 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.1 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,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 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. 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;