Re: [PATCH] mfd: add MAX8907 core driver

2012-08-02 Thread Mark Brown
On Thu, Aug 02, 2012 at 11:11:21AM -0600, Stephen Warren wrote: > Samuel, please don't apply this just yet though - it looks like I need > to make some minor changes to the header file and DT binding > documentation to add in a definition for one more regulator. I'll repost > the amended version

Re: [PATCH] mfd: add MAX8907 core driver

2012-08-02 Thread Stephen Warren
On 08/02/2012 10:15 AM, Mark Brown wrote: > On Wed, Aug 01, 2012 at 02:48:05PM -0600, Stephen Warren wrote: >> From: Gyungoh Yoo >> >> The MAX8907 is an I2C-based power-management IC containing voltage >> regulators, a reset controller, a real-time clock, and a touch-screen >> controller. > >

Re: [PATCH] mfd: add MAX8907 core driver

2012-08-02 Thread Mark Brown
On Wed, Aug 01, 2012 at 02:48:05PM -0600, Stephen Warren wrote: > From: Gyungoh Yoo > > The MAX8907 is an I2C-based power-management IC containing voltage > regulators, a reset controller, a real-time clock, and a touch-screen > controller. Reviewed-by: Mark Brown -- To unsubscribe from this

Re: [PATCH] mfd: add MAX8907 core driver

2012-08-02 Thread Mark Brown
On Wed, Aug 01, 2012 at 02:48:05PM -0600, Stephen Warren wrote: From: Gyungoh Yoo jack@maxim-ic.com The MAX8907 is an I2C-based power-management IC containing voltage regulators, a reset controller, a real-time clock, and a touch-screen controller. Reviewed-by: Mark Brown

Re: [PATCH] mfd: add MAX8907 core driver

2012-08-02 Thread Stephen Warren
On 08/02/2012 10:15 AM, Mark Brown wrote: On Wed, Aug 01, 2012 at 02:48:05PM -0600, Stephen Warren wrote: From: Gyungoh Yoo jack@maxim-ic.com The MAX8907 is an I2C-based power-management IC containing voltage regulators, a reset controller, a real-time clock, and a touch-screen

Re: [PATCH] mfd: add MAX8907 core driver

2012-08-02 Thread Mark Brown
On Thu, Aug 02, 2012 at 11:11:21AM -0600, Stephen Warren wrote: Samuel, please don't apply this just yet though - it looks like I need to make some minor changes to the header file and DT binding documentation to add in a definition for one more regulator. I'll repost the amended version

[PATCH] mfd: add MAX8907 core driver

2012-08-01 Thread Stephen Warren
From: Gyungoh Yoo The MAX8907 is an I2C-based power-management IC containing voltage regulators, a reset controller, a real-time clock, and a touch-screen controller. The original driver was written by: * Gyungoh Yoo Various fixes and enhancements by: * Jin Park * Tom Cherry * Prashant

[PATCH] mfd: add MAX8907 core driver

2012-08-01 Thread Stephen Warren
From: Gyungoh Yoo jack@maxim-ic.com The MAX8907 is an I2C-based power-management IC containing voltage regulators, a reset controller, a real-time clock, and a touch-screen controller. The original driver was written by: * Gyungoh Yoo jack@maxim-ic.com Various fixes and enhancements by:

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-27 Thread Laxman Dewangan
On Friday 27 July 2012 01:10 AM, Stephen Warren wrote: From: Gyungoh Yoo +static int max8907_irq_set_wake(struct irq_data *data, unsigned int on) +{ + /* Everything happens in max8907_irq_sync_unlock */ + Probably you need to call the wake_enable of irq which goes to the cpu here.

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-27 Thread Laxman Dewangan
On Friday 27 July 2012 01:10 AM, Stephen Warren wrote: From: Gyungoh Yoojack@maxim-ic.com +static int max8907_irq_set_wake(struct irq_data *data, unsigned int on) +{ + /* Everything happens in max8907_irq_sync_unlock */ + Probably you need to call the wake_enable of irq which

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Mark Brown
On Thu, Jul 26, 2012 at 04:07:12PM -0600, Stephen Warren wrote: > On 07/26/2012 02:35 PM, Mark Brown wrote: > > On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: > >> + if (irqd_is_wakeup_set(d)) { > >> + /* 1 -- disable, 0 -- enable */ > >> +

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Stephen Warren
On 07/26/2012 02:35 PM, Mark Brown wrote: > On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: >> +if (irqd_is_wakeup_set(d)) { >> +/* 1 -- disable, 0 -- enable */ >> +switch (irq_data->mask_reg) { > > This loop we should just port

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Mark Brown
On Thu, Jul 26, 2012 at 03:14:21PM -0600, Stephen Warren wrote: > On 07/26/2012 02:35 PM, Mark Brown wrote: > > This looks very suspicious... why do we need to call > > irqd_irq_disabled() here? > I believe the status register reflects the unmasked status, it's just > the interrupt signal

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Stephen Warren
On 07/26/2012 02:35 PM, Mark Brown wrote: > On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: >> +if (!irqd_irq_disabled(d) && (value & irq_data->offs)) { > > This looks very suspicious... why do we need to call > irqd_irq_disabled() here? I believe the status

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Mark Brown
On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: > +struct max8907_irq_data { > + int reg; > + int mask_reg; > + int offs; /* bit offset in mask register */ > + boolis_rtc; > +}; This (and all the code in here) looks very much like

[PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Stephen Warren
From: Gyungoh Yoo The MAX8907 is an I2C-based power-management IC containing voltage regulators, a reset controller, a real-time clock, and a touch-screen controller. The original driver was written by: * Gyungoh Yoo Various fixes and enhancements by: * Jin Park * Tom Cherry * Prashant

[PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Stephen Warren
From: Gyungoh Yoo jack@maxim-ic.com The MAX8907 is an I2C-based power-management IC containing voltage regulators, a reset controller, a real-time clock, and a touch-screen controller. The original driver was written by: * Gyungoh Yoo jack@maxim-ic.com Various fixes and enhancements by:

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Mark Brown
On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: +struct max8907_irq_data { + int reg; + int mask_reg; + int offs; /* bit offset in mask register */ + boolis_rtc; +}; This (and all the code in here) looks very much like regmap-irq

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Stephen Warren
On 07/26/2012 02:35 PM, Mark Brown wrote: On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: +if (!irqd_irq_disabled(d) (value irq_data-offs)) { This looks very suspicious... why do we need to call irqd_irq_disabled() here? I believe the status register

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Mark Brown
On Thu, Jul 26, 2012 at 03:14:21PM -0600, Stephen Warren wrote: On 07/26/2012 02:35 PM, Mark Brown wrote: This looks very suspicious... why do we need to call irqd_irq_disabled() here? I believe the status register reflects the unmasked status, it's just the interrupt signal that's

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Stephen Warren
On 07/26/2012 02:35 PM, Mark Brown wrote: On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: +if (irqd_is_wakeup_set(d)) { +/* 1 -- disable, 0 -- enable */ +switch (irq_data-mask_reg) { This loop we should just port over into

Re: [PATCH] mfd: add MAX8907 core driver

2012-07-26 Thread Mark Brown
On Thu, Jul 26, 2012 at 04:07:12PM -0600, Stephen Warren wrote: On 07/26/2012 02:35 PM, Mark Brown wrote: On Thu, Jul 26, 2012 at 01:40:30PM -0600, Stephen Warren wrote: + if (irqd_is_wakeup_set(d)) { + /* 1 -- disable, 0 -- enable */ + switch