Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4187164ybg; Mon, 21 Oct 2019 05:15:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxO8XvjIae93WeDHIxet7/osHI0BwDit2OtIgW8VXCBKWHYnyCo8xhOkJB5loTLe2ETVljv X-Received: by 2002:a50:ac2c:: with SMTP id v41mr10633408edc.11.1571660129045; Mon, 21 Oct 2019 05:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571660129; cv=none; d=google.com; s=arc-20160816; b=CXAxGQDn9KVoMzd7D5Z4JrwH0y3Lcy6qLz0OBhmktw7nZClCsJltcKounfQs7pYanU o50W3+PJbm509L8MntjMj71dXUa/4sL6AMG+22m6lbQiIiGpbeSUw2bSJGpcXZzS9HNO Tk0fulppUVQFOyEEPoqbgMvLUwk1qwa6eKP088E8kdIkTNKsCVVybgeQrVHq93zxmuXY wm0AH81IdbTJBs1f6iFANmF5VMBBh1RmNaqliYu9xIpCxAdvdYcA8MQxEMwwkNqPR4r2 fDQKiz6akW/x0iXlOqsUWyd5P6MPUjNPg+EJKNOoIngkGcp4vY44t4ncQCAwLv50Gla+ 26/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=7jxHvlIH/GHF2NGpOLWHwkTRpolnPbX/bJ9AbQhHZ50=; b=riHcNLniIchXRKkoGKSCd4Me0pTLC8/FWcySyJlVzHCCgdkZ0i0hIm2XzqUTY/16RP rvhCHsOwsuG6TE0NX+iei2Td1+k3UJaJwOu6IgABmPSUxYbd6xj6rCkblFGeu/Wb30Hz uenITTS7sYylgW/ifxjeYrA229o6QvwJYdvW+oEZ0uBQ5Gs1Ijsmc7QYhvJbChuxco95 sE//fKh7xDoeJhg+LccsoW/Ehx9VQhY7Fvm9buLvrTxVN+gczWxQphK04RoPLl4GRzQ8 xdHY3SWF/saPQzSc2TK2sDQ4ungvpkfX/0bR5ul57/HFCdkP7lRyFvz9kqM2/JUm78ga CCRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p59UqSQ7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h17si8475939ejt.173.2019.10.21.05.15.06; Mon, 21 Oct 2019 05:15:29 -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=pass header.i=@linaro.org header.s=google header.b=p59UqSQ7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbfJUMON (ORCPT + 99 others); Mon, 21 Oct 2019 08:14:13 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40161 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728322AbfJUMON (ORCPT ); Mon, 21 Oct 2019 08:14:13 -0400 Received: by mail-wr1-f65.google.com with SMTP id o28so13699068wro.7 for ; Mon, 21 Oct 2019 05:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7jxHvlIH/GHF2NGpOLWHwkTRpolnPbX/bJ9AbQhHZ50=; b=p59UqSQ7ok5T84ox4VFBup57p/nWydONjxf/yNkt7WFcO4wBEmH+YWZ+pQ6Xd9sjdE gSUIbcE9ffJQyI/0jl2S6ISp+GqiCmZ4CwtinHAkZf3ssil2Cwd6xHNN922f8P6xmbJM 1A7w4V4M4aiTNuhFnQdbTE7z3a0w/dAevMvbtl1SHXmxhWzi6KF9O2CXkLIuoQfkfoVZ 3UyWrMyNdhTb3JGhDiNqUStJdxz5TF+KqxiY1i2V32UCm4MEszjBdPKhce7iMZSsKThJ n3wht5xCgM8UzqK/jPTh998UCkiYDCDp3nlKnmBkv+6TTkmV/t5UKE5TBBS9ixIRcHNr xDCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7jxHvlIH/GHF2NGpOLWHwkTRpolnPbX/bJ9AbQhHZ50=; b=cPkOgQIt4aOg8jR0QR5j3FYjrmoAjVUdHNKQM91YiNIAYGRgOyzozTnePb4cVSqCmR Y7p0YI9ADgA8Wq53G+SdyIZwqVrgrBe6axF3wfgDxJp8x9pAA+LvVLR1EcRbthKQojxY kutR74i2wy5VR5PQm7EJJO8GKT/Kj6HPoUEUaMhPmAvnTzNc3oaqo0H9GRJO7njlQJu4 F31uD6uYsinBjnaz0SyJxpvpehDFM5o2UUAkWRzGduccFuB/rv3cV8SEr+md9vSfyeQk bNjHQzACqXlOjetgdRrwAId61KZv9zYnSUD5fSxECUeCkSYCfn+ymGuZxLwahYlQCBWk xjJw== X-Gm-Message-State: APjAAAV3ogsnJxq5pM3G7BsrFcQ5WCedZYTZI8WKyxl5gwn3JOuIkIY+ SGe9kQfxpbBVnpx0HVtUunLFWcU/Rc0= X-Received: by 2002:adf:ea86:: with SMTP id s6mr18677166wrm.397.1571660051249; Mon, 21 Oct 2019 05:14:11 -0700 (PDT) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id l18sm18941821wrn.48.2019.10.21.05.14.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Oct 2019 05:14:10 -0700 (PDT) Subject: Re: [PATCH v2 02/11] mfd: wcd934x: add support to wcd9340/wcd9341 codec To: Lee Jones Cc: robh@kernel.org, broonie@kernel.org, linus.walleij@linaro.org, vinod.koul@linaro.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, spapothi@codeaurora.org, bgoswami@codeaurora.org, linux-gpio@vger.kernel.org References: <20191018001849.27205-1-srinivas.kandagatla@linaro.org> <20191018001849.27205-3-srinivas.kandagatla@linaro.org> <20191021104611.GZ4365@dell> <1af8a875-8f55-6b7e-4204-ecedc1608889@linaro.org> <20191021114520.GD4365@dell> From: Srinivas Kandagatla Message-ID: <38dde3d9-8d7e-7dc0-7cba-137b43cea9d1@linaro.org> Date: Mon, 21 Oct 2019 13:14:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191021114520.GD4365@dell> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/2019 12:45, Lee Jones wrote: > On Mon, 21 Oct 2019, Srinivas Kandagatla wrote: > >> Thanks Lee for taking time to review. >> >> I agree with most of the style related comments, will fix them in next >> version. For others I have replied it inline. > > [...] > >>>> +static int wcd934x_slim_status(struct slim_device *sdev, >>>> + enum slim_device_status status) >>>> +{ >>>> + struct device *dev = &sdev->dev; >>>> + struct wcd934x_data *wcd; >>>> + int ret; >>> >>> This is semantically odd! Why are you doing most of the >>> initialisation and bring-up in 'status' and not 'probe'. Seems >>> broken to me. >> >> SLIMBus device will not be in a state to communicate before enumeration (at >> probe), so all the device initialization is done in status callback where it >> is ready for communication. > > Why do we need the device to be up *before* calling probe? > To Initialize the device. And SLIMbus device registers access can not be done before enumeration. >> This is same with SoundWire Bus as well! > > [...] > >>>> + struct device *dev; >>>> + struct clk *extclk; >>>> + struct regmap *regmap; >>>> + struct slim_device *sdev; >>> >>> You don't need 'sdev' and 'dev'. >> >> slim_device instance (sdev) is required by audio codec driver to allocate >> stream runtime. > > You can extrapolate one from the other. That is possible to do! I can give that a try and see in next version! >