Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp516442rwn; Thu, 15 Sep 2022 02:14:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR4S9JV9F3vZUurg0CmzliNxSjng2bMn0XdhPmavZr/Rud8MlxnihN8Ajl+mq37IGNxpmavk X-Received: by 2002:a65:4c09:0:b0:430:8422:9642 with SMTP id u9-20020a654c09000000b0043084229642mr35596516pgq.322.1663233268801; Thu, 15 Sep 2022 02:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663233268; cv=none; d=google.com; s=arc-20160816; b=jpbGXy8ZlGpbrtxv7k9XM+JMRTVPzArWPYLnZNR00a6JgdzdXu+a4RQ+at5Y3cOGrs nKB4fxV5EeLm7p+VzU/AnkeFYeQCpZpmwdlOK4DYE0aWjv8Z9ulZ5HCveipH1JOGKA3Z 6SKw7wEPNM+NgJgxC8lPsL9eSKXvfAEvw6T7KFf1UJnJpaXkyQU+FQ05d1mb0jEMusPa jIKHoQ1BkMpvmXIn0et7fHOESd9uU4MxbgYuebHsOgfZ+L+k74OO9ajE6B4juussz/d/ s2ow7e+5o2DsIL3D0nTJUnsI4nrjQKUBH02I/9P1ww5X1LlsVC1mxd5yTYeebXjDdW4q D8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=5T7fANvbR8aOkxZKsm17t90nIE/N2i6lzPnLtMrGZng=; b=zyKGo7ktSf9pF6dLUH96ohM7MEcAfse0CENSCaQwrXPcgl0tgpaEQL1qlx3Llci4KZ aB2Lr5PIGtRxR2d/mYIw6z/5zmn71+8hVjeRmOQwYlhgwijYZ3n6lPKClcQ/KPbL/Sq2 Nq8DuwYYZcFkHlTS017TN4WoemjQryngGK9Z9b8mce4orHYVRxciSPCbvh8KiLx46qwN Dkdx/kSHXHLvkoaI8dH5wZmxi99oVHrxreRQppOJmjQzuS/In1WnUt8cPbhWEKPz3R4q KdpzHUi5o1U4dfEX03IuFHFQMumoPZ/CJ1Rhc3/FGGJcEOndUzHE8uUQJbrBNDPU81RY hN8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=Pcpl22El; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a17090341c500b001781ea8914csi13158094ple.452.2022.09.15.02.14.17; Thu, 15 Sep 2022 02:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=Pcpl22El; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbiIOJJD (ORCPT + 99 others); Thu, 15 Sep 2022 05:09:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiIOJIe (ORCPT ); Thu, 15 Sep 2022 05:08:34 -0400 Received: from hutie.ust.cz (unknown [IPv6:2a03:3b40:fe:f0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70CDC9675A; Thu, 15 Sep 2022 02:08:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1663232894; bh=5T7fANvbR8aOkxZKsm17t90nIE/N2i6lzPnLtMrGZng=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Pcpl22EllOQGrrVzCCwI7v343ZqXYueCFtqmX2hj1JqswEZRjm7P/BAmKO20CTLCV kABvmE3rEUvznJVv/IG8M68id8aQqks6gQY7gk23+GQmdoAloa7/L73ZYsJtxSLkeG CKr1oQIv6VQW5MEikA70J8azkXsbCn/Ngkpdyz/M= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH 04/10] ASoC: cs42l42: Split probe() and remove() into stages From: =?utf-8?Q?Martin_Povi=C5=A1er?= In-Reply-To: <20220909135334.98220-5-povik+lin@cutebit.org> Date: Thu, 15 Sep 2022 11:08:11 +0200 Cc: Charles Keepax , ChiYuan Huang , Pierre-Louis Bossart , Lukas Bulwahn , Matt Flax , - , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220909135334.98220-1-povik+lin@cutebit.org> <20220909135334.98220-5-povik+lin@cutebit.org> To: James Schulman , David Rhodes , Lucas Tanure , Richard Fitzgerald , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai , =?utf-8?Q?Martin_Povi=C5=A1er?= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_FAIL,T_SPF_HELO_TEMPERROR autolearn=no 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 > On 9. 9. 2022, at 15:53, Martin Povi=C5=A1er = wrote: >=20 > To prepare for adding SoundWire the probe must be split into three > parts: >=20 > 1) The bus-specific probe > 2) Common bus-agnostic probe steps > 3) Initialization of the peripheral registers >=20 > Step (3) must be separate because on SoundWire devices the probe must > enable power supplies and release reset so that the peripheral can be > enumerated by the bus, but it isn't possible to access registers until > enumeration has completed. >=20 > The call to devm_snd_soc_register_component() must be done at stage = (2) > so that it can EPROBE_DEFER if necessary. In SoundWire systems stage = (3) > is not a probe event so a deferral at this stage would not result in > re-probing dependencies. >=20 > A new init_done flag indicates that the chip has been identified and > initialized. This is used to prevent cs42l42_remove(), = cs42l42_suspend(), > cs42l42_restore() and cs42l42_irq_thread() from attempting register > accesses if the chip was not successfully initialized. Although this > cannot happen on I2C, because the entire probe would fail, it is > possible on SoundWire if probe succeeds but the cs42l42 is never > enumerated. >=20 > Signed-off-by: Richard Fitzgerald > Signed-off-by: Martin Povi=C5=A1er Preparing the next iteration of the series, I noticed that I reset the authorship of this patch in the course of git manipulations. The author of this patch is of course Richard, apologies for that. It will be fixed for v2. Martin