Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-17 Thread One Thousand Gnomes
On Fri, 12 Sep 2014 10:36:07 -0700 "David E. Box" wrote: > +#if IS_ENABLED(CONFIG_I2C_SHARED_CONTROLLER) > +extern int i2c_acquire_ownership(struct device *dev); > +extern int i2c_release_ownership(struct device *dev); > +#endif You can just have the prototypes anyway - no need for more ifdefs

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-17 Thread One Thousand Gnomes
On Fri, 12 Sep 2014 10:36:07 -0700 David E. Box david.e@linux.intel.com wrote: +#if IS_ENABLED(CONFIG_I2C_SHARED_CONTROLLER) +extern int i2c_acquire_ownership(struct device *dev); +extern int i2c_release_ownership(struct device *dev); +#endif You can just have the prototypes anyway - no

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Li, Aubrey
On 2014/9/16 17:44, Mika Westerberg wrote: > On Fri, Sep 12, 2014 at 10:36:07AM -0700, David E. Box wrote: >> This patch implements an I2C bus sharing mechanism between the host and >> platform >> hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. >> >> On these

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Mika Westerberg
On Tue, Sep 16, 2014 at 03:53:27AM -0700, Jacob Pan wrote: > On Tue, 16 Sep 2014 12:44:49 +0300 > Mika Westerberg wrote: > > > Is this because we need to access the PMIC from host as well? I mean > > from some PMIC driver (which driver btw)? > > > This is used by the X-Powers PMIC. >

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Jacob Pan
On Tue, 16 Sep 2014 12:44:49 +0300 Mika Westerberg wrote: > Is this because we need to access the PMIC from host as well? I mean > from some PMIC driver (which driver btw)? > This is used by the X-Powers PMIC. https://lkml.org/lkml/2014/9/11/1016 > Otherwise it would be best to just detect

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Mika Westerberg
On Fri, Sep 12, 2014 at 10:36:07AM -0700, David E. Box wrote: > This patch implements an I2C bus sharing mechanism between the host and > platform > hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. > > On these platforms access to the PMIC must be shared with

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Mika Westerberg
On Fri, Sep 12, 2014 at 10:36:07AM -0700, David E. Box wrote: This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. On these platforms access to the PMIC must be shared with platform

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Jacob Pan
On Tue, 16 Sep 2014 12:44:49 +0300 Mika Westerberg mika.westerb...@linux.intel.com wrote: Is this because we need to access the PMIC from host as well? I mean from some PMIC driver (which driver btw)? This is used by the X-Powers PMIC. https://lkml.org/lkml/2014/9/11/1016 Otherwise it would

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Mika Westerberg
On Tue, Sep 16, 2014 at 03:53:27AM -0700, Jacob Pan wrote: On Tue, 16 Sep 2014 12:44:49 +0300 Mika Westerberg mika.westerb...@linux.intel.com wrote: Is this because we need to access the PMIC from host as well? I mean from some PMIC driver (which driver btw)? This is used by the

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-16 Thread Li, Aubrey
On 2014/9/16 17:44, Mika Westerberg wrote: On Fri, Sep 12, 2014 at 10:36:07AM -0700, David E. Box wrote: This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. On these platforms access

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-15 Thread David E. Box
Hi Maxime, On Mon, Sep 15, 2014 at 08:57:38AM +0200, Maxime Coquelin wrote: > >+err = dev->acquire_ownership(dev->dev); > Have you considered using hwspinlocks instead? No, I've not used it before but it looks applicable here. I'll take a look. > >@@ -212,6 +259,25 @@ static int

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-15 Thread Maxime Coquelin
Hi David, On 09/12/2014 07:36 PM, David E. Box wrote: This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. On these platforms access to the PMIC must be shared with platform hardware. The

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-15 Thread Maxime Coquelin
Hi David, On 09/12/2014 07:36 PM, David E. Box wrote: This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. On these platforms access to the PMIC must be shared with platform hardware. The

Re: [PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-15 Thread David E. Box
Hi Maxime, On Mon, Sep 15, 2014 at 08:57:38AM +0200, Maxime Coquelin wrote: +err = dev-acquire_ownership(dev-dev); Have you considered using hwspinlocks instead? No, I've not used it before but it looks applicable here. I'll take a look. @@ -212,6 +259,25 @@ static int

[PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-12 Thread David E. Box
This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. On these platforms access to the PMIC must be shared with platform hardware. The hardware unit assumes full control of the I2C bus and the

[PATCH] i2c-designware: Intel BayTrail PMIC I2C bus support

2014-09-12 Thread David E. Box
This patch implements an I2C bus sharing mechanism between the host and platform hardware on select Intel BayTrail SoC platforms using the XPower AXP288 PMIC. On these platforms access to the PMIC must be shared with platform hardware. The hardware unit assumes full control of the I2C bus and the