Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp774931rdb; Tue, 19 Sep 2023 09:43:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLMXdLmTqM+9gEGtSgdAYoEjrD42sDznNVFxGUo0iEOYl2LGSbFM4GmtjbxKbGDOmaKXUI X-Received: by 2002:a17:902:7b82:b0:1c4:62a:e4a with SMTP id w2-20020a1709027b8200b001c4062a0e4amr9188250pll.64.1695141815311; Tue, 19 Sep 2023 09:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695141815; cv=none; d=google.com; s=arc-20160816; b=pD23ESdBfkduJTbkC944eS3tm4I60IgBmWkwz+i/TDEzeaWK+JrG9VGjWmbpunXaGx 8Q1fbNmEEsMuUMR816C+FmngnBrjiZZQKeBlLSZavrer1K6msghWuNm9VDcJLIX0TFhl GtRH7sWrFXjun+F0UgwWOgA6WaFqSCn2olHLeNzVLAoTmjQXMvNwhewq8ARyOeG4bvsV esJER7dEmYOvMMMJG33aG3Bf+KiYghFowZT3uxmPzLU4E0L82Yix6Q65w9WHLkff+HiL DFQnckri7vVQvHiLozZ36mmxKwNctnAs4T40EcgsWW31p+BkaJBc0ihM4MD6j0vGbSnL EhNw== 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=+LLmlGR3jkWUM5EdfcUjcLTbE4KHMxHXAqMQDfeXMlg=; fh=lrjOAYnl5VmV0YYuweugmzw+3gjURajrwVuPHDOZjSU=; b=icKbnArsPIXtL0r1ANLzB5OKeGQ3bn/XEpI5oOeW0FWxgXLYm2ykvOvW16IzAKbhuQ lUOk0pMKRXCFn8PDdxgx6FwL2Ma7Ir7e3GjDW+WsJSyOxByqkKSalHeXO2Qz3/c6okQ/ ud67kcookA1imQj+FLJnRsjUqfvuQNOg+YQxATf9aB3PnaDwxN2dqBNqt5ua1qyTvupX md3EE5KPZb5JFYDWM0WrMR4lsrJt3L5w5a0di5viiv7CwGwUco48xwXydMdoPkuxB9nj anBEPZH4RJTgSHLL5ArmvqySeVtKcXjlJi1wQU1RUF5neCDKSf4IkmIqZS6n/iVnRwSJ p16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hELsZW+Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ld3-20020a170902fac300b001bbab2e5a27si9791842plb.290.2023.09.19.09.43.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 09:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hELsZW+Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8CFDA819DFC1; Tue, 19 Sep 2023 06:08:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231968AbjISNIP (ORCPT + 99 others); Tue, 19 Sep 2023 09:08:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231947AbjISNIN (ORCPT ); Tue, 19 Sep 2023 09:08:13 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B75C4F0; Tue, 19 Sep 2023 06:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695128887; x=1726664887; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=eHGLPuJLnfYPHZJ2U5imVvNKpQ7YRooOfvMe9p3pXJc=; b=hELsZW+QV+e2yDOnc8rCyX/3K9AEIRdxPpBQmpgvtnzNpbpBhSrgCeH+ ETN3vAKdAbFWJwPfk5b7mitK1z4fSdmK9pBecwfuOk81BAirA+P8xCUmJ iOvCmIkVX7j/NCpiKFW+Yf1fTHxO4KupalVI345J/Jzn40ZVDSb+4TMqd UbPiXd8yN1jN2P7FnnoeVa4dLIbuaiXBsBBlzCxhN7rMLv66MtmDxZd/R COV+xBVMlgl10avTPOP5dWIag5ngJorWQZIBn9sAn4KVMtGEQDBYZdj17 t0DF/1qq0h3iEr1616Bqt4dqupGAZscwETY8xnmWUfVvUsveShKLSNSmd g==; X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="370249839" X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="370249839" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 06:08:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="861538519" X-IronPort-AV: E=Sophos;i="6.02,159,1688454000"; d="scan'208";a="861538519" Received: from lwatts-mobl1.amr.corp.intel.com (HELO [10.212.5.115]) ([10.212.5.115]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 06:08:04 -0700 Message-ID: Date: Tue, 19 Sep 2023 08:42:29 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.15.1 Subject: Re: [PATCH v2 2/2] ASoC: codecs: Add Richtek rtq9128audio amplifier support To: cy_huang@richtek.com, Mark Brown , Krzysztof Kozlowski , Conor Dooley Cc: Liam Girdwood , Rob Herring , Jaroslav Kysela , Takashi Iwai , Allen Lin , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1695086301-10376-1-git-send-email-cy_huang@richtek.com> <1695086301-10376-3-git-send-email-cy_huang@richtek.com> Content-Language: en-US From: Pierre-Louis Bossart In-Reply-To: <1695086301-10376-3-git-send-email-cy_huang@richtek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 19 Sep 2023 06:08:13 -0700 (PDT) > +static int rtq9128_i2c_write(void *context, const void *data, size_t count) > +{ > + struct device *dev = context; > + struct i2c_client *i2c = to_i2c_client(dev); > + u8 reg = *(u8 *)data; > + int rg_size; > + > + BUG_ON(count != 5); is this really necessary? Just log and error and return? same comments for other functions > + rg_size = rtq9128_get_reg_size(reg); > + return i2c_smbus_write_i2c_block_data(i2c, reg, rg_size, data + count - rg_size); > +}