From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D62F3199FBA; Thu, 10 Oct 2024 16:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728578451; cv=none; b=hXf767hcD4YEsnVJ75jgoPW6NUt4hTAU+knpJanXcTjNDuDVWWiU69L4b3nr2IGJRXrrrVIPZCFnEQnhUqLyBbboXNk4cA19O9j4M1A3WhLgR5qK0HRMBWDwUjCHM6/42J7uUgqPz4c7vo9z71PInhNEoNV3XezSogK73oBoFfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728578451; c=relaxed/simple; bh=7Dki8csyxmG2igPYCbUM3Lwm5qOkWkVdaeHqiZcN3Qo=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VaSb6UpiN3DrkNZeoydLzIlYL2fkvy0zO3Qrk7mJnC0Xo4WMvRuH23gEcZxcee8tQK+dTZAxWXDEHv2FI/faCi5h2S+/7vVIpTTvFN1DJhdA+eXNSSjVrvYkz9Qjd45siKaDxcYKWzbcR5txZKbrcNV4Y7ozj5jM4YQS6hEoVQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XPb8n1Znnz6K5mr; Fri, 11 Oct 2024 00:40:25 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 488971400CB; Fri, 11 Oct 2024 00:40:46 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 10 Oct 2024 18:40:45 +0200 Date: Thu, 10 Oct 2024 17:40:43 +0100 From: Jonathan Cameron To: "Nechita, Ramona" CC: Jonathan Cameron , Lars-Peter Clausen , "Tanislav, Cosmin" , "Hennerich, Michael" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Sa, Nuno" , Andy Shevchenko , David Lechner , "Schmitt, Marcelo" , Olivier Moysan , Dumitru Ceclan , Matteo Martelli , AngeloGioacchino Del Regno , Alisa-Dariana Roman , Ivan Mikhaylov , "Mike Looijmans" , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: Re: [PATCH v5 3/3] drivers: iio: adc: add support for ad777x family Message-ID: <20241010174043.00002446@Huawei.com> In-Reply-To: References: <20240912121609.13438-1-ramona.nechita@analog.com> <20240912121609.13438-4-ramona.nechita@analog.com> <20240914180648.592cd69e@jic23-huawei> <20240928153109.52ff4c5e@jic23-huawei> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To frapeml500008.china.huawei.com (7.182.85.71) On Thu, 10 Oct 2024 14:35:52 +0000 "Nechita, Ramona" wrote: > Hello Jonathan, > > >> >> + > >> >> + ret = ad7779_reset(indio_dev, reset_gpio); > >> >> + if (ret) > >> >> + return ret; > >> >> + > >> >> + ad7779_powerup(st, start_gpio); > >> >> + if (ret) > >> >> + return ret; > >> >What powers the device down again if we hit an error? > >> > > >> >Probably need a devm_add_action_or_reset() or if it self powers down may a comment on that. > >> > >> In the powerup function there are only some register writes and the > >> start gpio is only a synchronization pulse (perhaps the name powerup is not very appropriate), would an action or reset be necessary in this case? Since the regulators are not used in the driver, should there be a function disabling them anyway? > >> > >If there is nothing useful to do indeed not but when I see a power up, I rather expect a power down. Is there anything that can do that or is it a case of it will go to sleep anyway for some other reason? > > I don't think there would be anything to do in a powerdown function specifically, but I could rename the powerup function to "_config" or something similar, to make it more intuitive. ok. That will at least make me less suspicious when I read this after forgetting all about it ;) thanks, Jonathan > > > > Best Regards, > Ramona > >