From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH RESEND] i2c: Add support for device-tree based chip initialization Date: Mon, 26 Nov 2012 20:13:46 +0000 Message-ID: <20121126201346.4E8963E095F@localhost> References: <1353905636-6697-1-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1353905636-6697-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Jean Delvare , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Ben Dooks , Wolfram Sang , Guenter Roeck List-Id: devicetree@vger.kernel.org On Sun, 25 Nov 2012 20:53:56 -0800, Guenter Roeck wrote: > Some I2C devices are not or not correctly initialized by the firmware. > Configuration would be possible via platform data, but that would require > per-driver platform data and a lot of code, and changing it would not be > possible without re-compiling the kernel. It is more elegant to do it > generically via devicetree properties. > > Add a generic I2C devicetree property named "reg-init". This property provides > a sequence of device initialization commands to be executed prior to calling > the probe function for a given device. > > Signed-off-by: Guenter Roeck This is a very similar problem to the power sequences series that was recently posted to this list. I would like that feature and this mechanism use the same approach. g.