Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752370AbcDZRaP (ORCPT ); Tue, 26 Apr 2016 13:30:15 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:45422 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbcDZRaM (ORCPT ); Tue, 26 Apr 2016 13:30:12 -0400 Date: Tue, 26 Apr 2016 18:29:36 +0100 From: Mark Brown To: Andreas Dannenberg Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-kernel@vger.kernel.org Message-ID: <20160426172936.GE3217@sirena.org.uk> References: <1461615456-19510-1-git-send-email-dannenberg@ti.com> <1461615456-19510-3-git-send-email-dannenberg@ti.com> <20160426154313.GA3217@sirena.org.uk> <20160426162240.GB2885@borg.dal.design.ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tt8NzeIytnj46EAf" Content-Disposition: inline In-Reply-To: <20160426162240.GB2885@borg.dal.design.ti.com> X-Cookie: Tomorrow, you can be anywhere. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v3 2/2] ASoC: codecs: add support for TAS5720 digital amplifier 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 Content-Length: 3165 Lines: 71 --tt8NzeIytnj46EAf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 26, 2016 at 11:22:40AM -0500, Andreas Dannenberg wrote: > On Tue, Apr 26, 2016 at 04:43:13PM +0100, Mark Brown wrote: > > If the driver doesn't do anything just remove the code. > Well it's doing something which is making sure the nobody passes in a > sample size that's not supported. Wouldn't we want to catch this? Is the device actually going to mess up if someone sends it something else or is it just going to ignore the extra bits (given that it's doing autodetection anyway). > > > + if ((curr_fault & TAS5720_OCE) && !(tas5720->last_fault & TAS5720_OCE)) > > > + dev_warn(dev, "The Class-D output stage has experienced an over current event\n"); > > "Class D over current". The verbosity is making the line over long and > > the phrasing is a bit unclear (and makes it seem less critical than it > > really is). These should probably be dev_crit() or somthing too, over > > current and similar events on a speaker output are generally extremely > > serious. > The overlong line goes through checkpatch --strict and looks like an > accepted practice to prevent breaking "grep" for example. The text is > more or less from the datasheet to give people something they can > cross-associate. But I can try to short this a bit. It's not just the fact that it's wrapping round to the next line, it's also the fact that it's very weakly phrased for something which might reasonably indicate an actual fire risk. I'm pretty sure people will not struggle excessively to find the reference to over current in the datasheet. > conditions. For the "over temp" error condition (which is actually > really hard to create on the bench, I've to get the EVM up to like 150C > and things start smelling a bit) this should probably be dev_crit() as If the silicon is flagging an over temperature condition that tends to indicate a catastrophic physical failure in the system, it is likely that the speaker itself has failed or there's otherwise a short in the speaker output path and potentially other physical damage especially in smaller systems where you might find that for example there's thermal damage to the case (and possibly even the user). > well. And then, maybe leave the "DC error" as a warning, since it's less > critical than the other two conditions. Thoughts? If you're pushing DC through a speaker that will generally mean that you will shortly see one or both of the over current and over temperature errors, it's really not something they're designed for. --tt8NzeIytnj46EAf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXH6V/AAoJECTWi3JdVIfQ8rMH/AkBGsNYhMKhsIiAXerYlMnz 8iY6SDU4oLi1//2mRrmCq1W9cQWgStzYszm5PxHZteTV1ZTNIK/UKJ+ZjO9d+V9i iUNW0rQ8yD3wQ5Ih6P/sMRNXqfY4Kg+bz+6NMvCl6tfZF+pyko2g6kvKblSbKpp9 njUFS2iZahyUM1qcPL/M5O7eK3DsVRiCtkLElWRZMqWj1vP2gK2MllEQVWKIdtcr SKBUUwFmmZXIe+NH3WNvBdfyEc6X9yTFGl0hRb8tJg45oT5ptyoXlX1MqY/R2BFV +5wgQy2oKmTpXRVPMGuIWaA5kfSFicsdTE1vpXssR/AXIbzKMcD7P2GS27gCajc= =xo8q -----END PGP SIGNATURE----- --tt8NzeIytnj46EAf--