Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4070946rwb; Mon, 31 Jul 2023 00:13:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlE0AaoVmRSAsYPxxRq5q+sSu4yKfvUxD+UtZe3A0zECSZ2Z5H3gy53cASA1UII+bpzqP905 X-Received: by 2002:a17:906:9b:b0:993:fba5:cdef with SMTP id 27-20020a170906009b00b00993fba5cdefmr6418414ejc.8.1690787626539; Mon, 31 Jul 2023 00:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690787626; cv=none; d=google.com; s=arc-20160816; b=aoOuzmoYYDB6SzYC+FOyrPHf6cBrV7Gtn3e+XU6mOtL40IKbfvzgMO9VgCRki0HdiW fJmgcvtStg5Ew0LWOfuOAPI7pWqSky9P5CeaW2SQjRH6rl3r8wKe97akw8OUn3XpgSJt mrkItHXYfCFmDwNaY7eCPWLT9sdKyTlO8qBAZsSKv7CV7kf9M/+VjdYPL3Pg64KDdQyr JdWnTfAVzwnIKElzGp/IU2DNH0Q055iLulsSZX4I3GnUfqAX6ik2phZNvU5cqA4YAaET gRITMwCk2wfKRgjhSR6l5OKw17hoJAqxESahO1BKHgax0IPxAINmaHQw0ZoGq6CbMgGG HEoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=o8Rt9blDQLbjFIHhQ775musDPPuWgqdGNon+UjeozlQ=; fh=sPHpMvvQQOT1sVATIwloOAhiNP1tEThzr+lKej0Eb1g=; b=ijJeKqSWZlVc/NvjYyucKPKx1sEM17UIjaEP4OOh/VPY95ZavBSpPP8zlB3T9mRXmo 6xS7EmZ9j/YxcP/1aA8OoorlsqrvPY4JVxMYPqPUJ+p7GYYBvU6YRNz4gQg97yc0RMCv CYLifF/gsEPohAOCsiURIzq+9WSCXLhi6vz8+4fGVN6WNgllmtoWRwvRPGLOt580nLYC QGKtWJJ3VWsrIUamAmeaj9bizRgov7wk2t63c5WY38iwv9edmDNfH88RL8PZsP5OVU5V qszTaUlLZtH3CliUdSEYW4EEJ1/ITnrQbH+tyji3rcCanRYyHf8wcQd9RU0Cg60VWOAR SZgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fqhNILd+; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lu22-20020a170906fad600b009938cb10548si1653034ejb.549.2023.07.31.00.13.21; Mon, 31 Jul 2023 00:13:46 -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=@linaro.org header.s=google header.b=fqhNILd+; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbjGaGwB (ORCPT + 99 others); Mon, 31 Jul 2023 02:52:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230283AbjGaGvv (ORCPT ); Mon, 31 Jul 2023 02:51:51 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1A3110DF for ; Sun, 30 Jul 2023 23:51:33 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fba8f2197bso6258869e87.3 for ; Sun, 30 Jul 2023 23:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690786292; x=1691391092; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=o8Rt9blDQLbjFIHhQ775musDPPuWgqdGNon+UjeozlQ=; b=fqhNILd+G7sGwNQlon4vl9xMCV6KAcUtPxN24oYplZasC7CtsAlFLVBv5++5X5dzFp IOC/b4f1zMXq/3oLeGbPyq890Xckf7fHOKPQQDZD1NL74HfWyBtbpj8hENbbjbRaL6KU 8tuTCwgsPJ3tCoFe2sLbdywFgjb8F2/bJqCSsqmpXqOa6q5MTJPnF6VVxpoFm9SpeM4M eFXzddmikCTVURpjEZmStARjJjMJX3hzQ1/JT9AJhYlRhxHlx2tyuRcJ3noAnFpAUJYA xCmFBusTVRUQMXnCgxysie4DN38J0BoICESMKHHmhMMte3lFQRKqLfvdOkvSiqzfvNEs AsYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690786292; x=1691391092; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o8Rt9blDQLbjFIHhQ775musDPPuWgqdGNon+UjeozlQ=; b=bmbo+syvkEluvuf6SRlOa91mv2YweHwEtk1sYr+lH63DTrsE9DFxPSsqWpBZLbZatZ DeW1XgjSKTVXHH0rUDG53awNbmF02zmk4/xFd93fIvacEAFAcAZhBABTBnCiMFWXsHoW cJ2Y1O/yWD21x+nP2IOo4N8+g1EdgUh4AFBcSmBOW2IowSjuT+seWL3sSiE5fdmY6YZx JdphzJuyfSz7i5dwRS5RVfM+mNQq6P07/8l6GrdD+o/2ntpL9ndSCn3khk9N3KCizyyz 7+AUUSJ9mkomjMprOKaToqPATVw6DaMHg4tvKLx/UsupcNw4nKkF+24oWS49GyZPUYvP HsCA== X-Gm-Message-State: ABy/qLZlTVUtFgiD+kg0ExnNTlRcHhOxgj040qUMuFyCvar/YAQcbKfJ YH5k6we3Ai1k45gtAqw7b89dFA== X-Received: by 2002:a05:6512:3b0b:b0:4f8:4512:c846 with SMTP id f11-20020a0565123b0b00b004f84512c846mr6074831lfv.49.1690786291811; Sun, 30 Jul 2023 23:51:31 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.183]) by smtp.gmail.com with ESMTPSA id j25-20020a170906255900b0099b4d86fbccsm5803011ejb.141.2023.07.30.23.51.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Jul 2023 23:51:31 -0700 (PDT) Message-ID: Date: Mon, 31 Jul 2023 08:51:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: [PATCH V3 4/5] ASoC: codecs: aw88261 device related operation functions To: wangweidong.a@awinic.com Cc: 13916275206@139.com, alsa-devel@alsa-project.org, broonie@kernel.org, ckeepax@opensource.cirrus.com, colin.i.king@gmail.com, conor+dt@kernel.org, devicetree@vger.kernel.org, doug@schmorgal.com, fido_max@inbox.ru, herve.codina@bootlin.com, krzysztof.kozlowski+dt@linaro.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, liweilei@awinic.com, perex@perex.cz, povik+lin@cutebit.org, rf@opensource.cirrus.com, robh+dt@kernel.org, ryans.lee@analog.com, shumingf@realtek.com, tiwai@suse.com, trix@redhat.com, yijiangtao@awinic.com, zhangjianming@awinic.com References: <7cdd4825-c0da-f60e-bbef-970bea48dc95@linaro.org> <20230731064154.4137-1-wangweidong.a@awinic.com> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: <20230731064154.4137-1-wangweidong.a@awinic.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 31/07/2023 08:41, wangweidong.a@awinic.com wrote: > >>> + >>> + return 0; >>> +} >>> + >>> +int aw88261_dev_init(struct aw88261_device *aw_dev, struct aw_container *aw_cfg) > >> You already used this function in patch #3, so your order of patches is >> confusing. > > Do I need to change the order of patch? > Do I neeed to put aw88261_device.c aw88261_device.h in patch #3 and > put aw88261.c aw88261.h in patch #4? > Is that how you change the order? Your patchset should be logically ordered, so first you add bindings (because it must be before their users), then you one piece, then other etc. I understand that only the last patch will make everything buildable, but still code should be added before its user/caller. ... > >>> + >>> + switch (chip_id) { >>> + case AW88261_CHIP_ID: >>> + ret = aw_dev_init((*aw_dev)); >>> + break; >>> + default: >>> + ret = -EINVAL; >>> + dev_err((*aw_dev)->dev, "unsupported device"); >>> + break; >>> + } >>> + >>> + return ret; >>> +} >>> + >>> +MODULE_DESCRIPTION("AW88261 device"); >>> +MODULE_LICENSE("GPL v2"); > >> Wait, is this a module? Does not look complete. I already saw one >> module, so what is this for? For which module? > > Can it be changed to MODULE_DESCRIPTION("AW88261 device lib")? If this is a module, then it can. If this is not a module, then why would you ever like to do it? > The function in the aw88261_device.c file, which I used in the aw88261.c file. Functions are not modules. Best regards, Krzysztof