Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2409645ybn; Thu, 26 Sep 2019 11:25:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyThMhSEtjJT0ydAi9rf28xGr0m56jbS0p3NUmo7bYCy0FwspnJ5kWx8bR7EpTTBn+qRh77 X-Received: by 2002:a50:eb8b:: with SMTP id y11mr175467edr.200.1569522335777; Thu, 26 Sep 2019 11:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569522335; cv=none; d=google.com; s=arc-20160816; b=AxAlvUqh4HSF9OgZyXgDYpZK5sGYX3mQuHY/gW5rnxML9COatY/RsJp1t+jr8pPAf0 xC4xhIhApsnCEnqDeLQfOmP9B5gJ9TjAMuY9vCdtAHfSQbIchcly6IyA59JdV82n5xJh +uPiesyF0tpLR2YPH6NwjPzh1rwECvfxGL2yJfcNBrW7YdiWdoFShsR7ZoOfKfxWB3cP zd/ysDEc7LAsahU3e9i9wIwejJStP17QUN0oh+NxB5vD0lfSvTYjEJKXKT0M/CGKz/89 W4GdM3SKl1fuKEuzK0w29bEU4heg45KbQOHquALLhgyoqmp1zZ0Gd5b23cl6+qdJE3xq t6gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=L0EJVcfMhAB6/N4tPdvEVipe4vp4nRtTRv+xppqN8UE=; b=z1WaTP7Wp10n9qqfDiz/5xPk4bRjH6WnBNXulVUMNnsINQDKIanpJOK9xfs8wrszxg PKeBnipTNrqLNjRcV3oopT+9iaezF/PrkEb8B38Rf3l2R07r2Y1rRhtW9jwR0EGVqlgu Hvrc77+xu0ssmV6+4ZECQf+uoGJFYWiayW8T2h6XvkNTnq5pXC9zzG18snC1dxizPlcr aNGy14nFnG0/cH7K+KsL6H+CF/CIGbl+m/D4LV0uHk+A/7NDq02BmNS2puM8sq0PCPMP vjtf4XHaZD+7/1vtw0bSkQVQoC8Ss+rHMTDIeMxF0ClSvjLZQTvaQGcIAz9K+D/U7fEY frGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=w9q+m6kd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c54si52533edb.230.2019.09.26.11.25.11; Thu, 26 Sep 2019 11:25:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=w9q+m6kd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728240AbfIZSXO (ORCPT + 99 others); Thu, 26 Sep 2019 14:23:14 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:48904 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbfIZSXO (ORCPT ); Thu, 26 Sep 2019 14:23:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=L0EJVcfMhAB6/N4tPdvEVipe4vp4nRtTRv+xppqN8UE=; b=w9q+m6kd3SPFn6y7MTkeNY4Jn iWW/eDfgpO9FfCcmP2UsBb8wauAJzsPNeSDpxUEKoufIMcEq030SrcSQFrYrcK5ECS7Q04Xys9ID+ uMTDlFAYizv1XHvFtIotrtW50IjuCS5hxhdMgoza8239aNer1Znhf6Qvu+dSj+POSucwQ=; Received: from [12.157.10.118] (helo=fitzroy.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iDYPu-0004Rh-Fu; Thu, 26 Sep 2019 18:23:02 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id E4A53D02DD8; Thu, 26 Sep 2019 19:23:00 +0100 (BST) Date: Thu, 26 Sep 2019 11:23:00 -0700 From: Mark Brown To: Ravulapati Vishnu vardhan rao Cc: Alexander.Deucher@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Vijendar Mukunda , Maruthi Srinivas Bayyavarapu , Sanju R Mehta , Dan Carpenter , Colin Ian King , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [PATCH 1/5] ASoC: amd: Registering device endpoints using MFD framework Message-ID: <20190926182300.GD2036@sirena.org.uk> References: <1569539290-756-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="OF9salbnfkEgqvaK" Content-Disposition: inline In-Reply-To: <1569539290-756-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> X-Cookie: Be careful! UGLY strikes 9 out of 10! User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OF9salbnfkEgqvaK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 27, 2019 at 04:37:35AM +0530, Ravulapati Vishnu vardhan rao wrote: > -#define ACP3x_PHY_BASE_ADDRESS 0x1240000 > -#define ACP3x_I2S_MODE 0 > -#define ACP3x_REG_START 0x1240000 > -#define ACP3x_REG_END 0x1250200 > -#define I2S_MODE 0x04 > -#define BT_TX_THRESHOLD 26 > -#define BT_RX_THRESHOLD 25 > -#define ACP3x_POWER_ON 0x00 > -#define ACP3x_POWER_ON_IN_PROGRESS 0x01 > -#define ACP3x_POWER_OFF 0x02 > -#define ACP3x_POWER_OFF_IN_PROGRESS 0x03 > +#define ACP3x_DEVS 3 > +#define ACP3x_PHY_BASE_ADDRESS 0x1240000 > +#define ACP3x_I2S_MODE 0 > +#define ACP3x_REG_START 0x1240000 > +#define ACP3x_REG_END 0x1250200 A large part of this appears to be unrelated indentation changes, these should be split out into a separate patch. > +static struct device *get_mfd_cell_dev(const char *device_name, int r) > +{ > + char auto_dev_name[25]; > + struct device *dev; > + > + snprintf(auto_dev_name, sizeof(auto_dev_name), > + "%s.%d.auto", device_name, r); > + dev = bus_find_device_by_name(&platform_bus_type, > + NULL, auto_dev_name); > + dev_info(dev, "device %s added\n", auto_dev_name); Remove this log message, it's going to be very noisy. > + r = mfd_add_hotplug_devices(adata->parent, adata->cell, 3); > + for (i = 0; i < 3 ; i++) > + dev = get_mfd_cell_dev(adata->cell[i].name, i); What is this doing? We never look at the result of this get_mfd_cell_dev() and having a function like this suggests that there's some abstraction issue here. > + kfree(adata->cell); > iounmap(adata->acp3x_base); > + /*ignore device status and return driver probe error*/ > + return -ENODEV; > release_regions: This looks broken, as well as discarding error codes (making things harder to diagnose) it means we stop unwinding things and leave the rest of the resources lying around. --OF9salbnfkEgqvaK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl2NAgQACgkQJNaLcl1U h9Cxogf+MiHsjaZBRHQqc3W+QzN0VRj5XNbwBnOYX/QIWj9Qxm9xuUqQK/N7Iwsp HlvPLHQ1T/PDhEu+zA+EXWKRax2A56I+C/XyhnoqixUdtJolhiNB5Zw3y5MntaSY zzDm+bvcfGLhm6pjDjvsqCKoPBqDcFrh6UbB042bcGvRXURvPZZIroogzbckGplD fbRU1BcBrX5ra1yA3nQ+S0QHxbw3ZvwCntDbTMzmCPohGqCFznUxw3ixHoBEavv6 EjMSaar8T0mZbptkpbt0BAlIEug/M13HL7JqRPJ/7iRrU+QYEJqQtdR/RuxfNBsq VVzy6HUsacBj2tH67Z+TZ+VOKdKKew== =9AzB -----END PGP SIGNATURE----- --OF9salbnfkEgqvaK--