Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1423758imw; Tue, 5 Jul 2022 09:11:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1syv9P4YAgmykwiulLq1Y2c6Ku76ICv6ViGRZ4NR1ncQ2AwiHs32tGKIrCRM0+j/s6AvRKj X-Received: by 2002:a05:6402:5216:b0:43a:7b47:834f with SMTP id s22-20020a056402521600b0043a7b47834fmr4148849edd.343.1657037501228; Tue, 05 Jul 2022 09:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657037501; cv=none; d=google.com; s=arc-20160816; b=hXRpTpehuDYI2MZE2s2qEHtZFNkGMr2SrHIEkX5mZhfYG9WWKmNnZ0/K/giLmboYJd pDqWySElAM1ETH+vSpFxkXESMYZnokmr3ZWzRQrRr0JJT2xgDlM/ZOs6z+t2xPeZqi2o 6rdxR4BYnEvbIZfyixA4zEdtZMJESeF6ohc4/h+f62Jb+j7wAExJmvJm9SPmC1uL+FCp CLQL4y9l9zCGkjk9/V3PCDp6BaTHItQzjaQXUfaJr+gQagIt77+qhO58ls0E8VHmkuES YWl+jSGZwPH2a9PSSM0s6q7Qhp0REmtRAFHnVilhOheF1DYzDPXaXYhkGYplOvbkc91A dYrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=05H09XnT3WZbiSMH9r/MVR5bDYs6xgTwQVYFnBFoc7g=; b=SFRkaki/tyCjstJMObu6vKqUr4OtFqw9Qnul7OrpdOD2KWLKZkWi00iy9hHsFKtAHL I5Hw/vguQauZ8SSviRUoqJP7BAJrH/tcfsJli1pPCg3LkWncgQndJhD77jjmgVNBSVFh JlCYi/aPZ/CbhtY0c4vwOyrVkjLMdt6nu1iguaP/TrwxPOsUH7i563ao3bvfxoHf7VPz jzEOWm26b0pRK1zWjX6/paOckW2DOjvBCuIFgisky0P3fKd1tVQPF6a0KHqhj8YLJOqE VpzLwr1xqyYouoO7Gxxw3vbAJQESP34e+kw/cVLMoa2azcXLmlj2rEQYexu3+nStv9xq AoxA== 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; 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 b5-20020a056402138500b0043a3f82e5ecsi7987352edv.496.2022.07.05.09.11.14; Tue, 05 Jul 2022 09:11:41 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231917AbiGEPfA (ORCPT + 99 others); Tue, 5 Jul 2022 11:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231867AbiGEPe6 (ORCPT ); Tue, 5 Jul 2022 11:34:58 -0400 Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD821165B4; Tue, 5 Jul 2022 08:34:57 -0700 (PDT) Received: by mail-yb1-f171.google.com with SMTP id e80so15232083ybb.4; Tue, 05 Jul 2022 08:34:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=05H09XnT3WZbiSMH9r/MVR5bDYs6xgTwQVYFnBFoc7g=; b=s1/+YjlzLriaP4I5SETHiRZBMX7ZE8Qh8LGluD4fi/cNapHYeggPPbzu6npp/34oBI OlkachEKTOc2q3jyPLq282W+zS4IiTlCRVnqrO+tV7nbLEosBwrH0ffAWp9RCH11g6mg N1J3OpyRhCkmF10UmYEM09GsM6KQsiBFJiZcdvaj2/OiBgr0yO139tKUzuBiKbecAelG O2BwDnxzuoZF23DBDzm9t/Bs3B/9AaziSz9c8tJoo8SUpTsW4t3huRCmOp85VX00w+fT j1d2sm7gTp2DxHbIzQrG2Q0/YZHk8l+ZoPNW55AnuAj/q4Zk94iyLhTnmiz9sgxyq1Vs k01g== X-Gm-Message-State: AJIora+Wk/zzw29NyXD+lKYanM1d6Afqv+MsKBlKebTvSL4JsxD8Ub11 NzRc/IJbueGtR+KNgr5hln/WOjJq85cf1lnfvdncwZ1A X-Received: by 2002:a25:6b50:0:b0:64f:4b33:664 with SMTP id o16-20020a256b50000000b0064f4b330664mr40085416ybm.153.1657035297103; Tue, 05 Jul 2022 08:34:57 -0700 (PDT) MIME-Version: 1.0 References: <12026357.O9o76ZdvQC@kreacher> <2657553.mvXUDI8C0e@kreacher> <5606189.DvuYhMxLoT@kreacher> <61fbd71b-9c36-345c-7aed-561b81c34259@huawei.com> <71dfc3cd-c2ae-8096-9280-67e77c21055e@huawei.com> <050e5a2f-42b9-f851-ec6e-e2a9d3fdbe1c@huawei.com> <752f92ba-4957-545c-51f7-7e71648d92e4@huawei.com> In-Reply-To: <752f92ba-4957-545c-51f7-7e71648d92e4@huawei.com> From: "Rafael J. Wysocki" Date: Tue, 5 Jul 2022 17:34:46 +0200 Message-ID: Subject: Re: [PATCH v3] hisi_lpc: Use acpi_dev_for_each_child() To: John Garry Cc: "Rafael J. Wysocki" , Andy Shevchenko , "Rafael J. Wysocki" , Linux ACPI , LKML , Andy Shevchenko , Greg Kroah-Hartman , Yang Yingliang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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, Jul 5, 2022 at 5:17 PM John Garry wrote: > > > Next, I'd look at introducing something like > > > > acpi_create_platform_device_ops(struct acpi_device *adev, const struct > > property_entry *properties, const struct *platform_device_create_ops > > *ops); > > > > where ops would be a set of callbacks to invoke as a matter of customization. > > > > Then, acpi_create_platform_device() can be defined as a wrapper around > > the above. > > . > > ok, that seems easiest. But alternatively do you see any scope to have > that platform_device_create_ops * ops in the acpi_device struct (so that > we don't need to create this new API)? Well, ops and struct acpi_device have different life cycles (the former is only needed at the init time whereas the latter lives as long as the platform device based on it), so I'd rather keep them separate.