From patchwork Mon May 13 10:02:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viorel Suman X-Patchwork-Id: 10940637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CBD2B933 for ; Mon, 13 May 2019 10:03:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD64B237A5 for ; Mon, 13 May 2019 10:03:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B11A122B27; Mon, 13 May 2019 10:03:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D638E22B27 for ; Mon, 13 May 2019 10:03:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A3D6E16B4; Mon, 13 May 2019 12:02:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A3D6E16B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1557741817; bh=2cAFn5wuMibdvQYusIswo0N/zWbwn+eTfYm7FApHjfY=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=ToZrIwkAd/S8I76mbEYnwNuho0WZBpmGdHQyWa74narH2tdsTd/Xrs55H33tNZ/wo zF5Fp2l51CLPX6RcJrMmYhQkYxDLCW0dJ980QB10wG1vYqoc07HTyA05No4peFe8tK GW+Q/xT3qjJrghZz4wcgEvfPBFclHyjGE4gKc5Vg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 064EDF89684; Mon, 13 May 2019 12:02:47 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 28E70F8968A; Mon, 13 May 2019 12:02:46 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80044.outbound.protection.outlook.com [40.107.8.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 04AE0F8072A for ; Mon, 13 May 2019 12:02:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 04AE0F8072A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="GEI6Eav/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bJxaXtld11J7EpJY/ubE9XnPEwBhl+14j873jhZ7f0U=; b=GEI6Eav/rIKlRFhrZv4OTbQw7b8CL/TpFw1ZvONF14R/y+3Y0q7ObU5lZqUxpT1H7OgqMrVp1S3MOpGgh31T99VXslETvMLkpOofLlvNFq88DoLnQdz7pjSRfMWZVW6VvtPfoLDDNg17rg6Ruski2qhi1JbQiK1Ed9Dq27M91vM= Received: from VI1PR04MB4704.eurprd04.prod.outlook.com (20.177.48.157) by VI1PR04MB4800.eurprd04.prod.outlook.com (20.177.48.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.22; Mon, 13 May 2019 10:02:40 +0000 Received: from VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::18d6:6f21:db62:4fe7]) by VI1PR04MB4704.eurprd04.prod.outlook.com ([fe80::18d6:6f21:db62:4fe7%2]) with mapi id 15.20.1878.024; Mon, 13 May 2019 10:02:40 +0000 From: Viorel Suman To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Viorel Suman , "S.j. Wang" , Daniel Baluta , Julia Lawall , Colin Ian King , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Thread-Topic: [PATCH V2 0/2] ASoC: ak4458: fail on probe if codec is not present Thread-Index: AQHVCXMAooMElnxpc0yse1llpX1Jpw== Date: Mon, 13 May 2019 10:02:40 +0000 Message-ID: <1557741724-6859-1-git-send-email-viorel.suman@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0227.eurprd08.prod.outlook.com (2603:10a6:802:15::36) To VI1PR04MB4704.eurprd04.prod.outlook.com (2603:10a6:803:52::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=viorel.suman@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [89.37.124.34] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d9992afa-b2b0-490f-f4c8-08d6d78a2283 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB4800; x-ms-traffictypediagnostic: VI1PR04MB4800: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0036736630 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(136003)(346002)(366004)(39860400002)(189003)(199004)(486006)(44832011)(66066001)(8936002)(8676002)(36756003)(4326008)(73956011)(66946007)(2501003)(86362001)(14454004)(478600001)(26005)(2201001)(4744005)(102836004)(476003)(2616005)(186003)(66446008)(64756008)(66556008)(66476007)(5660300002)(386003)(6506007)(305945005)(54906003)(7736002)(6116002)(316002)(110136005)(2906002)(99286004)(52116002)(25786009)(6512007)(71200400001)(71190400001)(68736007)(81156014)(50226002)(81166006)(14444005)(256004)(53936002)(3846002)(6436002)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4800; H:VI1PR04MB4704.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: L2EY0GRJQwBLjEYX/0p+vGw7x8ITUBWy7TDi2q11aIhK2FXODPoxX1sAJAT5lyacBwpSPs2Yr1CD7Lwjby9lmgYsSvMI9UIXKlzBOcYhiivNKjqk7xKUMamC7FDCCrSAj+MEkquj1lE3X0VfKFAB+EAWyyLydEQFaCzVzyKPId8vJhzAeIHH/JZt845stRDuKwclFKBHcAJb3HVs3SclgW++AUrjdj/OhUZQXqcxIfNIcowNeA5+9iZ4qVLYunQkqvJgjStOwSqyGZNvNq5/qTLp5w8CQWrK/kjOb0YlcdtkPB3zkDiNIKzHPnGi1S9ISobi3iiCwXh1TMFwWqGQNnvAInltm0+A6rM8+aFPn8JeS3QAwxdYCvZDWE6S7/je0ET9gRW5OoAdvU4c5nC0wc+CUhELOH9Veihpn4+fU68= Content-ID: <79CDC12B48637547BD62FEE56C6A0ACA@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9992afa-b2b0-490f-f4c8-08d6d78a2283 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2019 10:02:40.6017 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4800 Cc: Viorel Suman , dl-linux-imx Subject: [alsa-devel] [PATCH V2 0/2] ASoC: ak4458: fail on probe if codec is not present X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP AK4458 is probed successfully even if AK4458 is not present - this is caused by probe function returning no error on i2c access failure. The patchset fixes this. Changes since V1: Conditional statement rewritten as suggested by Mark. Viorel Suman (2): ASoC: ak4458: rstn_control - return a non-zero on error only ASoC: ak4458: add return value for ak4458_probe sound/soc/codecs/ak4458.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)