Re: [PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source

2012-08-14 Thread Zhao Chenhui
On Sat, Aug 11, 2012 at 08:19:43AM -0500, Tabi Timur-B04825 wrote: On Tue, Aug 7, 2012 at 3:43 AM, Zhao Chenhui chenhui.z...@freescale.com wrote: + return -EINVAL; + + prop = of_get_property(clk_np, fsl,pmcdr-mask, NULL); + if (!prop) { + ret

Re: [PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source

2012-08-14 Thread Zhao Chenhui
On Sat, Aug 11, 2012 at 08:19:43AM -0500, Tabi Timur-B04825 wrote: On Tue, Aug 7, 2012 at 3:43 AM, Zhao Chenhui chenhui.z...@freescale.com wrote: +int mpc85xx_pmc_set_wake(struct device *dev, bool enable) +{ + int ret = 0; + struct device_node *clk_np; + const u32

Re: [PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source

2012-08-14 Thread Tabi Timur-B04825
Zhao Chenhui wrote: +#ifdef CONFIG_FSL_PMC +extern int mpc85xx_pmc_set_wake(struct device *dev, bool enable); +extern void mpc85xx_pmc_set_lossless_ethernet(int enable); Don't use 'extern' for functions. Why? I think there is no difference. It's unnecessary, and it makes the line

Re: [PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source

2012-08-11 Thread Tabi Timur-B04825
On Tue, Aug 7, 2012 at 3:43 AM, Zhao Chenhui chenhui.z...@freescale.com wrote: +int mpc85xx_pmc_set_wake(struct device *dev, bool enable) +{ + int ret = 0; + struct device_node *clk_np; + const u32 *prop; + u32 pmcdr_mask; + + if (!pmc_regs) { +

[PATCH 2/4] fsl_pmc: Add API to enable device as wakeup event source

2012-08-07 Thread Zhao Chenhui
Add APIs for setting wakeup source and lossless Ethernet in low power modes. These APIs can be used by wake-on-packet feature. Signed-off-by: Dave Liu dave...@freescale.com Signed-off-by: Li Yang le...@freescale.com Signed-off-by: Jin Qing b24...@freescale.com Signed-off-by: Zhao Chenhui