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 452DAC43334 for ; Tue, 14 Jun 2022 10:44:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237989AbiFNKof (ORCPT ); Tue, 14 Jun 2022 06:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231833AbiFNKod (ORCPT ); Tue, 14 Jun 2022 06:44:33 -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 3620E48301; Tue, 14 Jun 2022 03:44:33 -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 96D2B611A8; Tue, 14 Jun 2022 10:44:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C41C2C3411B; Tue, 14 Jun 2022 10:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655203472; bh=pQRvKHdBppsmBdcym8HpEMBrKDl2rLZF2PgFG3FbIng=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SzX6O8XtQIBVsIIU6OHFE0BOROLYfBR+IU3fqOKXocy1SZIr2+rtSAXEaiDEVtlLn xArm1qKd5CQ4tpCpiKRhvqMAE8GZCgDBMrw8wIhMyT8gEaSSiIGVd0oojdNHjgpeOu XKRf4yA84dEgP80/qxJBA07hlv+ov74/1i/4psBWPj/kfwxzFHzXoGAXjDaU1Dqi99 fwS1VFe28wBMLPSSEnTmqb9b1ZI1r3JZBKwXcPkT3fGJ80mDYnbi5mwivFmN1cjUNW UfqQGI/t+sceNKIH8LWWBL5yXeQDo+nYyulfaSF1t4N7nz/eitEYOsZ59mxfX6E/10 xpwlIRpmPQyXg== Date: Tue, 14 Jun 2022 11:53:43 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Gwendal Grignou , Andy Shevchenko , Jonathan Cameron , linux-iio , Linux Kernel Mailing List , Lars-Peter Clausen Subject: Re: [PATCH v1 1/1] iio: proximity: sx_common: Allow IIO core to take care of firmware node Message-ID: <20220614115343.057f1e8f@jic23-huawei> In-Reply-To: References: <20220530174326.1381-1-andriy.shevchenko@linux.intel.com> <20220603180618.4b643391@jic23-huawei> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jun 2022 11:27:21 +0200 Andy Shevchenko wrote: > On Mon, Jun 13, 2022 at 11:31 PM Gwendal Grignou wrote: > > > > The reason we have the code ACPI_COMPANION_SET and dev.of_node set (by > > commit 74a53a959028e ("iio:proximity:sx_common: Fix device property > > parsing on DT systems") from Stephen is we are getting device propery > > in ->get_default_reg(), which is called in sx_common_init_device(), > > before devm_iio_device_register(). > > > > We have the same code path in other driver, like adc/stm32-adc.c, > > where indio_dev->dev.of_node is set manually to be able to set the > > resolution based on device tree properties. > > Ah, thanks for this insight! I will rework the patch accordingly (yes, > there is something to clean up even in this case). > > > On Fri, Jun 3, 2022 at 9:57 AM Jonathan Cameron wrote: > > > On Mon, 30 May 2022 20:43:26 +0300 > > > Andy Shevchenko wrote: > > > > > > > IIO core correctly will take care of firmware node if it's not set in > > > > the driver. Drop ACPI and OF specifics from the driver and allow IIO > > > > core to handle this. > > > > > > > > Signed-off-by: Andy Shevchenko > > > Looks fine to me. As such I'll apply it now, but Gwendal, you've > > > been active with this driver recently so if you have time to sanity check > > > that would be great. Once I've caught up with new stuff I plan to check > > > where we are with your various series on this driver. > Dropped patch