Re: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-20 Thread Pavel Machek
Hi! > > > > You are right, but the current code is "interesting". What about > > > > > > > > ws = NULL; > > > > while (ws = wakeup_source_get_next(NULL)) ... > > > > > > > > then? > > > > > > Did you mean: > > > ws = NULL; > > > while (ws = wakeup_source_get_next(ws)) ... > > >

RE: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-20 Thread Ran Wang
Hi Pavel, On Monday, May 20, 2019 17:08 Pavel Machek wrote: > > > Hi! > > > > > > > > > +static int rcpm_pm_prepare(struct device *dev) { > > > > > > + struct device_node *np = dev->of_node; > > > > > > + struct wakeup_source *ws; > > > > > > + struct rcpm *rcpm; > > > > > > + u32

Re: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-20 Thread Pavel Machek
On Mon 2019-05-20 09:03:50, Ran Wang wrote: > Hi Pavel, > > On Monday, May 20, 2019 16:57, Pavel Machek wrote: > > > > Hi! > > > > > > > +static int rcpm_pm_prepare(struct device *dev) { > > > > > + struct device_node *np = dev->of_node; > > > > > + struct wakeup_source *ws; > > > > > +

RE: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-20 Thread Ran Wang
Hi Pavel, On Monday, May 20, 2019 16:57, Pavel Machek wrote: > > Hi! > > > > > +static int rcpm_pm_prepare(struct device *dev) { > > > > + struct device_node *np = dev->of_node; > > > > + struct wakeup_source *ws; > > > > + struct rcpm *rcpm; > > > > + u32

Re: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-20 Thread Pavel Machek
Hi! > > > +static int rcpm_pm_prepare(struct device *dev) { > > > + struct device_node *np = dev->of_node; > > > + struct wakeup_source *ws; > > > + struct rcpm *rcpm; > > > + u32 value[RCPM_WAKEUP_CELL_MAX_SIZE + 1], tmp; > > > + int i, ret; > > > + > > > + rcpm = dev_get_drvdata(dev); > > > +

RE: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-20 Thread Ran Wang
Hi Pavel, On Monday, May 20, 2019 05:39, Pavel Machek wrote: > > Hi! > > > > + > > +struct rcpm { > > + unsigned int wakeup_cells; > > + void __iomem *ippdexpcr_base; > > + boollittle_endian; > > +}; > > Inconsistent whitespace OK, will make them aligned. > > > +static int

Re: [PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-19 Thread Pavel Machek
Hi! > + > +struct rcpm { > + unsigned int wakeup_cells; > + void __iomem *ippdexpcr_base; > + boollittle_endian; > +}; Inconsistent whitespace > +static int rcpm_pm_prepare(struct device *dev) > +{ > + struct device_node *np = dev->of_node; > + struct wakeup_source

[PATCH V2 3/3] soc: fsl: add RCPM driver

2019-05-16 Thread Ran Wang
The NXP's QorIQ Processors based on ARM Core have RCPM module (Run Control and Power Management), which performs all device-level tasks associated with power management such as wakeup source control. This driver depends on PM wakeup source framework which help to collect wake information.