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 9F216C43334 for ; Tue, 5 Jul 2022 15:17:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbiGEPRC (ORCPT ); Tue, 5 Jul 2022 11:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbiGEPRB (ORCPT ); Tue, 5 Jul 2022 11:17:01 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49DFE17A93; Tue, 5 Jul 2022 08:17:00 -0700 (PDT) Received: from fraeml707-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LcmRZ3VJ8z67xFD; Tue, 5 Jul 2022 23:14:18 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml707-chm.china.huawei.com (10.206.15.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 5 Jul 2022 17:16:57 +0200 Received: from [10.126.171.232] (10.126.171.232) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.24; Tue, 5 Jul 2022 16:16:57 +0100 Message-ID: <752f92ba-4957-545c-51f7-7e71648d92e4@huawei.com> Date: Tue, 5 Jul 2022 16:16:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3] hisi_lpc: Use acpi_dev_for_each_child() To: "Rafael J. Wysocki" CC: Andy Shevchenko , "Rafael J. Wysocki" , Linux ACPI , LKML , Andy Shevchenko , Greg Kroah-Hartman , Yang Yingliang 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> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.171.232] X-ClientProxiedBy: lhreml703-chm.china.huawei.com (10.201.108.52) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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)? Thanks, John