Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4259320ybg; Mon, 21 Oct 2019 06:20:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYidgDw3cidd9DaRHKn7DoDmi9RbEiRxhbll9T18Le2BbxRPpVaaC6tYt8F9NyLtljje1c X-Received: by 2002:a17:906:5407:: with SMTP id q7mr22435754ejo.24.1571664035118; Mon, 21 Oct 2019 06:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571664035; cv=none; d=google.com; s=arc-20160816; b=VkCbIBqzhIXBTZ0VL/xiiTMUa7h7xEBaYnoPqoM3n5bjFqkaa+uuERKTxmWh0A6KrQ s8um2NSHHyoePPB8Q4D5a2zohUqnvyKbiydU1Bu47BLcgCUA2d1AAMJo0FnBIop0H+AV SQ3VKHOAsEwFQ/szeRlnvMmERmDZaye3Bfpz2wtacPssnScGhcVDjvM0puRd7/SPj93B 8ww67jeoaOR4htA0h/lupjRBjTSCSsCqsc35P3d02xmOSDAjTh6ZtlXJhNU3q4YhA3Wy gpA+pWOXQF+hTnwckwI/8TszQJkvpW2a18QPDy49MBQf7sqyFYwkVRkukPm9BoTW4RPk BClA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IzXM9qRz/JzRTDA5ooE2NgWm+U2lHG9aYE8mnLThYtI=; b=YY4xYvyExcEb4GU/a9YvPC0qyDIvvr3iiVCljOzj9jOQN6wnZTvzzbnxaEbqzX2uE4 g+D3O7UNtC2Kf2Y0GKfXnVCRE/m5+PgfB+Qyd675wHHTCc64C0p1eVYyoRPmcxSgdG4b 7g7r/nbVPgEVM75YogFD9Ur+9pSLeV3ddEldcsfaylgQzSIG37yMGVmk0WAFua5UUyRT opGU+K4XLoC83AY/z/1NfWve0/RyqS6kE4OwVSCKTiIQ1DUDGD5CyuX/arjZhZYg4uka FvLF3bVnI0hBf09KWs42FvnFBsUwrAq3nlvSjSdsYr7l3kvN5SOyS+qeDrtLK/91qoxX Ug0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q9YWvNv9; 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 d6si3072356ede.119.2019.10.21.06.20.09; Mon, 21 Oct 2019 06:20:35 -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=q9YWvNv9; 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 S1728874AbfJUNTe (ORCPT + 99 others); Mon, 21 Oct 2019 09:19:34 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37120 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728696AbfJUNTd (ORCPT ); Mon, 21 Oct 2019 09:19:33 -0400 Received: by mail-wr1-f65.google.com with SMTP id e11so5251771wrv.4 for ; Mon, 21 Oct 2019 06:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=IzXM9qRz/JzRTDA5ooE2NgWm+U2lHG9aYE8mnLThYtI=; b=q9YWvNv9ifnEpmf4fcGn790DbawpBkhYQbpIVJg3hYiigRmAsjCJXHurvRjsJbr33y GKAj9CRq9suFR+sT8bkXA66eo/oOwaQ8tVIgh8xTeyUwi3LXse8r+RohW9AKTnYXoZOJ G30a0Fwt09369m1iUluNcYAKO/M8Hjw81Wl0xvLiTo4rpxSjJbUz8GYnKERP1UGsco/V 1AQp5U49KV73xRt8DhQWnoscHp1SDZ4FmHCi2q/M7u0w1ekqC+6fe7vPC9M2+U4Tu61t wRem0MnPSHUthaSTQfUD8G9zahBK5zqx0/4Wr/SUvo5wn0J5soLVVBwAEM5zeqsGdw05 /q2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=IzXM9qRz/JzRTDA5ooE2NgWm+U2lHG9aYE8mnLThYtI=; b=WMRh4aoqclJ7ossZniAkbrUMKYpAABsfLZYgLJxUHvdtDsm/U5Z/R0C79oWtPPTs+6 f/2J4exAaDbO8bweHHh+aHjA/uZUyybln4vDhKbw7KIpaaZrKkvzsskQXw59i9AH5JO6 TH2Xozg4rVml1oxTllL1oBuN3beTWnx9b8aMkA+w8DqrdN9EyF7qM7EQ3BoZHM/T8ACI LLh6IyqJmW67H3z3LUk9urczJQGZW8wr0yQ7FPKldGCK3xHwHkKSt+Xh/BeubzE/upTM rXJt3t6iuCAFe5fRyjIwXXs0UAgV3KN60Iej84u7XD/inEnCuD4w6ycdiDpDcVmd11yT 07Qw== X-Gm-Message-State: APjAAAW4bvtLz5UX2xBlp9Lda962iSdQh8Qigtv5QdXHCwbugOpwaVEM 0gXcGpvdSyQ5xd0ISP1LcSKrTA== X-Received: by 2002:a5d:4b8b:: with SMTP id b11mr5442650wrt.78.1571663969894; Mon, 21 Oct 2019 06:19:29 -0700 (PDT) Received: from dell ([95.149.164.99]) by smtp.gmail.com with ESMTPSA id v10sm11291181wmg.48.2019.10.21.06.19.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 06:19:29 -0700 (PDT) Date: Mon, 21 Oct 2019 14:19:27 +0100 From: Lee Jones To: Srinivas Kandagatla 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 Subject: Re: [PATCH v2 02/11] mfd: wcd934x: add support to wcd9340/wcd9341 codec Message-ID: <20191021131927.GJ4365@dell> 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> <38dde3d9-8d7e-7dc0-7cba-137b43cea9d1@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <38dde3d9-8d7e-7dc0-7cba-137b43cea9d1@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Oct 2019, Srinivas Kandagatla wrote: > > > 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. I'm not sure why you need any hardware to be enabled before calling .probe(). That is the purpose of .probe(). The only way in which I can see this being a requirement is if information located on the device is required in order to do device-driver matching. In which case, how was the .status() function matched? -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog