From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395AbcGDOol (ORCPT ); Mon, 4 Jul 2016 10:44:41 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:41376 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbcGDOok (ORCPT ); Mon, 4 Jul 2016 10:44:40 -0400 Date: Mon, 4 Jul 2016 16:44:06 +0200 From: Mark Brown To: Garlic Tseng Cc: tiwai@suse.de, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, koro.chen@mediatek.com, PC.Liao@mediatek.com, ir.lian@mediatek.com Message-ID: <20160704144406.GH6247@sirena.org.uk> References: <1467629788-14411-1-git-send-email-garlic.tseng@mediatek.com> <1467629788-14411-4-git-send-email-garlic.tseng@mediatek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ltihE5wS63FR6l1A" Content-Disposition: inline In-Reply-To: <1467629788-14411-4-git-send-email-garlic.tseng@mediatek.com> X-Cookie: You are always busy. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 137.158.22.87 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ltihE5wS63FR6l1A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 04, 2016 at 06:56:27PM +0800, Garlic Tseng wrote: > +static int mt2701_btmrg_startup(struct snd_pcm_substream *substream, > + struct snd_soc_dai *dai) > +{ > + struct snd_soc_pcm_runtime *rtd = substream->private_data; > + struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); > + struct mt2701_afe_private *afe_priv = afe->platform_priv; > + > + regmap_update_bits(afe->regmap, AUDIO_TOP_CON4, > + AUDIO_TOP_CON4_PDN_MRGIF, 0); We really shouldn't be writing the registers or other internal data of the device. Instead we should be getting the driver for the relevant hardware component to do it. If we just write to registers that makes the interoperation with the real driver for the device more fragile than it should be, people might update the main driver without noticing the external driver. --ltihE5wS63FR6l1A Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXenYyAAoJECTWi3JdVIfQfhQH/i32VCtEXJSzzqgf/YAROy99 Gur05jgRgUGNFVWGF/gO2QraA2lgOvfB3NeBP6j5hoUyVmKGVH0MHrTpxkODEoss xrj3b8x5QqfN43PjQxk/GHfZLb+RYI5QtabSPQyquBNfVhTrm8SGkLfoEIEUGZHM W9wZK8Mkol0qfainp5TtJuzQIwnlDiDZuDcJSVsUvpr4CcM1FotOatjmf+FPUGYJ GjvBkXu8R7oMhzVN8v15gQysSooPn2o+5wSkfJHAZO6DdBR7boqcm1hPFqHcVA07 rG5/OTN0lfRJRErAAfnUbI2vYYbaDZ1/Oldn5iOLeD9hcEPIVpxtgnh5ET4zMxY= =yi46 -----END PGP SIGNATURE----- --ltihE5wS63FR6l1A--