From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: Shared i2c adapter locking Date: Thu, 5 Nov 2009 15:07:15 +0100 Message-ID: <20091105150715.692b5200@hyperion.delvare> References: <20091026133757.7cf87e49.sfr@canb.auug.org.au> <20091029154317.651904b9@hyperion.delvare> <1256828976.2827.27.camel@achroite> <20091105141122.56b6b4f8@hyperion.delvare> <1257429444.2793.2.camel@achroite.uk.solarflarecom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1257429444.2793.2.camel-xQnnTUlwzDrdvaEqJLTMTA9jg9n5Vt1AMm0uRHvK7Nw@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ben Hutchings Cc: Stephen Rothwell , David Miller , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mika Kuoppala , Linux I2C List-Id: linux-i2c@vger.kernel.org On Thu, 05 Nov 2009 13:57:24 +0000, Ben Hutchings wrote: > On Thu, 2009-11-05 at 14:11 +0100, Jean Delvare wrote: > [...] > > What about the following patch? > >=20 > > From: Jean Delvare > > Subject: i2c: Add an interface to lock/unlock I2C bus segment > >=20 > > Some drivers need to be able to prevent access to an I2C bus segmen= t > > for a specific period of time. Add an interface for them to do so > > without twiddling with i2c-core internals. > >=20 > > Signed-off-by: Jean Delvare > > Cc: Ben Hutchings > Acked-by: =EF=BB=BFBen Hutchings >=20 > Presumably this is meant for net-next-2.6, and you'll implement Actually I meant to push this to Linus immediately, through my i2c tree. This is essentially a no-op: the binary code will be the same as before the patch, so guaranteed to be safe, and this will solve conflicts in linux-next. > i2c_{lock,unlock}_adapter() using rt_mutex in your i2c tree? Correct. --=20 Jean Delvare From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757021AbZKEOHa (ORCPT ); Thu, 5 Nov 2009 09:07:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756615AbZKEOH3 (ORCPT ); Thu, 5 Nov 2009 09:07:29 -0500 Received: from bamako.nerim.net ([62.4.17.28]:59471 "EHLO bamako.nerim.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756541AbZKEOH2 convert rfc822-to-8bit (ORCPT ); Thu, 5 Nov 2009 09:07:28 -0500 Date: Thu, 5 Nov 2009 15:07:15 +0100 From: Jean Delvare To: Ben Hutchings Cc: Stephen Rothwell , David Miller , netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Mika Kuoppala , Linux I2C Subject: Re: Shared i2c adapter locking Message-ID: <20091105150715.692b5200@hyperion.delvare> In-Reply-To: <1257429444.2793.2.camel@achroite.uk.solarflarecom.com> References: <20091026133757.7cf87e49.sfr@canb.auug.org.au> <20091029154317.651904b9@hyperion.delvare> <1256828976.2827.27.camel@achroite> <20091105141122.56b6b4f8@hyperion.delvare> <1257429444.2793.2.camel@achroite.uk.solarflarecom.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i586-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 05 Nov 2009 13:57:24 +0000, Ben Hutchings wrote: > On Thu, 2009-11-05 at 14:11 +0100, Jean Delvare wrote: > [...] > > What about the following patch? > > > > From: Jean Delvare > > Subject: i2c: Add an interface to lock/unlock I2C bus segment > > > > Some drivers need to be able to prevent access to an I2C bus segment > > for a specific period of time. Add an interface for them to do so > > without twiddling with i2c-core internals. > > > > Signed-off-by: Jean Delvare > > Cc: Ben Hutchings > Acked-by: Ben Hutchings > > Presumably this is meant for net-next-2.6, and you'll implement Actually I meant to push this to Linus immediately, through my i2c tree. This is essentially a no-op: the binary code will be the same as before the patch, so guaranteed to be safe, and this will solve conflicts in linux-next. > i2c_{lock,unlock}_adapter() using rt_mutex in your i2c tree? Correct. -- Jean Delvare