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 9C260C74A5B for ; Wed, 15 Mar 2023 09:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbjCOJKv (ORCPT ); Wed, 15 Mar 2023 05:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232144AbjCOJKD (ORCPT ); Wed, 15 Mar 2023 05:10:03 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2421720552; Wed, 15 Mar 2023 02:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678871400; x=1710407400; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/9hlg9yvvgpQ82GIW45TeHtdlD4HR1qF/6Lf3lWQJgw=; b=UenlTkr4nijzWFtp2dEEFevoy+XXLGM1IHQxaq1KodPfW1v6dYPBtrWc iloj+Wd/9+SZFn7zhr67tDaYqoes2cOrITqpGxwQ9++h+H25m3XLhV4tp CVJjIcM2edmAx5V8uFK5U3Sel7KpzuF6aCJMRJUHrtckRSI16S7ONVsYU uQiTkDUsONynEP874ihTs9K20u0Vv6Z7XePFBm6m1ZtUg1bkrn1qaR1R6 ZQFbfW8z4MWcX+89lKD1e6+l7YpJrVbvtPFFm6CQMG2ecKf7ENHhUwQld /8KrmHIwv9xQ64ye8LjIhr3lsv9Nzw9cK8pFYHTSpe8l4m6NSAuNPTbd+ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="335137374" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="335137374" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 02:09:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="822702202" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="822702202" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 15 Mar 2023 02:09:54 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 15 Mar 2023 11:09:53 +0200 Date: Wed, 15 Mar 2023 11:09:53 +0200 From: Heikki Krogerus To: Andy Shevchenko Cc: "Ye, Xiang" , Lee Jones , Greg Kroah-Hartman , Arnd Bergmann , Matthias Kaehlcke , Wolfram Sang , Tyrone Ting , Mark Brown , Linus Walleij , Bartosz Golaszewski , linux-usb@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-gpio@vger.kernel.org, srinivas.pandruvada@intel.com, sakari.ailus@linux.intel.com, zhifeng.wang@intel.com, wentong.wu@intel.com, lixu.zhang@intel.com Subject: Re: [PATCH v5 1/5] usb: Add support for Intel LJCA device Message-ID: References: <20230312190435.3568212-1-xiang.ye@intel.com> <20230312190435.3568212-2-xiang.ye@intel.com> <20230313170341.GV9667@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 14, 2023 at 05:52:52PM +0200, Andy Shevchenko wrote: > On Tue, Mar 14, 2023 at 11:38:14PM +0800, Ye, Xiang wrote: > > On Tue, Mar 14, 2023 at 10:36:57AM +0200, Heikki Krogerus wrote: > > > On Tue, Mar 14, 2023 at 04:03:26PM +0800, Ye, Xiang wrote: > > ... > > > > You don't really seem to get any benefit from MFD. Perhaps it would be > > > more appropriate and clear if you just registered auxiliary devices in > > > this driver. Check drivers/base/auxiliary.c. > > Yes, it should be a work. I have a question. > > MFD provides the ACPI binding for sub-devices through > > struct mfd_cell_acpi_match. But I didn't see this in drivers/base/auxiliary.c. > > If using auxiliary bus to implement the LJCA sub-devices, we need to do > > the sub-devices acpi binding manually in ljca.c. > > > > Something Like: > > adr = LJCA_ACPI_MATCH_GPIO > > adev = acpi_find_child_device(parent, adr, false); > > ACPI_COMPANION_SET(&pdev->dev, adev ?: parent); > > > > Is that acceptable? Looks ok to me. > Maybe you can implement this on the level of auxiliary bus. I would actually prefer that the auxiliary bus itself does not make any assumptions regarding the whereabouts of the fwnodes at this stage. Maybe later, when(if) there are more users. thanks, -- heikki