From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01080238C34; Fri, 11 Apr 2025 11:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744372067; cv=none; b=j6nqc862pA0s4Rb+R3YRVeHRQ6L2PYaJhXLKp7OBV7zgBl/3kmiICe7GewoHHV0R930KYUQ95Gsji/CkvLa9RIfA2tOOVSOE16uV4i3ZcnYxdLyOGBPIdUKh/rD5+QizQsnriln+D5jxN227W5m/v8MS+R6YaRwI2dPkuXgvZTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744372067; c=relaxed/simple; bh=NeMab9c/Kvu9uChLk+sPesR91tAqeTJtm6StHvoL9Gw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mmuTMjAPDHmcRpWL3Y49norZ68Mcu6DljhEWaB3RoI2/mmJCSyFeD4zj/SVnuJN87eg1sPFxXyIkjwjdtVr3FT5Xh+XqkjinUGR086SZO0EyfWUDskZqAKa8/+B6Twig9hKa5spnpgverQoEkEaUV9+Zs/6Rtv08WzzNDEeG4YE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=MT7mrBDC; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="MT7mrBDC" Received: from francesco-nb (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 3A0D21F998; Fri, 11 Apr 2025 13:47:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1744372062; bh=6BdoDX02yA4l0YqlCA+cgnYBFlW3ntWEuYftz+GCH1k=; h=From:To:Subject; b=MT7mrBDC3FJk6ZgLxtNGgMDefBqrNq+r2oEhmmlaC5HeztAvBCqVglQe4wI5+L6b4 TmLSHVnTBp3gy/uVjNtRPZDmbCE00wiW5KSP0Baajr8RvHuNOv4rI0YPd4boGL0tCU qkd9xXq4xR+TTG/fYGOzMnqDH8f6LGpa6f1vr17ixYNVbUsIKFcG3yLyNhhkpuGpB6 X1RmdDLdrLKBbq32GM1uLnbk/BAaiJDBrNHnldi/gm+je8YprzK0eUDsrYezXQIGFh kueZ5Pv6+/uCqkx7Q5YEQqkLYj+NaZ7vwVURk2FQN0dUlizf2sAKnIMYIuisuEUH2D mcdkk5X5XIitQ== Date: Fri, 11 Apr 2025 13:47:38 +0200 From: Francesco Dolcini To: Dong Aisheng , Andi Shyti , Shawn Guo , Sascha Hauer Cc: Francesco Dolcini , Pengutronix Kernel Team , Fabio Estevam , Emanuele Ghidoli , linux-i2c@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: Re: [PATCH v1] i2c: lpi2c: implement master_xfer_atomic callback Message-ID: <20250411114738.GA43965@francesco-nb> References: <20250319145114.50771-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250319145114.50771-1-francesco@dolcini.it> Hello, On Wed, Mar 19, 2025 at 03:51:14PM +0100, Francesco Dolcini wrote: > From: Emanuele Ghidoli > > Rework the read and write code paths in the driver to support operation > in atomic contexts. To achieve this, the driver must not rely on IRQs > or perform any scheduling, e.g., via a sleep or schedule routine. Even > jiffies do not advance in atomic contexts, so timeouts based on them > are substituted with delays. > > Implement atomic, sleep-free, and IRQ-less operation. This increases > complexity but is necessary for atomic I2C transfers required by some > hardware configurations, e.g., to trigger reboots on an external PMIC chip. > > Signed-off-by: Emanuele Ghidoli > Signed-off-by: Francesco Dolcini Any comment on this? Francesco