Re: [PATCH 5/7] mfd: twl4030-power: Add support for board specific configuration

2014-05-20 Thread Lee Jones
On Tue, 13 May 2014, Tony Lindgren wrote:

 With the recommended twl4030 configuration added, we can now add
 board specific changes as modifications to the recommended
 configuration.
 
 Note that the data is private to this driver, and the data must
 always have a NULL resource in the sentinel.
 
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Lee Jones lee.jo...@linaro.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  drivers/mfd/twl4030-power.c | 21 +
  include/linux/i2c/twl.h |  1 +
  2 files changed, 22 insertions(+)

Ah, I forgot to Ack this last time, didn't I?

  Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Lee Jones
   Looks like we can still hit the issue of wrong load order of
   twl4030 configuration. If we have a sleep configuration loaded,
   and do a warm reset, the device can hang while initializing the
   wakeup12 sequence. We do have a warning message about wrong order
   of twl4030 configuration, but in this case it does not help as
   the sleep configuration was loaded during the previous boot and
   the state of twl4030 is maintained throughout the warm reset.
   
   Fix the issue by clearing any existing sleep configuration
   before we load the warm reset configuration.
   
   Cc: Peter Ujfalusi peter.ujfal...@ti.com
   Signed-off-by: Tony Lindgren t...@atomide.com
   ---
drivers/mfd/twl4030-power.c | 6 ++
1 file changed, 6 insertions(+)
  
  Can't vouch for the semantics of the patch, but the code looks good.
  
Acked-by: Lee Jones lee.jo...@linaro.org
  
  Can I just apply this, or would you like Peter to review it first?
 
 As far as I'm concerned you can go ahead an apply, it's been
 floating on the list for a while and Peter is probably busy
 with other things.

No problem.  Just a couple of things for you to look at in the other
patches, then we can go ahead and apply for v3.16.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/7] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

2014-05-20 Thread Lee Jones
 Looks like we can still hit the issue of wrong load order of
 twl4030 configuration. If we have a sleep configuration loaded,
 and do a warm reset, the device can hang while initializing the
 wakeup12 sequence. We do have a warning message about wrong order
 of twl4030 configuration, but in this case it does not help as
 the sleep configuration was loaded during the previous boot and
 the state of twl4030 is maintained throughout the warm reset.
 
 Fix the issue by clearing any existing sleep configuration
 before we load the warm reset configuration.
 
 Cc: Peter Ujfalusi peter.ujfal...@ti.com
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  drivers/mfd/twl4030-power.c | 6 ++
  1 file changed, 6 insertions(+)

Can't vouch for the semantics of the patch, but the code looks good.

  Acked-by: Lee Jones lee.jo...@linaro.org

Can I just apply this, or would you like Peter to review it first?
   
   As far as I'm concerned you can go ahead an apply, it's been
   floating on the list for a while and Peter is probably busy
   with other things.
  
  No problem.  Just a couple of things for you to look at in the other
  patches, then we can go ahead and apply for v3.16.
 
 OK thanks yeah saw those. Will fix them up and test today. Then
 maybe you can apply them to the immutable branch we set earlier
 or I can send you a pull request against that branch whichever
 you prefer.

Probably be easier if I update and re-tag the original one.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] backlight: gpio-backlight: Fix warning when the GPIO is on a I2C chip

2014-05-19 Thread Lee Jones
 If the GPIO for the backlight is on an I2C chip, we currently
 get nasty warnings like this during the boot:
 
 WARNING: CPU: 0 PID: 6 at drivers/gpio/gpiolib.c:2364 
 gpiod_set_raw_value+0x40/0x4c()
 Modules linked in:
 CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.15.0-rc4-12393-gcde9f4e #400
 Workqueue: deferwq deferred_probe_work_func
 [c0014cbc] (unwind_backtrace) from [c001191c] (show_stack+0x10/0x14)
 [c001191c] (show_stack) from [c0566ae0] (dump_stack+0x80/0x9c)
 [c0566ae0] (dump_stack) from [c003f61c] (warn_slowpath_common+0x68/0x8c)
 [c003f61c] (warn_slowpath_common) from [c003f65c] 
 (warn_slowpath_null+0x1c/0x24)
 [c003f65c] (warn_slowpath_null) from [c02f7e10] 
 (gpiod_set_raw_value+0x40/0x4c)
 [c02f7e10] (gpiod_set_raw_value) from [c0308fbc] 
 (gpio_backlight_update_status+0x4c/0x74)
 [c0308fbc] (gpio_backlight_update_status) from [c030914c] 
 (gpio_backlight_probe+0x168/0x254)
 [c030914c] (gpio_backlight_probe) from [c0378fa8] 
 (platform_drv_probe+0x18/0x48)
 [c0378fa8] (platform_drv_probe) from [c0377c40] 
 (driver_probe_device+0x10c/0x238)
 [c0377c40] (driver_probe_device) from [c0376330] 
 (bus_for_each_drv+0x44/0x8c)
 [c0376330] (bus_for_each_drv) from [c0377afc] (device_attach+0x74/0x8c)
 [c0377afc] (device_attach) from [c03771c4] (bus_probe_device+0x88/0xb0)
 [c03771c4] (bus_probe_device) from [c03775c8] 
 (deferred_probe_work_func+0x64/0x94)
 [c03775c8] (deferred_probe_work_func) from [c00572e8] 
 (process_one_work+0x1b4/0x4bc)
 [c00572e8] (process_one_work) from [c00579d0] (worker_thread+0x11c/0x398)
 [c00579d0] (worker_thread) from [c005dfd8] (kthread+0xc8/0xe4)
 [c005dfd8] (kthread) from [c000e768] (ret_from_fork+0x14/0x2c)
 
 Fix this by using gpio_set_value_cansleep() as suggested in
 drivers/gpio/gpiolib.c:2364. This is what the other backlight drivers
 are also doing.
 
 Signed-off-by: Tony Lindgren t...@atomide.com

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl6040: Correct HPPLL configuration for 19.2 and 38.4 MHz mclk

2014-05-09 Thread Lee Jones
 When the MCLK is 19.2 or 38.4 MHz the HPPLL need to be enabled and can be
 put in bypass mode.
 This will fix HPPLL use on boards with 19.2MHz mclk.
 
 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 ---
  drivers/mfd/twl6040.c | 13 +
  1 file changed, 5 insertions(+), 8 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND 1/3] mfd: twl6040: Select i2c fast mode as default with regmap patch

2014-04-28 Thread Lee Jones
 All boards using twl6040 configures the i2c bus to 400KHz. While twl6040's
 defaults to normal mode (100KHz). So far twl6040 has no problem with i2c
 communication in this configuration it is safer to select fast i2c mode.
 
 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 ---
  drivers/mfd/twl6040.c   | 9 +++--
  include/linux/mfd/twl6040.h | 1 +
  2 files changed, 8 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND 2/3] mfd: twl6040: Move register patching earlier in probe

2014-04-28 Thread Lee Jones
 Make sure that we patch the ACCCTL register as the first thing when the
 driver loads, thus configuring I2C fast mode and i2c access for dual access
 registers.
 
 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 ---
  drivers/mfd/twl6040.c | 7 +++
  1 file changed, 3 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND 3/3] mfd: twl6040: Clear the interrupt ID register before requesting IRQ

2014-04-28 Thread Lee Jones
 If for some reason the boot loader enabled the audpwron GPIO we will have
 pending IRQs to be handled. This seams to break twl6040 for some reason
 leading to non working i2c communication (i2c timeouts). Clearing the INTID
 register after we requested the audpwron GPIO (and set it to low) will
 ensure that the chip will operate normally in this case as well.
 
 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 ---
  drivers/mfd/twl6040.c | 3 +++
  1 file changed, 3 insertions(+)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1a/4] mfd: twl4030-power: Add generic reset configuration

2014-04-28 Thread Lee Jones
 The twl4030 PMIC needs to be configured properly for things like
 warm reset and deeper idle states so the PMIC manages the regulators
 properly based on the hardware triggers from the SoC.
 
 For example, when rebooting an OMAP3530 at 125 MHz, it hangs.
 With this patch, TWL4030 will be reset when a warm reset occures.
 This way the OMAP3530 does not hang on reboot.
 
 Let's use this as the default when compatible = ti,twl4030-power.
 Other more complicated configurations can be added to the driver
 based on other compatible flags.
 
 Based on earlier patch by Matthias Brugger matthias@gmail.com:
 
 http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/144161.html
 
 For more information about twl4030 configuration for the
 power scripts see:
 
 http://www.omappedia.com/wiki/TWL4030_power_scripts
 
 Cc: Matthias Brugger matthias@gmail.com
 Cc: Robert Nelson robertcnel...@gmail.com
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Lee Jones lee.jo...@linaro.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 
 ---
 
 Sorry this got accidentally left out, should be the first patch
 in the series.
 
 diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt 
 b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
 index 8e15ec3..b906116 100644
 --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
 +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
 @@ -5,7 +5,12 @@ to control the power resources, including power scripts. For 
 now, the
  binding only supports the complete shutdown of the system after poweroff.
  
  Required properties:
 -- compatible : must be ti,twl4030-power
 +- compatible : must be one of the following
 + ti,twl4030-power
 + ti,twl4030-power-reset
 +

I think it'll be sensible to wait for a DT Ack for this kind of
change.


 +#ifdef CONFIG_OF
 +
 +/* Generic warm reset configuration for omap3 */
 +
 +static struct twl4030_ins omap3_wrst_seq[] = {
 + { MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2 },
 + { MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15 },
 + { MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15 },
 + { MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60 },
 + { MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2 },
 + { MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2 },
 +};

Nit: I'd prefer the number formatting to be unified here i.e. all in
the same base, all 0x10 with leading zero.
 
 +static struct twl4030_script omap3_wrst_script = {
 + .script = omap3_wrst_seq,
 + .size   = ARRAY_SIZE(omap3_wrst_seq),
 + .flags  = TWL4030_WRST_SCRIPT,
 +};
 +
 +static struct twl4030_script *omap3_reset_scripts[] = {
 + omap3_wrst_script,
 +};
 +
 +static struct twl4030_resconfig omap3_rconfig[] = {
 + { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3, .type = -1,
 +   .type2 = -1 },
 + { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1,
 +   .type2 = -1 },
 + { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1,
 +   .type2 = -1 },
 + { 0, 0},
 +};

Nit: May be just my OCD, but this looks a little messy. Perhaps a
simple MACRO might tidy things up, although that seems a little
over-kill for such a small sturct[]. At the very least least please
even up the brackets in the sentinel.

/me goes to organise his soup tins into alphabetical order.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: twl4030-power: Add recommended idle configuration

2014-04-28 Thread Lee Jones
 These settings are based on the Recommended Sleep Sequences for
 the Zoom Platform pdf at:
 
 http://omappedia.com/wiki/File:Recommended_Sleep_Sequences_Zoom.pdf
 
 These settings assume most of the regulators are under control of
 Linux, and cuts off VDD1 and VDD2 during off-idle as Linux cannot
 do it.

Linux does it becuase Linux can't do it. Eh?

 For any board specific changes to these, let's patch them in as
 changes to the generic data in the follow-up patches. This keeps
 the board specific changes small.
 
 Note that this does not consider the twl5030 errata 27. That
 can be added later on after it has been tested.
 
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Lee Jones lee.jo...@linaro.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  .../devicetree/bindings/mfd/twl4030-power.txt  |   4 +
  drivers/mfd/twl4030-power.c| 165 
 +

driver/mfd changes look good to me:
  Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/4] mfd: twl4030-power: Add support for board specific configuration

2014-04-28 Thread Lee Jones
 With the recommended twl4030 configuration added, we can now add
 board specific changes as modifications to the recommended
 configuration.
 
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Lee Jones lee.jo...@linaro.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  drivers/mfd/twl4030-power.c | 21 +
  include/linux/i2c/twl.h |  1 +
  2 files changed, 22 insertions(+)
 
 diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
 index 89a8528..89c6b1a 100644
 --- a/drivers/mfd/twl4030-power.c
 +++ b/drivers/mfd/twl4030-power.c
 @@ -511,13 +511,34 @@ twl4030_power_configure_scripts(const struct 
 twl4030_power_data *pdata)
   return 0;
  }
  
 +static void twl4030_patch_rconfig(struct twl4030_resconfig *common,
 +   struct twl4030_resconfig *board)
 +{
 + while (common-resource) {
 + struct twl4030_resconfig *b = board;
 +
 + while (b-resource) {
 + if (b-resource == common-resource) {
 + *common = *b;
 + break;
 + }
 + b++;
 + }
 + common++;
 + }
 +}

Forgive my ignorance, as I don't know how 'common' is setup, but we
appear to move to the next 'common' reference them immediately
dereference it without checking to see if it actually exists. Same
with 'b'. What happens if we reach the end of the array? NULL
dereference or does the final element always have a NULLed resource
attribute?

  static int
  twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
  {
   struct twl4030_resconfig *resconfig = pdata-resource_config;
 + struct twl4030_resconfig *boardconf = pdata-board_config;
   int err;
  
   if (resconfig) {
 + if (boardconf)
 + twl4030_patch_rconfig(resconfig, boardconf);
 +
   while (resconfig-resource) {
   err = twl4030_configure_resource(resconfig);
   if (err)
 diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
 index ade1c06..069f78f 100644
 --- a/include/linux/i2c/twl.h
 +++ b/include/linux/i2c/twl.h
 @@ -659,6 +659,7 @@ struct twl4030_power_data {
   struct twl4030_script **scripts;
   unsigned num;
   struct twl4030_resconfig *resource_config;
 + struct twl4030_resconfig *board_config;
  #define TWL4030_RESCONFIG_UNDEF  ((u8)-1)
   bool use_poweroff;  /* Board is wired for TWL poweroff */
  };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] mfd: twl4030power: Add a configuration to turn off oscillator during off-idle

2014-04-28 Thread Lee Jones
 Some oscillators can be turned off during off-idle saving few
 a little bit power at the cost of the oscillator start up
 latency.
 
 If you board can do this, you can now enable it by using the
 ti,twl4030-power-idle-osc-off compatible flag.
 
 Cc: Peter De Schrijver pdeschrij...@nvidia.com
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Lee Jones lee.jo...@linaro.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  .../devicetree/bindings/mfd/twl4030-power.txt |  6 ++
  drivers/mfd/twl4030-power.c   | 19 
 +++

Code in drivers/mfd looks scruffy but fine:
  Acked-by: Lee Jones lee.jo...@linaro.org


-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: twl4030-power: Add recommended idle configuration

2014-04-28 Thread Lee Jones
On Mon, 28 Apr 2014, Tony Lindgren wrote:

 * Lee Jones lee.jo...@linaro.org [140428 04:42]:
   These settings are based on the Recommended Sleep Sequences for
   the Zoom Platform pdf at:
   
   http://omappedia.com/wiki/File:Recommended_Sleep_Sequences_Zoom.pdf
   
   These settings assume most of the regulators are under control of
   Linux, and cuts off VDD1 and VDD2 during off-idle as Linux cannot
   do it.
  
  Linux does it becuase Linux can't do it. Eh?
 
 Heh yeah that's confusing, will update to:
 
 These settings assume most of the regulators are under control of
 Linux, and twl4030 only cuts off VDD1 and VDD2 during off-idle as
 Linux cannot do it.

+1, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GIT PULL] arm: omap: Immutable branch between MFD and ARM OMAP due for the v3.16 merge-window

2014-04-23 Thread Lee Jones
Hi Tony,

Sorry for the delay - I've been snowed under recently.

As requested, you patch based on v3.14 ( for some reason :) ).

The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:

  Linux 3.14 (2014-03-30 20:40:15 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git 
tags/ib-mfd-omap-3.16

for you to fetch changes up to a613b739b8c08eab811e677810045cc0522fc3e6:

  mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree 
(2014-04-23 15:31:05 +0100)


Immutable branch between MFD and ARM OMAP due for v3.16 merge-window.


Tony Lindgren (1):
  mfd: twl-core: Fix idle mode signaling for omaps when booted with device 
tree

 arch/arm/mach-omap2/omap_twl.c | 60 

 drivers/mfd/twl-core.c | 15 +++
 2 files changed, 15 insertions(+), 60 deletions(-)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/11] mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree

2014-04-17 Thread Lee Jones
 I noticed a regression where the omap sys_clkreq signal will never
 trigger for omap3 when booted with device tree while it triggers
 when booted in legacy mode. This means voltage scaling does not
 do anything when booted with device tree.
 
 Turns out the reason is we fail to initialize the SmartReflex
 enable bit in twl4030 with the following error:
 
 twl: not initialized
 
 And that happens because we are wrongly tinkering with the twl4030
 registers in arch/arm/mach-omap2/omap_twl.c before the driver is
 initialized. Looking at the the SmartReflex bit enable code in
 omap_twl.c, we need to always set it.
 
 So let's fix the issue by always enabling the twl4030 SmartReflex
 bit in the drivers/mfd/twl-core.c probe, and drop the related
 code in omap_twl.c.
 
 Note that we still have some twl4030 tinkering left in omap_twl.c
 for the twl6030 case, but that's a different patch.
 
 Cc: Kevin Hilman khil...@linaro.org
 Cc: Lee Jones lee.jo...@linaro.org
 Cc: Nishanth Menon n...@ti.com
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Paul Walmsley p...@pwsan.com
 Cc: Tero Kristo t-kri...@ti.com
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  arch/arm/mach-omap2/omap_twl.c | 60 
 --
  drivers/mfd/twl-core.c | 15 +++
  2 files changed, 15 insertions(+), 60 deletions(-)

Patch looks okay to me, and removes lots of code which is nice to
see. How do you want to handle this patch? How about if I set up an
MFD-OMAP immutable branch for us to use leading up to the v3.16 merge
window?

Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Fix accessibility of some twl4030 audio registers

2014-03-18 Thread Lee Jones
   There are some unused registers in twl4030 at I2C address 0x49 and 
   function
   twl4030_49_nop_reg() is used to check accessibility of that registers. 
   These
   registers are written in decimal format but the values are correct in
   hexadecimal format. (It can be checked few lines above the patched code -
   these registers are marked as unused there.)
   
   As a consequence three registers of audio submodule are treated as
   inaccessible (preamplifier carkit right and both handsfree registers).
   
   CC: Peter Ujfalusi peter.ujfal...@ti.com
   Signed-off-by: Tomas Novotny to...@novotny.cz
   ---
drivers/mfd/twl-core.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
   
   diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
   index ed71832..e87140b 100644
   --- a/drivers/mfd/twl-core.c
   +++ b/drivers/mfd/twl-core.c
   @@ -282,11 +282,11 @@ static struct reg_default twl4030_49_defaults[] = {
static bool twl4030_49_nop_reg(struct device *dev, unsigned int reg)
{
 switch (reg) {
   - case 0:
   - case 3:
   - case 40:
   - case 41:
   - case 42:
   + case 0x00:
   + case 0x03:
   + case 0x40:
   + case 0x41:
   + case 0x42:
  
  Uhm, I can not be that @#$%^ that I did this... I have no idea how I left 
  out
  the 0x
  
  Thanks for spotting it!
  
  Acked-by Peter Ujfalusi peter.ujfal...@ti.com
 
 Peter, if this does not make it to the -rc series, care to send this to
 the stable for inclusion after it hits mainline?
 
 This fixes twl4030 audio regression at least on boards using HandsfreeL
 for audio.

I think it's a little late in the cycle to send this to the -rcs.

Stable will be Cc'ed however.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 0/9] USB Host support for OMAP5 uEVM

2014-03-13 Thread Lee Jones
   That does mean I need a) all of the Maintainer Acks and b) you to tell
   me which ones need to go through a single tree.
  
  You need to take patches 1 to 6 in the MFD tree. Out of these, patches 1 to 
  4
  need to be shared with Tony as an immutable branch.
  
  Tony, could you please Ack patches 1 to 4? Thanks.
 
 Changes in 1 to 6 look OK to me, so for those please feel free to add:
 
 Acked-by: Tony Lindgren t...@atomide.com

The following changes since commit 0414855fdc4a40da05221fc6062cccbc0c30f169:

  Linux 3.14-rc5 (2014-03-02 18:56:16 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-omap

for you to fetch changes up to 2e1b365cea4a0a750b8ffd4bc6ca5e9e8020f53e:

  mfd: omap-usb-tll: Update DT clock binding information (2014-03-13 22:27:17 
+)


Colin Ian King (1):
  mfd: omap-usb-tll: Fix cppcheck sizeof warning

Roger Quadros (7):
  mfd: omap-usb-host: Use resource managed clk_get()
  mfd: omap-usb-host: Get clocks based on hardware revision
  mfd: omap-usb-host: Always fail on clk_get() error
  mfd: omap-usb-host: Use proper clock name instead of alias
  mfd: omap-usb-host: Use clock names as per function for reference clocks
  mfd: omap-usb-host: Update DT clock binding information
  mfd: omap-usb-tll: Update DT clock binding information

 Documentation/devicetree/bindings/mfd/omap-usb-host.txt |  23 ++
 Documentation/devicetree/bindings/mfd/omap-usb-tll.txt  |  10 ++
 arch/arm/boot/dts/omap4.dtsi|   6 
 arch/arm/boot/dts/omap5.dtsi|   6 
 arch/arm/mach-omap2/cclock3xxx_data.c   |   4 ---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c  |   6 
 drivers/clk/ti/clk-3xxx.c   |   4 ---
 drivers/mfd/omap-usb-host.c | 189 
+--
 drivers/mfd/omap-usb-tll.c  |   2 +-
 9 files changed, 136 insertions(+), 114 deletions(-)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Fix accessibility of some twl4030 audio registers

2014-03-11 Thread Lee Jones
 There are some unused registers in twl4030 at I2C address 0x49 and function
 twl4030_49_nop_reg() is used to check accessibility of that registers. These
 registers are written in decimal format but the values are correct in
 hexadecimal format. (It can be checked few lines above the patched code -
 these registers are marked as unused there.)
 
 As a consequence three registers of audio submodule are treated as
 inaccessible (preamplifier carkit right and both handsfree registers).
 
 CC: Peter Ujfalusi peter.ujfal...@ti.com
 Signed-off-by: Tomas Novotny to...@novotny.cz
 ---
  drivers/mfd/twl-core.c | 10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Fix accessibility of some twl4030 audio registers

2014-03-11 Thread Lee Jones
 There are some unused registers in twl4030 at I2C address 0x49 and function
 twl4030_49_nop_reg() is used to check accessibility of that registers. These
 registers are written in decimal format but the values are correct in
 hexadecimal format. (It can be checked few lines above the patched code -
 these registers are marked as unused there.)
 
 As a consequence three registers of audio submodule are treated as
 inaccessible (preamplifier carkit right and both handsfree registers).
 
 CC: Peter Ujfalusi peter.ujfal...@ti.com
 Signed-off-by: Tomas Novotny to...@novotny.cz
 ---
  drivers/mfd/twl-core.c | 10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

In future, please don't forget to CC LKML.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 0/9] USB Host support for OMAP5 uEVM

2014-03-11 Thread Lee Jones
  Hi,
  
  This patchset brings up USB Host ports and Ethernet port on
  the OMAP5 uEVM board.
  
  It also does some cleanup with respect to DT clock binding
  for the mfd/omap-usb-host driver.
  
  Please queue these for -next.
  
  Lee,
  
  I've folded some platform data dependent patches with mfd patches
  so that they don't break functionality when applied individually.
  You can safely pull in all MFD patches (1 to 6).
  
  Tony  Benoit,
  
  Can you please accept patches 7, 8 and 9?
 
 Tony has already picked up 7,8 and 9 through omap-soc tree.
 
 Since you acked most patches except 5 and 6, are you fine if Tony takes
 all the patches 1 to 4 in this series via omap-soc tree?
 
 What about patches 5 and 6?

Any patches which are orthogonal can just be sucked into whichever tree
they belong in. If there are inter-subsystem dependencies I'd prefer
to take them and issue a immutable branch pull-request to the other
maintainers.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 0/9] USB Host support for OMAP5 uEVM

2014-03-11 Thread Lee Jones

  This patchset brings up USB Host ports and Ethernet port on
  the OMAP5 uEVM board.
 
  It also does some cleanup with respect to DT clock binding
  for the mfd/omap-usb-host driver.
 
  Please queue these for -next.
 
  Lee,
 
  I've folded some platform data dependent patches with mfd patches
  so that they don't break functionality when applied individually.
  You can safely pull in all MFD patches (1 to 6).
 
  Tony  Benoit,
 
  Can you please accept patches 7, 8 and 9?
 
  Tony has already picked up 7,8 and 9 through omap-soc tree.
 
  Since you acked most patches except 5 and 6, are you fine if Tony takes
  all the patches 1 to 4 in this series via omap-soc tree?
 
  What about patches 5 and 6?
  
  Any patches which are orthogonal can just be sucked into whichever tree
  they belong in. If there are inter-subsystem dependencies I'd prefer
  to take them and issue a immutable branch pull-request to the other
  maintainers.
  
 Awesome. That would be great, thanks.

That does mean I need a) all of the Maintainer Acks and b) you to tell
me which ones need to go through a single tree.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv8 0/4] power_supply: Introduce power supply charging driver

2014-03-10 Thread Lee Jones
Hi Jenny,

Would you mind _not_ CC'ing me on all of your emails please?

I have enough _relevant_ email to deal with already without seeing
this churn constantly.

Thanks in advance.

 v1: introduced feature as a framework within power supply class driver with
   separate files for battid framework and charging framework
 v2: fixed review comments, moved macros and inline functions to power_supply.h
 v3: moved the feature as a separate driver, combined battid framework and
   charging framework inside the power supply charging driver. Moved
   charger specific properties to power_supply_charger.h and plugged the
   driver with power supply subsystem using power_supply_notifier
   introduced in my previous patch. Also a sample charger chip driver
   (bq24261) patch added to give more idea on the psy charging driver
   usage
 v4: Fixed review comments, no major design changes.
 v5: Fixed makefile inconsistencies, removed unused pdata callbacks
 v6: Fixed nested loops, commenting style
 v7: added kerneldocs for structs and minor fixes
 v8: used msecs_to_jiffies instead of HZ directly, modified Kconfig help text
 for POWER_SUPPLY_CHARGING_ALGO_PSE
 
 The Power Supply charging driver connects multiple subsystems
 to do charging in a generic way. The subsystems involves power_supply,
 thermal and battery communication subsystems (1wire).With this the charging is
 handled in a generic way.
 
 The driver makes use of different new features - Battery Identification
 interfaces, pluggable charging algorithms, charger cable arbitrations etc.
 The patch also introduces generic interface for charger cable notifications.
 Charger cable events and capabilities can be notified using the generic
 power_supply_notifier chain.
 
 Overall this driver removes the charging logic out of the charger chip driver
 and the charger chip driver can just listen to the request from the power
 supply charging driver to set the charger properties. This can be implemented
 by exposing get_property and set property callbacks.
 
 Jenny TC (4):
   power_supply: Add inlmt,iterm, min/max temp props
   power_supply: Introduce generic psy charging driver
   power_supply: Introduce PSE compliant algorithm
   power_supply: bq24261 charger driver
 
  Documentation/power/power_supply_charger.txt |  353 +++
  Documentation/power/power_supply_class.txt   |6 +
  drivers/power/Kconfig|   31 +
  drivers/power/Makefile   |3 +
  drivers/power/bq24261-charger.c  | 1350 
 ++
  drivers/power/charging_algo_pse.c|  204 
  drivers/power/power_supply_charger.c | 1186 ++
  drivers/power/power_supply_charger.h |  218 +
  drivers/power/power_supply_core.c|3 +
  drivers/power/power_supply_sysfs.c   |4 +
  include/linux/power/bq24261-charger.h|   25 +
  include/linux/power/power_supply_charger.h   |  341 +++
  include/linux/power_supply.h |  164 
  13 files changed, 3888 insertions(+)
  create mode 100644 Documentation/power/power_supply_charger.txt
  create mode 100644 drivers/power/bq24261-charger.c
  create mode 100644 drivers/power/charging_algo_pse.c
  create mode 100644 drivers/power/power_supply_charger.c
  create mode 100644 drivers/power/power_supply_charger.h
  create mode 100644 include/linux/power/bq24261-charger.h
  create mode 100644 include/linux/power/power_supply_charger.h
 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 1/9] mfd: omap-usb-host: Get clocks based on hardware revision

2014-03-10 Thread Lee Jones
 Not all revisions have all the clocks so get the necessary clocks
 based on hardware revision.
 
 This should avoid un-necessary clk_get failure messages that were
 observed earlier.
 
 Also remove the dummy USB host clocks from the OMAP3 clock data.
 These are no longer expected by the driver.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 CC: Tero Kristo t-kri...@ti.com
 Acked-by: Mike Turquette mturque...@linaro.org [OMAP3 CLK data]
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  arch/arm/mach-omap2/cclock3xxx_data.c |  4 
  drivers/clk/ti/clk-3xxx.c |  4 
  drivers/mfd/omap-usb-host.c   | 43 
 ++-
  3 files changed, 32 insertions(+), 19 deletions(-)

Patches starting to take shape. I know that I've reviewed this patch
before, so if you've fixed-up all my previous comments you can have my
Ack for the MFD changes:
  Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 2/9] mfd: omap-usb-host: Always fail on clk_get() error

2014-03-10 Thread Lee Jones
 Be more strict and always fail on clk_get() error.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 62 
 +
  1 file changed, 40 insertions(+), 22 deletions(-)

I like to principle of the patch assuming that the devices would be
useless without their clocks.

Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 3/9] mfd: omap-usb-host: Use proper clock name instead of alias

2014-03-10 Thread Lee Jones
 Use the proper clock name 'usbhost_120m_fck' instead of the
 alias 'ehci_logic_fck'
 
 Get rid of the 'ehci_logic_fck' alias from the OMAP3 hwmod data
 as well.
 
 CC: Paul Walmsley p...@pwsan.com
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 --
  drivers/mfd/omap-usb-host.c| 5 +++--
  2 files changed, 3 insertions(+), 8 deletions(-)

So long as the platform guys are okay with the semantic change, the
MFD diff looks okay to me. For the MFD changes:
  Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 4/9] mfd: omap-usb-host: Use clock names as per function for reference clocks

2014-03-10 Thread Lee Jones
 Use a meaningful name for the reference clocks so that it indicates the 
 function.
 
 Update the OMAP4+ USB Host node as well to be in sync with the changes.
 
 CC: Benoît Cousson bcous...@baylibre.com
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  arch/arm/boot/dts/omap4.dtsi |  6 ++
  arch/arm/boot/dts/omap5.dtsi |  6 ++
  drivers/mfd/omap-usb-host.c  | 12 ++--
  3 files changed, 18 insertions(+), 6 deletions(-)

The code looks fine and I queried the name change semantics before and
was satisfied with your answer, so as long as this patch has been
tested and nothing is broken:
  Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 03/14] mfd: omap-usb-host: Use clock names as per function for reference clocks

2014-02-25 Thread Lee Jones
 Use a meaningful name for the reference clocks so that it indicates the 
 function.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 12 ++--
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
 index 865c276..651e249 100644
 --- a/drivers/mfd/omap-usb-host.c
 +++ b/drivers/mfd/omap-usb-host.c
 @@ -718,24 +718,24 @@ static int usbhs_omap_probe(struct platform_device 
 *pdev)
   goto err_mem;
   }
  
 - omap-xclk60mhsp1_ck = devm_clk_get(dev, xclk60mhsp1_ck);
 + omap-xclk60mhsp1_ck = devm_clk_get(dev, refclk_60m_ext_p1);
   if (IS_ERR(omap-xclk60mhsp1_ck)) {
   ret = PTR_ERR(omap-xclk60mhsp1_ck);
 - dev_err(dev, xclk60mhsp1_ck failed error:%d\n, ret);
 + dev_err(dev, refclk_60m_ext_p1 failed error:%d\n, ret);
   goto err_mem;
   }

Will anything break if I were to apply the MFD patches seperately?

 - omap-xclk60mhsp2_ck = devm_clk_get(dev, xclk60mhsp2_ck);
 + omap-xclk60mhsp2_ck = devm_clk_get(dev, refclk_60m_ext_p2);
   if (IS_ERR(omap-xclk60mhsp2_ck)) {
   ret = PTR_ERR(omap-xclk60mhsp2_ck);
 - dev_err(dev, xclk60mhsp2_ck failed error:%d\n, ret);
 + dev_err(dev, refclk_60m_ext_p2 failed error:%d\n, ret);
   goto err_mem;
   }
  
 - omap-init_60m_fclk = devm_clk_get(dev, init_60m_fclk);
 + omap-init_60m_fclk = devm_clk_get(dev, refclk_60m_int);
   if (IS_ERR(omap-init_60m_fclk)) {
   ret = PTR_ERR(omap-init_60m_fclk);
 - dev_err(dev, init_60m_fclk failed error:%d\n, ret);
 + dev_err(dev, refclk_60m_int failed error:%d\n, ret);
   goto err_mem;
   }
  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 03/14] mfd: omap-usb-host: Use clock names as per function for reference clocks

2014-02-25 Thread Lee Jones
  Use a meaningful name for the reference clocks so that it indicates the 
  function.
 
  CC: Lee Jones lee.jo...@linaro.org
  CC: Samuel Ortiz sa...@linux.intel.com
  Signed-off-by: Roger Quadros rog...@ti.com
  ---
   drivers/mfd/omap-usb-host.c | 12 ++--
   1 file changed, 6 insertions(+), 6 deletions(-)
 
  diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
  index 865c276..651e249 100644
  --- a/drivers/mfd/omap-usb-host.c
  +++ b/drivers/mfd/omap-usb-host.c
  @@ -718,24 +718,24 @@ static int usbhs_omap_probe(struct platform_device 
  *pdev)
 goto err_mem;
 }
   
  -  omap-xclk60mhsp1_ck = devm_clk_get(dev, xclk60mhsp1_ck);
  +  omap-xclk60mhsp1_ck = devm_clk_get(dev, refclk_60m_ext_p1);
 if (IS_ERR(omap-xclk60mhsp1_ck)) {
 ret = PTR_ERR(omap-xclk60mhsp1_ck);
  -  dev_err(dev, xclk60mhsp1_ck failed error:%d\n, ret);
  +  dev_err(dev, refclk_60m_ext_p1 failed error:%d\n, ret);
 goto err_mem;
 }
  
  Will anything break if I were to apply the MFD patches seperately?
  
 
 Nothing will break for OMAP3, but OMAP4 USB host will break (e.g. Panda 
 board).
 OMAP5 USB host was never working so it doesn't matter there.
 
 To make sure nothing breaks, we need at least these 2 patches to go in 
 together with mfd changes.
 
 [PATCH v8 08/14] ARM: dts: omap4: Update omap-usb-host node
 [PATCH v8 09/14] ARM: dts: omap5: Update omap-usb-host node
 
 Any suggestions about how we can proceed?

Yes, unfortunately you have to squash each of the patches into one
patch. Applying a patch which breaks a build, then applying another one
immediately after which subsequently fixes the break is not an acceptable
way of working I'm afraid. What would happen if we were to fall into
the middle of the two patches when bisecting?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 01/14] mfd: omap-usb-host: Get clocks based on hardware revision

2014-02-25 Thread Lee Jones
 Not all revisions have all the clocks so get the necessary clocks
 based on hardware revision.
 
 This should avoid un-necessary clk_get failure messages that were
 observed earlier.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 43 ---
  1 file changed, 32 insertions(+), 11 deletions(-)

What about patches 1 and 2. Are these safe to go in alone?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 02/14] mfd: omap-usb-host: Always fail on clk_get() error

2014-02-25 Thread Lee Jones
 Be more strict and always fail on clk_get() error.
 
 For OMAP3 platforms, get the 120MHz EHCI clock by its proper name
 'usbhost_120m_fck' instead of its alias 'ehci_logic_fck'.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 65 
 +
  1 file changed, 42 insertions(+), 23 deletions(-)

Appied, thanks.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 02/14] mfd: omap-usb-host: Always fail on clk_get() error

2014-02-25 Thread Lee Jones
On Tue, 25 Feb 2014, Lee Jones wrote:

  Be more strict and always fail on clk_get() error.
  
  For OMAP3 platforms, get the 120MHz EHCI clock by its proper name
  'usbhost_120m_fck' instead of its alias 'ehci_logic_fck'.
  
  CC: Lee Jones lee.jo...@linaro.org
  CC: Samuel Ortiz sa...@linux.intel.com
  Signed-off-by: Roger Quadros rog...@ti.com
  ---
   drivers/mfd/omap-usb-host.c | 65 
  +
   1 file changed, 42 insertions(+), 23 deletions(-)
 
 Appied, thanks.

Won't apply. I guess this depends on the changes made in patch 1.

I'll wait for the next drop.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] mfd: twl6040: Check for error when reading revision register

2014-02-25 Thread Lee Jones
 We may have an error when reading the revision register, so check for
 the returned value.
 
 Signed-off-by: Florian Vaussard florian.vauss...@epfl.ch
 ---
  drivers/mfd/twl6040.c | 5 +
  1 file changed, 5 insertions(+)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] mfd: twl6040: Remove duplicate register write

2014-02-25 Thread Lee Jones
 When probing, regmap_register_patch() will bypass the cache and perform
 i2c writes for the given patches. It is thus unnecessary to manually set
 the TWL6040_REG_ACCCTL register just before, as it will be done when
 registering the twl6040_patch.
 
 Signed-off-by: Florian Vaussard florian.vauss...@epfl.ch
 ---
  drivers/mfd/twl6040.c | 1 -
  1 file changed, 1 deletion(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] mfd: twl6040: Small clean-ups

2014-02-25 Thread Lee Jones
  Here is two cleanups patches for the TWL6040 audio codec. The first
  one checks for an error when reading the revision register (first read
  in the probe path). The second removes a duplicate I2C writes.
  
  Regards,
  Florian
 
 To both:
 Acked-by: Peter Ujfalusi peter.ujfal...@ti.com

Applied both with Peter's Ack.

  Florian Vaussard (2):
mfd: twl6040: Check for error when reading revision register
mfd: twl6040: Remove duplicate register write
  
   drivers/mfd/twl6040.c | 6 +-
   1 file changed, 5 insertions(+), 1 deletion(-)
  
 
 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

2014-02-18 Thread Lee Jones
  Use a meaningful name for the reference clocks so that it indicates the 
  function.
 
  CC: Lee Jones lee.jo...@linaro.org
  CC: Samuel Ortiz sa...@linux.intel.com
  Signed-off-by: Roger Quadros rog...@ti.com
  ---
   drivers/mfd/omap-usb-host.c | 6 +++---
   1 file changed, 3 insertions(+), 3 deletions(-)
 
  diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
  index 60a3bed..ce620a8 100644
  --- a/drivers/mfd/omap-usb-host.c
  +++ b/drivers/mfd/omap-usb-host.c
  @@ -714,21 +714,21 @@ static int usbhs_omap_probe(struct platform_device 
  *pdev)
   goto err_mem;
   }
   
  -omap-xclk60mhsp1_ck = devm_clk_get(dev, xclk60mhsp1_ck);
  +omap-xclk60mhsp1_ck = devm_clk_get(dev, refclk_60m_ext_p1);
 
  You can't do that. These changes will have to be in the same patch as
  the core change i.e. where they are initialised.
 
  I'm not touching them anywhere in this series. When core changes are you
  referring to?
  
  The ones in:
arch/arm/mach-omap2/cclock3xxx_data.c
 
 OK, right. They are now no longer needed so I'll get rid of them.
 In fact that change should either be in a separate patch or combined with 
 PATCH 2
 in this series. What do you suggest?

A separate patch will do fine.

   if (IS_ERR(omap-xclk60mhsp1_ck)) {
   ret = PTR_ERR(omap-xclk60mhsp1_ck);
   dev_err(dev, xclk60mhsp1_ck failed error:%d\n, ret);
   goto err_mem;
   }
   
  -omap-xclk60mhsp2_ck = devm_clk_get(dev, xclk60mhsp2_ck);
  +omap-xclk60mhsp2_ck = devm_clk_get(dev, refclk_60m_ext_p2);
   if (IS_ERR(omap-xclk60mhsp2_ck)) {
   ret = PTR_ERR(omap-xclk60mhsp2_ck);
   dev_err(dev, xclk60mhsp2_ck failed error:%d\n, ret);
   goto err_mem;
   }
   
  -omap-init_60m_fclk = devm_clk_get(dev, init_60m_fclk);
  +omap-init_60m_fclk = devm_clk_get(dev, refclk_60m_int);
   if (IS_ERR(omap-init_60m_fclk)) {
   ret = PTR_ERR(omap-init_60m_fclk);
   dev_err(dev, init_60m_fclk failed error:%d\n, ret);
 
 
  
 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 01/12] mfd: omap-usb-host: Use resource managed clk_get()

2014-02-14 Thread Lee Jones
 Use devm_clk_get() instead of clk_get().
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 Acked-by: Lee Jones lee.jo...@linaro.org
 ---
  drivers/mfd/omap-usb-host.c | 81 
 +
  1 file changed, 16 insertions(+), 65 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 02/12] mfd: omap-usb-host: Get clocks based on hardware revision

2014-02-14 Thread Lee Jones
 Not all revisions have all the clocks so get the necessary clocks
 based on hardware revision.
 
 This should avoid un-necessary clk_get failure messages that were
 observed earlier.
 
 Be more strict and always fail on clk_get() error.

It might have been clearer if you'd broken these two pieces of
functionality changes into two different patches. In future it would
be preferred.

 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 92 
 +++--
  1 file changed, 64 insertions(+), 28 deletions(-)
 
 diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
 index 0c3c9a0..60a3bed 100644
 --- a/drivers/mfd/omap-usb-host.c
 +++ b/drivers/mfd/omap-usb-host.c
 @@ -665,22 +665,41 @@ static int usbhs_omap_probe(struct platform_device 
 *pdev)
   goto err_mem;
   }
  
 - need_logic_fck = false;
 + /* Set all clocks as invalid to begin with */
 + omap-ehci_logic_fck = omap-init_60m_fclk = ERR_PTR(-ENODEV);
 + omap-utmi_p1_gfclk = omap-utmi_p2_gfclk = ERR_PTR(-ENODEV);
 + omap-xclk60mhsp1_ck = omap-xclk60mhsp2_ck = ERR_PTR(-ENODEV);
 +

For readability you should probably do these one per line.

   for (i = 0; i  omap-nports; i++) {
 - if (is_ehci_phy_mode(i) || is_ehci_tll_mode(i) ||
 - is_ehci_hsic_mode(i))
 - need_logic_fck |= true;
 + omap-utmi_clk[i] = ERR_PTR(-ENODEV);
 + omap-hsic480m_clk[i] = ERR_PTR(-ENODEV);
 + omap-hsic60m_clk[i] = ERR_PTR(-ENODEV);
   }
  
 - omap-ehci_logic_fck = ERR_PTR(-EINVAL);
 - if (need_logic_fck) {
 - omap-ehci_logic_fck = devm_clk_get(dev, ehci_logic_fck);

Has this clock been renamed, or is it no longer required?

Perhaps you should be explicit in the commit log as to which clocks
you're removing.

 - if (IS_ERR(omap-ehci_logic_fck)) {
 - ret = PTR_ERR(omap-ehci_logic_fck);
 - dev_dbg(dev, ehci_logic_fck failed:%d\n, ret);
 + /* for OMAP3 i.e. USBHS REV1 */
 + if (omap-usbhs_rev == OMAP_USBHS_REV1) {
 + need_logic_fck = false;
 + for (i = 0; i  omap-nports; i++) {
 + if (is_ehci_phy_mode(pdata-port_mode[i]) ||
 + is_ehci_tll_mode(pdata-port_mode[i]) ||
 + is_ehci_hsic_mode(pdata-port_mode[i]))
 +
 + need_logic_fck |= true;
 + }
 +
 + if (need_logic_fck) {
 + omap-ehci_logic_fck = clk_get(dev, usbhost_120m_fck);

devm_clk_get()?

snip

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

2014-02-14 Thread Lee Jones
 Use a meaningful name for the reference clocks so that it indicates the 
 function.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
 index 60a3bed..ce620a8 100644
 --- a/drivers/mfd/omap-usb-host.c
 +++ b/drivers/mfd/omap-usb-host.c
 @@ -714,21 +714,21 @@ static int usbhs_omap_probe(struct platform_device 
 *pdev)
   goto err_mem;
   }
  
 - omap-xclk60mhsp1_ck = devm_clk_get(dev, xclk60mhsp1_ck);
 + omap-xclk60mhsp1_ck = devm_clk_get(dev, refclk_60m_ext_p1);

You can't do that. These changes will have to be in the same patch as
the core change i.e. where they are initialised.

   if (IS_ERR(omap-xclk60mhsp1_ck)) {
   ret = PTR_ERR(omap-xclk60mhsp1_ck);
   dev_err(dev, xclk60mhsp1_ck failed error:%d\n, ret);
   goto err_mem;
   }
  
 - omap-xclk60mhsp2_ck = devm_clk_get(dev, xclk60mhsp2_ck);
 + omap-xclk60mhsp2_ck = devm_clk_get(dev, refclk_60m_ext_p2);
   if (IS_ERR(omap-xclk60mhsp2_ck)) {
   ret = PTR_ERR(omap-xclk60mhsp2_ck);
   dev_err(dev, xclk60mhsp2_ck failed error:%d\n, ret);
   goto err_mem;
   }
  
 - omap-init_60m_fclk = devm_clk_get(dev, init_60m_fclk);
 + omap-init_60m_fclk = devm_clk_get(dev, refclk_60m_int);
   if (IS_ERR(omap-init_60m_fclk)) {
   ret = PTR_ERR(omap-init_60m_fclk);
   dev_err(dev, init_60m_fclk failed error:%d\n, ret);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v7 03/12] mfd: omap-usb-host: Use clock names as per function for reference clocks

2014-02-14 Thread Lee Jones
  Use a meaningful name for the reference clocks so that it indicates the 
  function.
 
  CC: Lee Jones lee.jo...@linaro.org
  CC: Samuel Ortiz sa...@linux.intel.com
  Signed-off-by: Roger Quadros rog...@ti.com
  ---
   drivers/mfd/omap-usb-host.c | 6 +++---
   1 file changed, 3 insertions(+), 3 deletions(-)
 
  diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
  index 60a3bed..ce620a8 100644
  --- a/drivers/mfd/omap-usb-host.c
  +++ b/drivers/mfd/omap-usb-host.c
  @@ -714,21 +714,21 @@ static int usbhs_omap_probe(struct platform_device 
  *pdev)
 goto err_mem;
 }
   
  -  omap-xclk60mhsp1_ck = devm_clk_get(dev, xclk60mhsp1_ck);
  +  omap-xclk60mhsp1_ck = devm_clk_get(dev, refclk_60m_ext_p1);
  
  You can't do that. These changes will have to be in the same patch as
  the core change i.e. where they are initialised.
 
 I'm not touching them anywhere in this series. When core changes are you
 referring to?

The ones in:
  arch/arm/mach-omap2/cclock3xxx_data.c

 if (IS_ERR(omap-xclk60mhsp1_ck)) {
 ret = PTR_ERR(omap-xclk60mhsp1_ck);
 dev_err(dev, xclk60mhsp1_ck failed error:%d\n, ret);
 goto err_mem;
 }
   
  -  omap-xclk60mhsp2_ck = devm_clk_get(dev, xclk60mhsp2_ck);
  +  omap-xclk60mhsp2_ck = devm_clk_get(dev, refclk_60m_ext_p2);
 if (IS_ERR(omap-xclk60mhsp2_ck)) {
 ret = PTR_ERR(omap-xclk60mhsp2_ck);
 dev_err(dev, xclk60mhsp2_ck failed error:%d\n, ret);
 goto err_mem;
 }
   
  -  omap-init_60m_fclk = devm_clk_get(dev, init_60m_fclk);
  +  omap-init_60m_fclk = devm_clk_get(dev, refclk_60m_int);
 if (IS_ERR(omap-init_60m_fclk)) {
 ret = PTR_ERR(omap-init_60m_fclk);
 dev_err(dev, init_60m_fclk failed error:%d\n, ret);
  
 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/4] MFD: TPS65218: Add driver for the TPS65218 PMIC

2014-02-07 Thread Lee Jones
On Thu, 06 Feb 2014, Keerthy wrote:

 The TPS65218 chip is a power management IC for Portable Navigation Systems
 and Tablet Computing devices. It contains the following components:
 
  - Regulators.
  - Over Temperature warning and Shut down.
 
 This patch adds support for tps65218 mfd device. At this time only
 the regulator functionality is made available.
 
 Signed-off-by: Keerthy j-keer...@ti.com
 ---
  drivers/mfd/Kconfig  |   15 +++
  drivers/mfd/Makefile |1 +
  drivers/mfd/tps65218.c   |  281 +
  include/linux/mfd/tps65218.h |  284 
 ++
  4 files changed, 581 insertions(+)
  create mode 100644 drivers/mfd/tps65218.c
  create mode 100644 include/linux/mfd/tps65218.h

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/4] MFD: TPS65218: Add driver for the TPS65218 PMIC

2014-02-06 Thread Lee Jones
 The TPS65218 chip is a power management IC for Portable Navigation Systems
 and Tablet Computing devices. It contains the following components:
 
  - Regulators.
  - Over Temperature warning and Shut down.
 
 This patch adds support for tps65218 mfd device. At this time only
 the regulator functionality is made available.
 
 Signed-off-by: Keerthy j-keer...@ti.com
 ---
  drivers/mfd/Kconfig  |   15 +++
  drivers/mfd/Makefile |1 +
  drivers/mfd/tps65218.c   |  281 +

How much different is the TPS65218 to all the other TPS drivers?

drivers/mfd/tps6105x.c
drivers/mfd/tps65010.c
drivers/mfd/tps6507x.c
drivers/mfd/tps65090.c
drivers/mfd/tps65217.c
drivers/mfd/tps6586x.c
drivers/mfd/tps65910.c
drivers/mfd/tps65911-comparator.c
drivers/mfd/tps65912-core.c
drivers/mfd/tps65912-i2c.c
drivers/mfd/tps65912-irq.c
drivers/mfd/tps65912-spi.c
drivers/mfd/tps80031.c

Perhaps some consolidating might be in order?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 00/10] USB Host support for OMAP5 uEVM (for 3.14)

2014-01-21 Thread Lee Jones
 This patchset brings up USB Host ports and Ethernet port on
 the OMAP5 uEVM board.

I'd keep hold of this and send it out again when the merge-window is
closed.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 3/9] mfd: omap-usb-host: Update DT clock binding information

2014-01-10 Thread Lee Jones
On Thu, 09 Jan 2014, Roger Quadros wrote:

 The omap-usb-host driver expects certained named clocks.
 Add this information to the DT binding document.
 
 Use clock names as per function for reference clocks.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  .../devicetree/bindings/mfd/omap-usb-host.txt  | 23 
 ++
  drivers/mfd/omap-usb-host.c|  6 +++---
  2 files changed, 26 insertions(+), 3 deletions(-)

Please don't mix up binding changes with code ones.

Separate patch please.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 1/9] mfd: omap-usb-host: Use resource managed clk_get()

2014-01-10 Thread Lee Jones
 Use devm_clk_get() instead of clk_get().
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 81 
 +
  1 file changed, 16 insertions(+), 65 deletions(-)

Nice clean up.

Acked-by: Lee Jones lee.jo...@linaro.org

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision

2014-01-10 Thread Lee Jones
 Not all revisions have all the clocks so get the necessary clocks
 based on hardware revision.
 
 This should avoid un-necessary clk_get failure messages that were
 observed earlier.
 
 Be more strict and always fail on clk_get() error.
 
 CC: Lee Jones lee.jo...@linaro.org
 CC: Samuel Ortiz sa...@linux.intel.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mfd/omap-usb-host.c | 93 
 +++--
  1 file changed, 64 insertions(+), 29 deletions(-)
 
 diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
 index 1c9bca2..7202cc6 100644
 --- a/drivers/mfd/omap-usb-host.c
 +++ b/drivers/mfd/omap-usb-host.c
 @@ -92,7 +92,6 @@
  #define is_ehci_tll_mode(x)  (x == OMAP_EHCI_PORT_MODE_TLL)
  #define is_ehci_hsic_mode(x) (x == OMAP_EHCI_PORT_MODE_HSIC)
  
 -

Sneaky! ;)

  struct usbhs_hcd_omap {
   int nports;
   struct clk  **utmi_clk;
 @@ -665,22 +664,41 @@ static int usbhs_omap_probe(struct platform_device 
 *pdev)
   goto err_mem;
   }
  
 - need_logic_fck = false;
 + /* Set all clocks as invalid to begin with */
 + omap-ehci_logic_fck = omap-init_60m_fclk = ERR_PTR(-EINVAL);
 + omap-utmi_p1_gfclk = omap-utmi_p2_gfclk = ERR_PTR(-EINVAL);
 + omap-xclk60mhsp1_ck = omap-xclk60mhsp2_ck = ERR_PTR(-EINVAL);

I don't think this is the correct error code.

-EINVAL means 'invalid parameter'.

You probably want -ENODEV or -ENOSYS ('function not implemented'
probably isn't ideal either tbh, but you get the idea). Perhaps you
can set them as NULL and check for IS_ERR_OR_NULL() instead?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 2/9] mfd: omap-usb-host: Get clocks based on hardware revision

2014-01-10 Thread Lee Jones
On Fri, 10 Jan 2014, Arnd Bergmann wrote:

 On Friday 10 January 2014, Lee Jones wrote:

   - need_logic_fck = false;
   + /* Set all clocks as invalid to begin with */
   + omap-ehci_logic_fck = omap-init_60m_fclk = ERR_PTR(-EINVAL);
   + omap-utmi_p1_gfclk = omap-utmi_p2_gfclk = ERR_PTR(-EINVAL);
   + omap-xclk60mhsp1_ck = omap-xclk60mhsp2_ck = ERR_PTR(-EINVAL);
  
  I don't think this is the correct error code.
  
  -EINVAL means 'invalid parameter'.
  
  You probably want -ENODEV or -ENOSYS ('function not implemented'
  probably isn't ideal either tbh, but you get the idea). Perhaps you
  can set them as NULL and check for IS_ERR_OR_NULL() instead?
 
 I think ENODEV is ok here, I'd much prefer this over IS_ERR_OR_NULL().

Sounds good to me.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] mfd: omap-usb-tll: Don't hold lock during pm_runtime_get/put_sync()

2014-01-08 Thread Lee Jones
 pm_runtime_get/put_sync() can sleep so don't hold spinlock while
 calling them.
 
 This patch prevents a BUG() during system suspend when
 CONFIG_DEBUG_ATOMIC_SLEEP is enabled.
 
 Bug is present in Kernel versions v3.9 onwards.
 
 Reported-by: Tomi Valkeinen tomi.valkei...@ti.com
 Signed-off-by: Roger Quadros rog...@ti.com
 Tested-by: Tomi Valkeinen tomi.valkei...@ti.com
 Cc: sta...@vger.kernel.org # 3.9+
 ---
  drivers/mfd/omap-usb-tll.c | 36 
  1 file changed, 12 insertions(+), 24 deletions(-)

Patch looks good to me now.

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: omap-usb-tll: Don't hold lock during pm_runtime_get/put_sync()

2013-12-18 Thread Lee Jones
 pm_runtime_get/put_sync() can sleep so don't hold spinlock while
 calling them.
 
 This patch prevents a BUG() when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.
 Bug is present in Kernel versions v3.9 onwards.
 
 Reported-by: Tomi Valkeinen tomi.valkei...@ti.com
 Signed-off-by: Roger Quadros rog...@ti.com
 Tested-by: Tomi Valkeinen tomi.valkei...@ti.com
 Cc: sta...@vger.kernel.org # 3.9+
 ---
  drivers/mfd/omap-usb-tll.c | 11 ++-
  1 file changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
 index 0d946ae1..248004c 100644
 --- a/drivers/mfd/omap-usb-tll.c
 +++ b/drivers/mfd/omap-usb-tll.c
 @@ -346,7 +346,9 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)
   for (i = 0; i  tll-nch; i++)
   needs_tll |= omap_usb_mode_needs_tll(pdata-port_mode[i]);
  
 + spin_unlock(tll_lock);
   pm_runtime_get_sync(tll_dev);
 + spin_lock(tll_lock);

This is pretty ugly. Can't you move it above the spin_lock() instead?

snip

   tll = dev_get_drvdata(tll_dev);
  
 + spin_unlock(tll_lock);
   pm_runtime_get_sync(tll_dev);
 + spin_lock(tll_lock);

Same here?

   for (i = 0; i  tll-nch; i++) {
   if (omap_usb_mode_needs_tll(pdata-port_mode[i])) {
 @@ -438,7 +441,6 @@ int omap_tll_enable(struct usbhs_omap_platform_data 
 *pdata)
   }
  
   spin_unlock(tll_lock);
 -

This doesn't belong in this patch and is now inconsistent with the
other functions in the driver.

   return 0;
  }
  EXPORT_SYMBOL_GPL(omap_tll_enable);
 @@ -464,9 +466,8 @@ int omap_tll_disable(struct usbhs_omap_platform_data 
 *pdata)
   }
   }
  
 - pm_runtime_put_sync(tll_dev);
 -
   spin_unlock(tll_lock);
 + pm_runtime_put_sync(tll_dev);
  
   return 0;
  }

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/10] mfd: menelaus: Start to use irqdomain

2013-12-17 Thread Lee Jones
On Mon, 16 Dec 2013, Felipe Balbi wrote:

 Introduce an irq_chip and irq_domain for menelaus driver. Following
 patches will convert uses to traditional request_threaded_irq().
 
 While at that, some better error handling had to be added, so we could
 free irq descs we allocated.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 123 
 +++--
  1 file changed, 119 insertions(+), 4 deletions(-)
 

snip

 +static void menelaus_irq_ack(struct irq_data *data)
 +{
 + struct menelaus_chip *m = irq_data_get_irq_chip_data(data);
 + int irq = data-irq - m-irq_base;

Shoudn't this now be?
  int irq = data-hwirq;

 + if (irq  7) {
 + m-ack2 |= BIT(irq);
 + m-ack2_pending = true;
 + } else {
 + m-ack1 |= BIT(irq);
 + m-ack1_pending = true;
 + }
 +}
 +
 +static void menelaus_irq_mask(struct irq_data *data)
 +{
 + struct menelaus_chip *m = irq_data_get_irq_chip_data(data);
 + int irq = data-irq - m-irq_base;

Same for here, and all the others.

snip

 + irq_domain_add_legacy(node, MENELAUS_NR_IRQS, irq_base, 0,
 + irq_domain_simple_ops, m);

Please use irq_domain_add_simple() here.

 + m-irq_base = irq_base;

I don't think you need this.

 + for (i = irq_base; i  irq_base + MENELAUS_NR_IRQS; i++) {
 + irq_set_chip_data(i, m);
 + irq_set_chip_and_handler(i, menelaus_irq_chip,
 + handle_simple_irq);
 + irq_set_nested_thread(i, 1);
 + set_irq_flags(i, IRQF_VALID);
 + }

You should put this in the .map() operation and the reverse in .unmap().

  fail:
 + irq_free_descs(irq_base, MENELAUS_NR_IRQS);

I don't think you need to do this.

  
  static int menelaus_remove(struct i2c_client *client)
  {
 + struct menelaus_chip*m = i2c_get_clientdata(client);
 +
 + irq_free_descs(m-irq_base, MENELAUS_NR_IRQS);

Nor here.

   the_menelaus = NULL;

Shouldn't this have been removed in patch 6?

   return 0;
  }
  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/10] mfd: menelaus: Switch all children to threaded_irq

2013-12-17 Thread Lee Jones
 Now that we have our own irq_chip, all children can use traditional
 request_threaded_irq().

Is it possible to convert these to managed resources (*_devm)?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/15] mfd: menelaus: Drop __exit section annotation

2013-12-16 Thread Lee Jones
Are you planning on re-submitting this patch-set anytime soon?

I thought Tony said it was important?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 11/15] mfd: menelaus: Start to use irqdomain

2013-12-11 Thread Lee Jones
On Tue, 10 Dec 2013, Tony Lindgren wrote:

 * Lee Jones lee.jo...@linaro.org [131210 10:39]:
 Introduce an irq_chip and irq_domain for menelaus driver. Following
 patches will convert uses to traditional request_threaded_irq().
 
 While at that, some better error handling had to be added, so we could
 free irq descs we allocated.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 127 
 ++---

snip

 + irq_domain_add_legacy(node, MENELAUS_NR_IRQS, irq_base, 0,
 + irq_domain_simple_ops, m);

When will this driver become DT compliant?
   
   when OMAP2 becomes DT-compliant. It still boots with legacy board-file +
   platform_data.
  
  Really? Tony, are there any plans to DT the platform?
 
 Yeah and what Felipe is doing here is an important step towards that.
 We'll be booting omap2 in DT only mode with v3.14

Okay, sounds good. Thanks for the clarification.

 but we still need
 to rely on some pdata quirks at least for the MMC because Menelaus
 does not provide the needed regulator phandles for the .dts files for
 the driver to use.

I'll take your word for it. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 07/15] mfd: menelaus: Limit the usage of the_menelaus

2013-12-11 Thread Lee Jones
On Tue, 10 Dec 2013, Felipe Balbi wrote:

 On Tue, Dec 10, 2013 at 08:57:01AM +, Lee Jones wrote:
   Pass a menelaus_chip pointer as argument to most functions so we can
   minimize the usage of the global the_menelaus pointer.
   
   Tested-by: Aaro Koskinen aaro.koski...@iki.fi
   Signed-off-by: Felipe Balbi ba...@ti.com
   ---
drivers/mfd/menelaus.c | 265 
   ++---
1 file changed, 142 insertions(+), 123 deletions(-)
  
  How is this different from patch 6?
 
 have you read the patch ? patch 6 converts *only* enable/disable irq
 functions.

Well it actually converts menelaus_ack_irq() too, but that's not the
point I was making.

I can see that the 'code' is different, but the functionality of the
patch is the same i.e. converting functions to pass around the
menelaus_chip pointer for eradication of the_menelaus global pointer.

I'm not concerned about the 'lines changed' count. The change your
making is trivial, thus there is no requirement to split unnecessarily
over 5 patches. Please squash them into a single functionality patch.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/15] mfd: menelaus: Drop __exit section annotation

2013-12-10 Thread Lee Jones
The code looks mostly fine, but the implementation of the commit logs
seems lazy. Please submit a v3 using coherent sentences with full
explanations and correct punctuation.
   
   example ?
  
  All of your commit messages.
  
   that macro just helps removing some extra
  
^- Sentences start with an uppercase character.
  
   line of code and hides ffs() calls.
   
   while at that, also fix a variable shadowing
  
^- Sentences start with an uppercase character.
  
   bug where 'int irq' was being redeclared inside
   inner loop while it was also argument to interrupt
   handler.
  
 ---   50 chars   - 
  
  Please use the full 72 char (or there abouts) width of the buffer.
 
 I don't see any mention of punctuation problems, however. Also, you're
 not complaining about the content at all, which tells me those sentences
 aren't as incoherent as you claimed before.

I didn't read them in any detail. I traversed through the patches and
saw that the formatting looked obscure on all of them. As I have come
to expect more of your submissions, I provided a generic reply
detailing how I expected the commit logs to be. I wasn't insinuated
that you failed to meet all of the criteria, but they definitely fell
short of the mark.

 But fair enough, I'll fix those up and add Aaro's Tested-by

Thank you.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 07/15] mfd: menelaus: Limit the usage of the_menelaus

2013-12-10 Thread Lee Jones
 Pass a menelaus_chip pointer as argument to most functions so we can
 minimize the usage of the global the_menelaus pointer.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 265 
 ++---
  1 file changed, 142 insertions(+), 123 deletions(-)

How is this different from patch 6?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 08/15] mfd: menelaus: Pass menelaus_chip pointer to add/remove irq functions

2013-12-10 Thread Lee Jones
On Mon, 09 Dec 2013, Felipe Balbi wrote:

 Those functions are static and can receive a menelaus_chip pointer very
 easily.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 57 
 ++
  1 file changed, 30 insertions(+), 27 deletions(-)

Same here. I think this should be done in one fell swoop.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 09/15] mfd: menelaus: Pass menelaus_chip pointer to get/set voltage

2013-12-10 Thread Lee Jones
On Mon, 09 Dec 2013, Felipe Balbi wrote:

 Those functions are static and can easily receive a menelaus_chip
 pointer argument.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 50 
 +++---
  1 file changed, 27 insertions(+), 23 deletions(-)

I see a theme forming.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 10/15] mfd: menelaus: Pass menelaus_chip argument to menelaus - time helpers

2013-12-10 Thread Lee Jones
On Mon, 09 Dec 2013, Felipe Balbi wrote:

 time_to_menelaus() and menelaus_to_time() are static and can easily
 receive a struct menelaus_chip pointer argument.
 
 After this patch, the_menelaus is only used on exported functions which
 are currently being used by board-n8x0.c.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 17 -
  1 file changed, 8 insertions(+), 9 deletions(-)

Same.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 11/15] mfd: menelaus: Start to use irqdomain

2013-12-10 Thread Lee Jones
 Introduce an irq_chip and irq_domain for menelaus driver. Following
 patches will convert uses to traditional request_threaded_irq().
 
 While at that, some better error handling had to be added, so we could
 free irq descs we allocated.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 127 
 ++---

snip

 + irq_domain_add_legacy(node, MENELAUS_NR_IRQS, irq_base, 0,
 + irq_domain_simple_ops, m);

When will this driver become DT compliant?

I think you should use irq_domain_add_simple() to future proof
yourself a little.

 + m-irq_base = irq_base;
 +
 + for (i = irq_base; i  irq_base + MENELAUS_NR_IRQS; i++) {
 + irq_set_chip_data(i, m);
 + irq_set_chip_and_handler(i, menelaus_irq_chip,
 + handle_simple_irq);
 + irq_set_nested_thread(i, 1);
 + set_irq_flags(i, IRQF_VALID);

This assumes that this h/w only exists on ARM platforms. Is that true?

 + }

This is usually completed in an *_irq_map() operation call-back.

I can't see where you reverse this process either (usually *_irq_unmap())

snip

 - mutex_init(m-lock);
 -

This doesn't belong in this patch.

It should have been removed with the final use of the lock was.

snip

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 15/15] mfd: menelaus: Use devm_request_threaded_irq()

2013-12-10 Thread Lee Jones
On Mon, 09 Dec 2013, Felipe Balbi wrote:

 By using devm_request_threaded_irq() we can drop a few extra lines of
 code and rely on device managed resources layer to free our IRQ for us.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 11 ---
  1 file changed, 4 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
 index bffe978..b87c2bd 100644
 --- a/drivers/mfd/menelaus.c
 +++ b/drivers/mfd/menelaus.c
 @@ -1271,8 +1271,8 @@ static int menelaus_probe(struct i2c_client *client,
   /* Set output buffer strengths */
   menelaus_write_reg(m, MENELAUS_MCT_CTRL1, 0x73);
  
 - err = request_threaded_irq(client-irq, NULL, menelaus_irq,
 - IRQF_ONESHOT, DRIVER_NAME, m);
 + err = devm_request_threaded_irq(client-dev, client-irq,
 + NULL, menelaus_irq, IRQF_ONESHOT, DRIVER_NAME, m);

No need for a separate patch here. Convert straight from request_irq()
to devm_request_threaded_irq() in patch 3.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 03/15] mfd: menelaus: Convert to threaded irq

2013-12-10 Thread Lee Jones
On Mon, 09 Dec 2013, Felipe Balbi wrote:

 We don't need that extra workqueue when we have generic threaded irq
 handlers support. This patch just moves over to threaded irqs and
 deletes the unnecessary workqueue.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 29 -
  1 file changed, 4 insertions(+), 25 deletions(-)

snip

 - err = request_irq(client-irq, menelaus_irq, 0,
 -   DRIVER_NAME, menelaus);
 + err = request_threaded_irq(client-irq, NULL, menelaus_irq,
 + IRQF_ONESHOT, DRIVER_NAME, menelaus);

devm_* managed resources please.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 15/15] mfd: menelaus: Use devm_request_threaded_irq()

2013-12-10 Thread Lee Jones
On Tue, 10 Dec 2013, Felipe Balbi wrote:

 On Tue, Dec 10, 2013 at 09:30:42AM +, Lee Jones wrote:
  On Mon, 09 Dec 2013, Felipe Balbi wrote:
  
   By using devm_request_threaded_irq() we can drop a few extra lines of
   code and rely on device managed resources layer to free our IRQ for us.
   
   Tested-by: Aaro Koskinen aaro.koski...@iki.fi
   Signed-off-by: Felipe Balbi ba...@ti.com
   ---
drivers/mfd/menelaus.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
   
   diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
   index bffe978..b87c2bd 100644
   --- a/drivers/mfd/menelaus.c
   +++ b/drivers/mfd/menelaus.c
   @@ -1271,8 +1271,8 @@ static int menelaus_probe(struct i2c_client *client,
 /* Set output buffer strengths */
 menelaus_write_reg(m, MENELAUS_MCT_CTRL1, 0x73);

   - err = request_threaded_irq(client-irq, NULL, menelaus_irq,
   - IRQF_ONESHOT, DRIVER_NAME, m);
   + err = devm_request_threaded_irq(client-dev, client-irq,
   + NULL, menelaus_irq, IRQF_ONESHOT, DRIVER_NAME, m);
  
  No need for a separate patch here. Convert straight from request_irq()
  to devm_request_threaded_irq() in patch 3.
 
 that would be 2 changes in a single patch.

I think it's the right thing to do.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 11/15] mfd: menelaus: Start to use irqdomain

2013-12-10 Thread Lee Jones
   Introduce an irq_chip and irq_domain for menelaus driver. Following
   patches will convert uses to traditional request_threaded_irq().
   
   While at that, some better error handling had to be added, so we could
   free irq descs we allocated.
   
   Tested-by: Aaro Koskinen aaro.koski...@iki.fi
   Signed-off-by: Felipe Balbi ba...@ti.com
   ---
drivers/mfd/menelaus.c | 127 
   ++---
  
  snip
  
   + irq_domain_add_legacy(node, MENELAUS_NR_IRQS, irq_base, 0,
   + irq_domain_simple_ops, m);
  
  When will this driver become DT compliant?
 
 when OMAP2 becomes DT-compliant. It still boots with legacy board-file +
 platform_data.

Really? Tony, are there any plans to DT the platform?

Felipe, what did you think about using irq_domain_add_simple()?

   + m-irq_base = irq_base;
   +
   + for (i = irq_base; i  irq_base + MENELAUS_NR_IRQS; i++) {
   + irq_set_chip_data(i, m);
   + irq_set_chip_and_handler(i, menelaus_irq_chip,
   + handle_simple_irq);
   + irq_set_nested_thread(i, 1);
   + set_irq_flags(i, IRQF_VALID);
  
  This assumes that this h/w only exists on ARM platforms. Is that true?
 
 it was made *only* for Nokia to use on their ARM-only internet tablets.

If the IP is genuinely not reusable, them I'm fine with it.

I see that the Kconfig is setup in the correct way too, so we're good.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 08/15] mfd: menelaus: Pass menelaus_chip pointer to add/remove irq functions

2013-12-10 Thread Lee Jones
On Tue, 10 Dec 2013, Felipe Balbi wrote:

 On Tue, Dec 10, 2013 at 09:00:21AM +, Lee Jones wrote:
  On Mon, 09 Dec 2013, Felipe Balbi wrote:
  
   Those functions are static and can receive a menelaus_chip pointer very
   easily.
   
   Tested-by: Aaro Koskinen aaro.koski...@iki.fi
   Signed-off-by: Felipe Balbi ba...@ti.com
   ---
drivers/mfd/menelaus.c | 57 
   ++
1 file changed, 30 insertions(+), 27 deletions(-)
  
  Same here. I think this should be done in one fell swoop.
 
 then it would become a much, much larger patch which would become a pain
 to review.

If the patch was doing lots of different things then I'd be inclined
to agree, but although large, the changes here are pretty trivial.

I tend to break up patches based on; subsystem, file, device (for
platform/dts adaptions) and functionality. Rather than just because
the 'lines changed' count is large.

Please squash them and I'll review it.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/15] mfd: menelaus: Drop __exit section annotation

2013-12-09 Thread Lee Jones
  The code looks mostly fine, but the implementation of the commit logs
  seems lazy. Please submit a v3 using coherent sentences with full
  explanations and correct punctuation.
 
 example ?

All of your commit messages.

 that macro just helps removing some extra

  ^- Sentences start with an uppercase character.

 line of code and hides ffs() calls.
 
 while at that, also fix a variable shadowing

  ^- Sentences start with an uppercase character.

 bug where 'int irq' was being redeclared inside
 inner loop while it was also argument to interrupt
 handler.

   ---   50 chars   - 

Please use the full 72 char (or there abouts) width of the buffer.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/4] MFD: TPS65218: Add driver for the TPS65218 PMIC

2013-12-03 Thread Lee Jones
 The TPS65218 chip is a power management IC for Portable Navigation Systems
 and Tablet Computing devices. It contains the following components:
 
  - Regulators.
  - Over Temperature warning and Shut down.
 
 This patch adds support for tps65218 mfd device. At this time only
 the regulator functionality is made available.
 
 Signed-off-by: Keerthy j-keer...@ti.com
 ---
  drivers/mfd/Kconfig  |   14 ++
  drivers/mfd/Makefile |1 +
  drivers/mfd/tps65218.c   |  281 +
  include/linux/mfd/tps65218.h |  288 
 ++

snip

 +config MFD_TPS65218
 + tristate TI TPS65218 Power Management chips
 + depends on I2C
 + select MFD_CORE
 + select REGMAP_I2C
 + help
 +   If you say yes here you get support for the TPS65218 series of
 +   Power Management chips.
 +   These include voltage regulators, gpio and other features
 +   that are often used in portable devices.

Perhaps you should add a note that only the regulator component is
currently supported.

snip

 new file mode 100644
 index 000..8c61640
 --- /dev/null
 +++ b/drivers/mfd/tps65218.c
 @@ -0,0 +1,281 @@
 +/*
 + * TPS65218 chip family multi-function driver

Instead of calling it an MFD driver (is there such a thing?) I think
you should mention its true purpose, as per the datasheet.

snip

 +static const struct of_device_id of_tps65218_match_table[] = {
 + { .compatible = ti,tps65218, },
 + { /* end */ }

I think the end comment is superfluous.

However, if you _really_ want to put something in there, I dislike
/* Sentinel */ the least.

 +static int tps65218_probe(struct i2c_client *client,
 + const struct i2c_device_id *ids)
 +{

snip

 + ret = of_platform_populate(client-dev.of_node, NULL, NULL,
 +client-dev);

What are you trying to do here?

Register each regulator as a platform device?

snip

 +static const struct i2c_device_id tps65218_id_table[] = {
 + {tps65218, TPS65218},
 +};

This has a different structure to of_tps65218_match_table, please
ensure they're the same. I prefer spaces after '{' and before '}'.

snip

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: DT bindings for TPS65218 PMIC

2013-12-03 Thread Lee Jones
 Add DT bindings for TPS65218 PMIC.
 
 Signed-off-by: Keerthy j-keer...@ti.com
 ---
  Documentation/devicetree/bindings/mfd/tps65218.txt |   27 
 
  .../devicetree/bindings/regulator/tps65218.txt |   22 
  2 files changed, 49 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/mfd/tps65218.txt
  create mode 100644 Documentation/devicetree/bindings/regulator/tps65218.txt
 
 diff --git a/Documentation/devicetree/bindings/mfd/tps65218.txt 
 b/Documentation/devicetree/bindings/mfd/tps65218.txt
 new file mode 100644
 index 000..87cb7a8
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/mfd/tps65218.txt
 @@ -0,0 +1,27 @@
 +The TPS65218 Integrated Power Management Chips.
 +These chips are connected to an i2c bus.

   I2C

 +Required properties:
 +- compatible : Must be ti,tps65218;
 +- interrupts : This i2c device has an IRQ line connected to the main SoC

   I2C

 +- interrupt-controller : Since the tps65218 support several interrupts

   support(s) (hosts?)

 +  internally, it is considered as an interrupt controller cascaded to the 
 SoC.
 +- #interrupt-cells = 2;
 +- interrupt-parent : The parent interrupt controller.

   Phandle to ...

 +Optional node:

node(s):

 +- Child nodes contain in the tps65218.
 +  It supports a number of features.

Please re-phase the above two sentences to something decipherable.

 +  The children nodes will thus depend of the capability of the variant.

Please, go on ...

 +Example:
 +/*
 + * Integrated Power Management Chip
 + */
 +tps@24 {
 +compatible = ti,tps65218;
 +reg = 0x24;
 +interrupt-controller;
 +#interrupt-cells = 2;
 +interrupt-parent = gic;
 +};

Perhaps it would be better to centralise the documentation inclusive
of the regulator contingent. Or at least provide a _full_ example in
each document.

 diff --git a/Documentation/devicetree/bindings/regulator/tps65218.txt 
 b/Documentation/devicetree/bindings/regulator/tps65218.txt
 new file mode 100644
 index 000..1ccf170
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/regulator/tps65218.txt
 @@ -0,0 +1,22 @@
 +TPS65218 family of regulators
 +
 +Required properties:
 +For tps65218 regulators/LDOs
 +- compatible:
 +  - ti,tps65218-dcdc1 for DCDC1
 +  - ti,tps65218-dcdc2 for DCDC2
 +  - ti,tps65218-dcdc3 for DCDC3
 +  - ti,tps65218-dcdc4 for DCDC4
 +  - ti,tps65218-dcdc5 for DCDC5
 +  - ti,tps65218-dcdc6 for DCDC6
 +  - ti,tps65218-ldo1 for LDO1 LDO

Why aren't you using 'regulator-compatible'?

 +Optional properties:
 +- Any optional property defined in bindings/regulator/regulator.txt
 +
 +Example:
 + xyz: regulator@0 {

Genuine question: Is the @0 meaningful?

 + compatible = ti,tps65218-dcdc1;
 + regulator-min-microvolt  = 100;
 + regulator-max-microvolt  = 300;
 + };

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/15] mfd: menelaus: Drop __exit section annotation

2013-12-03 Thread Lee Jones
The code looks mostly fine, but the implementation of the commit logs
seems lazy. Please submit a v3 using coherent sentences with full
explanations and correct punctuation.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/15] mfd: menelaus: Drop __exit section annotation

2013-12-03 Thread Lee Jones
 The code looks mostly fine, but the implementation of the commit logs
 seems lazy. Please submit a v3 using coherent sentences with full
 explanations and correct punctuation.

Also use the full length of the provided buffer, which I believe is 72
chars, but happy to be correct on that one. It's certainly not 40
chars however.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: DT bindings for TPS65218 PMIC

2013-12-03 Thread Lee Jones
 +- interrupt-controller : Since the tps65218 support several interrupts
 support(s) (hosts?)
 
 Yes Supports multiple interrupts from the sub-modules.

I think 'support' should be the plural 'supports'.

snip

 Why aren't you using 'regulator-compatible'?
 
 I referred tps65217.txt the predecessors and used the compatible.
 I also referred twl-regulator.txt.

That doesn't mean that they are correct/better. ;)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/4] MFD: TPS65218: Add driver for the TPS65218 PMIC

2013-12-03 Thread Lee Jones
 +   ret = of_platform_populate(client-dev.of_node, NULL, NULL,
 +  client-dev);
 What are you trying to do here?
 
 Register each regulator as a platform device?
 
 Yeah. The probe will be called for every regulator separately.

So there are two schools of thought on this. One is that if you want
to do it that way you should use the MFD framework to do this for you.
There is no need to recreate functionality that already exists. The
other is that you shouldn't be doing this at all with regulators. Mark
likes the idea of having a single regulator controller node which
contains all of these individual regulator sub-nodes and you initiate
a single call to for_each_child_of_node() within the driver in order
to register them all.

snip

 This has a different structure to of_tps65218_match_table, please
 ensure they're the same. I prefer spaces after '{' and before '}'.
 
 Ok. I will add a space after '{' and before '}'. Sorry I did not
 follow tps65218_id_table being different than of_tps65218_match_table.
 
 One is of the type of_device_id and the other i2c_device_id.

Shouldn't matter, it's just a formatting thing.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling

2013-12-02 Thread Lee Jones
 Since currently nobody uses TWL603x platform data and all new
   
Hmm... when you say nobody, how did you come to this conclusion?
   
Without digging into it and probably not that relevant, it
appears there is some references to it in platform data still:
   
$ git grep twl603 -- arch/ | grep -v dts
arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct
omap2_hsmmc_info *controllers);
arch/arm/mach-omap2/omap4-common.c:static int
omap4_twl6030_hsmmc_late_init(struct device *dev)
arch/arm/mach-omap2/omap4-common.c: irq =
twl6030_mmc_card_detect_config();
arch/arm/mach-omap2/omap4-common.c:
pdata-slots[0].card_detect = twl6030_mmc_card_detect;
arch/arm/mach-omap2/omap4-common.c:static __init void
omap4_twl6030_hsmmc_set_late_init(struct device *dev)
arch/arm/mach-omap2/omap4-common.c: pdata-init =
omap4_twl6030_hsmmc_late_init;
arch/arm/mach-omap2/omap4-common.c:int __init
omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
arch/arm/mach-omap2/omap4-common.c:
omap4_twl6030_hsmmc_set_late_init(c-pdev-dev);
arch/arm/mach-omap2/omap4-common.c:int __init
omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
arch/arm/mach-omap2/omap_twl.c:static unsigned long
twl6030_vsel_to_uv(const u8 vsel)
arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned 
long
uv)
arch/arm/mach-omap2/omap_twl.c: if (uv  twl6030_vsel_to_uv(0x39)) {
arch/arm/mach-omap2/omap_twl.c: __func__, uv,
twl6030_vsel_to_uv(0x39));
arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
twl6030_vsel_to_uv,
arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
twl6030_uv_to_vsel,
arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
twl6030_vsel_to_uv,
arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
twl6030_uv_to_vsel,
arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
twl6030_vsel_to_uv,
arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
twl6030_uv_to_vsel,
   
   Looks like some misunderstanding is here. This patch *only* removes
   platform data for TWL603x
   which were used to create TWL sub-devices like regulators, adc's,
   watchdogs, etc.
   Previously it was set up in twl_common.c by omap4_pmic_init(), which was
   called from board files
   with specific pmic config.
   Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and all
   OMAP4 board files
   have been removed omap4_pmic_init() is never called and all TWL603x
   sub-devices are created
   from device tree data.
  
  I'm not overly familiar with this driver (it looks like a big
  historical mess to me), or the current state of the OMAP4 platform, so
  I would like a second opinion on this.
  
  Tony would you be kind enough to oblige?
 
 We've moved omap4 to boot based on device tree only, so that legacy
 platform data is no longer being used. It might be worth checking if
 we do have bindings in place for all of that, or if some of it may
 still be needed to be passed as auxdata while we wait for the bindings.

Ruslan, do you know the answer to these concerns?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling

2013-12-02 Thread Lee Jones
On Thu, 21 Nov 2013, Ruslan Ruslichenko wrote:

 Since currently nobody uses TWL603x platform data and all new
 users will supply it through device tree, handling of these
 data within twl-core will never be used, so remove it.
 
 Signed-off-by: Ruslan Ruslichenko ruslan.rusliche...@globallogic.com
 ---
 
 Tested on TI SDP/Tablet OMAP4460 board
 Based on:
 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 commit 5e01dc7 Linux 3.12
 
  drivers/mfd/twl-core.c | 198 
 -
  1 file changed, 198 deletions(-)

Okay, I'm suitably happy with yours and Tony's responses.

Patch applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling

2013-11-29 Thread Lee Jones
Attn: Tony

   Since currently nobody uses TWL603x platform data and all new
 
  Hmm... when you say nobody, how did you come to this conclusion?
 
  Without digging into it and probably not that relevant, it
  appears there is some references to it in platform data still:
 
  $ git grep twl603 -- arch/ | grep -v dts
  arch/arm/mach-omap2/common.h:extern int omap4_twl6030_hsmmc_init(struct
  omap2_hsmmc_info *controllers);
  arch/arm/mach-omap2/omap4-common.c:static int
  omap4_twl6030_hsmmc_late_init(struct device *dev)
  arch/arm/mach-omap2/omap4-common.c: irq =
  twl6030_mmc_card_detect_config();
  arch/arm/mach-omap2/omap4-common.c:
  pdata-slots[0].card_detect = twl6030_mmc_card_detect;
  arch/arm/mach-omap2/omap4-common.c:static __init void
  omap4_twl6030_hsmmc_set_late_init(struct device *dev)
  arch/arm/mach-omap2/omap4-common.c: pdata-init =
  omap4_twl6030_hsmmc_late_init;
  arch/arm/mach-omap2/omap4-common.c:int __init
  omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
  arch/arm/mach-omap2/omap4-common.c:
  omap4_twl6030_hsmmc_set_late_init(c-pdev-dev);
  arch/arm/mach-omap2/omap4-common.c:int __init
  omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
  arch/arm/mach-omap2/omap_twl.c:static unsigned long
  twl6030_vsel_to_uv(const u8 vsel)
  arch/arm/mach-omap2/omap_twl.c:static u8 twl6030_uv_to_vsel(unsigned long
  uv)
  arch/arm/mach-omap2/omap_twl.c: if (uv  twl6030_vsel_to_uv(0x39)) {
  arch/arm/mach-omap2/omap_twl.c: __func__, uv,
  twl6030_vsel_to_uv(0x39));
  arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
  twl6030_vsel_to_uv,
  arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
  twl6030_uv_to_vsel,
  arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
  twl6030_vsel_to_uv,
  arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
  twl6030_uv_to_vsel,
  arch/arm/mach-omap2/omap_twl.c: .vsel_to_uv =
  twl6030_vsel_to_uv,
  arch/arm/mach-omap2/omap_twl.c: .uv_to_vsel =
  twl6030_uv_to_vsel,
 
 Looks like some misunderstanding is here. This patch *only* removes
 platform data for TWL603x
 which were used to create TWL sub-devices like regulators, adc's,
 watchdogs, etc.
 Previously it was set up in twl_common.c by omap4_pmic_init(), which was
 called from board files
 with specific pmic config.
 Since now in Linux kernel 3.13 OMAP4 non-DT boot is not supported and all
 OMAP4 board files
 have been removed omap4_pmic_init() is never called and all TWL603x
 sub-devices are created
 from device tree data.

I'm not overly familiar with this driver (it looks like a big
historical mess to me), or the current state of the OMAP4 platform, so
I would like a second opinion on this.

Tony would you be kind enough to oblige?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/13] mfd: menelaus: a few cleanups

2013-11-28 Thread Lee Jones
 Awesome, should I add your tested-by ? I also added a few extra patches
 on top which I'll send soon.

When you next submit, can you capitalise the first character of the
subject line after the final ':' also please, it will save me the
trouble.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: twl-core: Clean up module by removing twl603x pdata handling

2013-11-27 Thread Lee Jones
))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_LDOLN, pdata-ldoln,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_LDO2, pdata-ldo2,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_LDO4, pdata-ldo4,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_LDO3, pdata-ldo3,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_SMPS3, pdata-smps3,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_SMPS4, pdata-smps4,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - child = add_regulator(TWL6032_REG_VIO, pdata-vio6025,
 - features);
 - if (IS_ERR(child))
 - return PTR_ERR(child);
 -
 - }
 -
   if (IS_ENABLED(CONFIG_CHARGER_TWL4030)  pdata-bci 
   !(features  (TPS_SUBSET | TWL5031))) {
   child = add_child(TWL_MODULE_MAIN_CHARGE, twl4030_bci,

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case

2013-11-21 Thread Lee Jones
On Mon, 18 Nov 2013, Tony Lindgren wrote:

 * Lee Jones lee.jo...@linaro.org [131118 11:10]:
Are you Acking this patch by the way?
   
   If this looks acceptable to you guys, I'd like to merge this via my fixes
   branch this week with your acks if that works for you. That way I can base
   my omap legacy platform data removal patches on my fixes branch while keep
   things working for the drivers. Alternatively I can naturally base my
   legacy data removal on -rc2 too if this gets merged to mainline by then 
   via the MFD tree.
  
  I can either send it up for the -rcs, or I can create an immutable
  branch for you to pull from. That way the patch can do in via ARM-SoC
  and MFD and we can let Git sort it out.
 
 OK great, I'd prefer an immutable branch that I can merge in too. Then
 you can bundle it with other MFD fixes for the -rc series and send it
 in when it suits you :)

https://git.linaro.org/gitweb?p=people/ljones/mfd.git;a=shortlog;h=refs/heads/for-mfd-fixes

Here Tony, you can take this one.

I will simply apply my other fixes on top of it.

The issue is, I will most likely have to rebase it on top of -rc1 prior
to sending a request to Linus, so in that regard it's not exactly
immutable.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case

2013-11-21 Thread Lee Jones
 Here Tony, you can take this one.
 
 I will simply apply my other fixes on top of it.
 
 The issue is, I will most likely have to rebase it on top of -rc1 prior
 to sending a request to Linus, so in that regard it's not exactly
 immutable.
 

Ignore the above. This is what you want:

The following changes since commit 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52:

  Linux 3.12 (2013-11-03 15:41:51 -0800)

are available in the git repository at:

  git://git.linaro.org/people/ljones/mfd.git tags/ib-tony

for you to fetch changes up to f984370913d3ba5d13806cc8ac6fc26f8ebd1694:

  mfd: twl-core: Fix passing of platform data in the device tree case 
(2013-11-21 10:42:36 +)


warning: refname 'ib-tony' is ambiguous.
Immutable branch for Tony Lindgren


Tony Lindgren (1):
  mfd: twl-core: Fix passing of platform data in the device tree case

 drivers/mfd/twl-core.c | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case

2013-11-18 Thread Lee Jones
 Since we still need to rely on a mix of device tree initialized
 drivers and legacy platform data initialize drivers, let's fix
 the passing of platform data to twl4030-gpio.
 
 As the twl4030 GPIO is initialized by twl-core.c, we need to register
 the auxdata for twl4030 GPIO in twl-core.c.
 
 Cc: Samuel Ortiz sa...@linux.intel.com
 Cc: Lee Jones lee.jo...@linaro.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
 
 Samuel  Lee, I'd like to merge this fix via arm-soc tree if this looks
 OK to you as I have other patches that depend on this.
 
 ---
  drivers/mfd/twl-core.c | 15 ---
  1 file changed, 12 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
 index 29473c2..d5b3dd8 100644
 --- a/drivers/mfd/twl-core.c
 +++ b/drivers/mfd/twl-core.c
 @@ -1133,6 +1133,11 @@ static int twl_remove(struct i2c_client *client)
   return 0;
  }
  
 +static struct of_dev_auxdata twl_auxdata_lookup[] = {
 + OF_DEV_AUXDATA(ti,twl4030-gpio, 0, twl4030-gpio, NULL),
 + { /* sentinel */ },
 +};
 +
  /* NOTE: This driver only handles a single twl4030/tps659x0 chip */
  static int
  twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
 @@ -1271,10 +1276,14 @@ twl_probe(struct i2c_client *client, const struct 
 i2c_device_id *id)
   twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
   }
  
 - if (node)
 - status = of_platform_populate(node, NULL, NULL, client-dev);
 - else
 + if (node) {
 + if (pdata)
 + twl_auxdata_lookup[0].platform_data = pdata-gpio;
 + status = of_platform_populate(node, NULL, twl_auxdata_lookup,
 +   client-dev);
 + } else {
   status = add_children(pdata, irq_base, id-driver_data);

Why doesn't the TWL driver use the MFD framework for this stuff?

 + }
  
  fail:
   if (status  0)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 12/23] mfd: omap-usb-tll: raw read and write endian fix

2013-11-18 Thread Lee Jones
On Sat, 16 Nov 2013, Taras Kondratiuk wrote:

 From: Victor Kamensky victor.kamen...@linaro.org
 
 All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
 Need to use endian neutral functions to read/write h/w registers.
 I.e instead of __raw_read[lw] and __raw_write[lw] functions code
 need to use read[lw]_relaxed and write[lw]_relaxed functions.
 If the first simply reads/writes register, the second will byteswap
 it if host operates in BE mode.
 
 Changes are trivial sed like replacement of __raw_xxx functions
 with xxx_relaxed variant.
 
 Signed-off-by: Victor Kamensky victor.kamen...@linaro.org
 Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org
 ---
  drivers/mfd/omap-usb-tll.c |8 
  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 11/23] mfd: omap-usb-host: raw read and write endian fix

2013-11-18 Thread Lee Jones
On Sat, 16 Nov 2013, Taras Kondratiuk wrote:

 From: Victor Kamensky victor.kamen...@linaro.org
 
 All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
 Need to use endian neutral functions to read/write h/w registers.
 I.e instead of __raw_read[lw] and __raw_write[lw] functions code
 need to use read[lw]_relaxed and write[lw]_relaxed functions.
 If the first simply reads/writes register, the second will byteswap
 it if host operates in BE mode.
 
 Changes are trivial sed like replacement of __raw_xxx functions
 with xxx_relaxed variant.
 
 Signed-off-by: Victor Kamensky victor.kamen...@linaro.org
 Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org
 ---
  drivers/mfd/omap-usb-host.c |8 
  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case

2013-11-18 Thread Lee Jones
   +static struct of_dev_auxdata twl_auxdata_lookup[] = {
   + OF_DEV_AUXDATA(ti,twl4030-gpio, 0, twl4030-gpio, NULL),
   + { /* sentinel */ },
   +};
   +
/* NOTE: This driver only handles a single twl4030/tps659x0 chip */
static int
twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
   @@ -1271,10 +1276,14 @@ twl_probe(struct i2c_client *client, const struct 
   i2c_device_id *id)
 twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1);
 }

   - if (node)
   - status = of_platform_populate(node, NULL, NULL, client-dev);
   - else
   + if (node) {
   + if (pdata)
   + twl_auxdata_lookup[0].platform_data = pdata-gpio;
   + status = of_platform_populate(node, NULL, twl_auxdata_lookup,
   +   client-dev);
   + } else {
 status = add_children(pdata, irq_base, id-driver_data);
  
  Why doesn't the TWL driver use the MFD framework for this stuff?
 
 that's reminiscent from years ago and, surely, needs to be fixed. Should
 we gate $subject for that, though ? This has been in tree for quite a
 few years already and Tony's patch is still a step forward, since most
 omap3 platforms would break on DT-only without it.

I didn't say that I would reject the patch. I was just surprised to
see so much hand-rolling, as the MFD core code does much of it
automatically. This is the first time I've taken a look at this and it
seems to be quite the relic.

 There are quite a few folks who could volunteer to fixing that after
 Tony's patch is in (me included, although there could be better choices
 hehe).

Well it's not doing any harm. I'll make a note to fix it myself if a)
no one has done so already and b) I manage to find some spare
time. The latter issue is less likely to be resolved. :)

Are you Acking this patch by the way?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case

2013-11-18 Thread Lee Jones
  Are you Acking this patch by the way?
 
 If this looks acceptable to you guys, I'd like to merge this via my fixes
 branch this week with your acks if that works for you. That way I can base
 my omap legacy platform data removal patches on my fixes branch while keep
 things working for the drivers. Alternatively I can naturally base my
 legacy data removal on -rc2 too if this gets merged to mainline by then 
 via the MFD tree.

I can either send it up for the -rcs, or I can create an immutable
branch for you to pull from. That way the patch can do in via ARM-SoC
and MFD and we can let Git sort it out.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] mfd: twl-core: Fix passing of platform data in the device tree case

2013-11-18 Thread Lee Jones
On Mon, 18 Nov 2013, Tony Lindgren wrote:

 * Lee Jones lee.jo...@linaro.org [131118 11:10]:
Are you Acking this patch by the way?
   
   If this looks acceptable to you guys, I'd like to merge this via my fixes
   branch this week with your acks if that works for you. That way I can base
   my omap legacy platform data removal patches on my fixes branch while keep
   things working for the drivers. Alternatively I can naturally base my
   legacy data removal on -rc2 too if this gets merged to mainline by then 
   via the MFD tree.
  
  I can either send it up for the -rcs, or I can create an immutable
  branch for you to pull from. That way the patch can do in via ARM-SoC
  and MFD and we can let Git sort it out.
 
 OK great, I'd prefer an immutable branch that I can merge in too. Then
 you can bundle it with other MFD fixes for the -rc series and send it
 in when it suits you :)

That's fine. It's 19:30 here now and I still have a shed load of
debugging to do, so I'll deal with this tomorrow if it's all the same
to you?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] typo fixes (coordiante - coordinate) in am335x

2013-11-05 Thread Lee Jones
On Tue, 05 Nov 2013, Jan Lübbe wrote:

 On Tue, 2013-10-22 at 10:05 +0100, Lee Jones wrote:
  This is the first time this patch has been sent to me.
  
  I need Dmitry's input (no pun intended) on how he's like to deal with
  this. At a bare minimum I'd like his Ack.
 
 Is there anything I can do to push this forward? The earlier we get the
 typo fixed in the documentation, the less chance that someone will use
 it that way.

I think you should sent it again, but this time Cc the Device Tree
list, Dmitry and myself when you submit.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] typo fixes (coordiante - coordinate) in am335x

2013-11-05 Thread Lee Jones
On Tue, 05 Nov 2013, Jan Lübbe wrote:

 On Tue, 2013-11-05 at 17:15 +, Lee Jones wrote:
  On Tue, 05 Nov 2013, Jan Lübbe wrote:
  
   On Tue, 2013-10-22 at 10:05 +0100, Lee Jones wrote:
This is the first time this patch has been sent to me.

I need Dmitry's input (no pun intended) on how he's like to deal with
this. At a bare minimum I'd like his Ack.
   
   Is there anything I can do to push this forward? The earlier we get the
   typo fixed in the documentation, the less chance that someone will use
   it that way.
  
  I think you should sent it again, but this time Cc the Device Tree
  list, Dmitry and myself when you submit.
 
 The original patch was not from me. But sure, I can resend it.

I'm not worried about who re-sends the patch. Just make sure whoever
does sends in correctly with regards to the $SUBJECT line etc. The one
on this patch looks odd.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] typo fixes (coordiante - coordinate) in am335x

2013-10-22 Thread Lee Jones
On Sat, 19 Oct 2013, Jan Lübbe wrote:

 On Wed, 2013-08-21 at 00:58 -0700, Tony Lindgren wrote:
  * Zubair Lutfullah zubair.lutful...@gmail.com [130715 08:33]:
   Did a grep for coordiante and replaced them all
   with coordinate.
   
   This applies to the mfd-next tree.
  
  This should be safe to apply via the MFD tree as a non-critical
  fix assuming the bootloaders are not yet using this:
  
  Acked-by: Tony Lindgren t...@atomide.com
 
 It seems this didn't get applied. It fixes the touchscreen on a
 BeagleBone black with the 7 LCD and we should avoid having people use
 the wrong binding.
 
 Samuel or Lee: Could you take this patch?

This is the first time this patch has been sent to me.

I need Dmitry's input (no pun intended) on how he's like to deal with
this. At a bare minimum I'd like his Ack.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/22] ARM: dts: Remove '0x's from OMAP2420 H4 DTS file

2013-08-14 Thread Lee Jones
 Looks like Benoit's new email address is bcous...@baylibre.com.
 Probably best for Benoit to pick these to avoid merge conflicts.

Ah nice, thanks Tony.

 I've just applied the 7 following patches. Let me know if I missed
 something.
 
 6b9fa1b ARM: dts: Remove '0x's from OMAP5 DTS file
 79390b8 ARM: dts: Remove '0x's from OMAP4 DTS file
 dd60fef ARM: dts: Remove '0x's from OMAP3430 SDP DTS file
 bfef1cb ARM: dts: Remove '0x's from OMAP3 DTS file
 5f547ac ARM: dts: Remove '0x's from OMAP3 IGEP0030 DTS file
 27939fc ARM: dts: Remove '0x's from OMAP3 IGEP0020 DTS file
 62eb4d1 ARM: dts: Remove '0x's from OMAP2420 H4 DTS file

Nope, looks good. Thanks Benoit.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 16/22] ARM: dts: Remove '0x's from OMAP3430 SDP DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

On Mon, 22 Jul 2013, Lee Jones wrote:

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap3430-sdp.dts | 22 +++---
  1 file changed, 11 insertions(+), 11 deletions(-)
 
 diff --git a/arch/arm/boot/dts/omap3430-sdp.dts 
 b/arch/arm/boot/dts/omap3430-sdp.dts
 index e2249bc..281914e 100644
 --- a/arch/arm/boot/dts/omap3430-sdp.dts
 +++ b/arch/arm/boot/dts/omap3430-sdp.dts
 @@ -84,15 +84,15 @@
   label = bootloader-nor;
   reg = 0 0x4;
   };
 - partition@0x4 {
 + partition@4 {
   label = params-nor;
   reg = 0x4 0x4;
   };
 - partition@0x8 {
 + partition@8 {
   label = kernel-nor;
   reg = 0x8 0x20;
   };
 - partition@0x28 {
 + partition@28 {
   label = filesystem-nor;
   reg = 0x24 0x7d8;
   };
 @@ -125,19 +125,19 @@
   label = xloader-nand;
   reg = 0 0x8;
   };
 - partition@0x8 {
 + partition@8 {
   label = bootloader-nand;
   reg = 0x8 0x14;
   };
 - partition@0x1c {
 + partition@1c {
   label = params-nand;
   reg = 0x1c 0xc;
   };
 - partition@0x28 {
 + partition@28 {
   label = kernel-nand;
   reg = 0x28 0x50;
   };
 - partition@0x78 {
 + partition@78 {
   label = filesystem-nand;
   reg = 0x78 0x788;
   };
 @@ -170,19 +170,19 @@
   label = xloader-onenand;
   reg = 0 0x8;
   };
 - partition@0x8 {
 + partition@8 {
   label = bootloader-onenand;
   reg = 0x8 0x4;
   };
 - partition@0xc {
 + partition@c {
   label = params-onenand;
   reg = 0xc 0x2;
   };
 - partition@0xe {
 + partition@e {
   label = kernel-onenand;
   reg = 0xe 0x20;
   };
 - partition@0x2e {
 + partition@2e {
   label = filesystem-onenand;
   reg = 0x2e 0xfd2;
   };

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 17/22] ARM: dts: Remove '0x's from OMAP4 DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

On Mon, 22 Jul 2013, Lee Jones wrote:

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap4.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
 index 22d9f2b..45708e1 100644
 --- a/arch/arm/boot/dts/omap4.dtsi
 +++ b/arch/arm/boot/dts/omap4.dtsi
 @@ -56,7 +56,7 @@
   cache-level = 2;
   };
  
 - local-timer@0x48240600 {
 + local-timer@48240600 {
   compatible = arm,cortex-a9-twd-timer;
   reg = 0x48240600 0x20;
   interrupts = GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | 
 IRQ_TYPE_LEVEL_HIGH);

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 15/22] ARM: dts: Remove '0x's from OMAP3 DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

On Mon, 22 Jul 2013, Lee Jones wrote:

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap3.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
 index 7d95cda..16420ae 100644
 --- a/arch/arm/boot/dts/omap3.dtsi
 +++ b/arch/arm/boot/dts/omap3.dtsi
 @@ -111,7 +111,7 @@
   pinctrl-single,function-mask = 0x7f1f;
   };
  
 - omap3_pmx_wkup: pinmux@0x48002a00 {
 + omap3_pmx_wkup: pinmux@48002a00 {
   compatible = ti,omap3-padconf, pinctrl-single;
   reg = 0x48002a00 0x5c;
   #address-cells = 1;

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 14/22] ARM: dts: Remove '0x's from OMAP3 IGEP0030 DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

On Mon, 22 Jul 2013, Lee Jones wrote:

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap3-igep0030.dts | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
 b/arch/arm/boot/dts/omap3-igep0030.dts
 index 644d0538..f628200 100644
 --- a/arch/arm/boot/dts/omap3-igep0030.dts
 +++ b/arch/arm/boot/dts/omap3-igep0030.dts
 @@ -74,19 +74,19 @@
   label = SPL;
   reg = 0 0x10;
   };
 - partition@0x8 {
 + partition@8 {
   label = U-Boot;
   reg = 0x10 0x18;
   };
 - partition@0x1c {
 + partition@1c {
   label = Environment;
   reg = 0x28 0x10;
   };
 - partition@0x28 {
 + partition@28 {
   label = Kernel;
   reg = 0x38 0x30;
   };
 - partition@0x78 {
 + partition@78 {
   label = Filesystem;
   reg = 0x68 0x1f98;
   };

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/22] ARM: dts: Remove '0x's from OMAP3 IGEP0020 DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

On Mon, 22 Jul 2013, Lee Jones wrote:

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap3-igep0020.dts | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
 b/arch/arm/boot/dts/omap3-igep0020.dts
 index e8c4828..f7a8122 100644
 --- a/arch/arm/boot/dts/omap3-igep0020.dts
 +++ b/arch/arm/boot/dts/omap3-igep0020.dts
 @@ -99,19 +99,19 @@
   label = SPL;
   reg = 0 0x10;
   };
 - partition@0x8 {
 + partition@8 {
   label = U-Boot;
   reg = 0x10 0x18;
   };
 - partition@0x1c {
 + partition@1c {
   label = Environment;
   reg = 0x28 0x10;
   };
 - partition@0x28 {
 + partition@28 {
   label = Kernel;
   reg = 0x38 0x30;
   };
 - partition@0x78 {
 + partition@78 {
   label = Filesystem;
   reg = 0x68 0x1f98;
   };

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/22] ARM: dts: Remove '0x's from OMAP2420 H4 DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

On Mon, 22 Jul 2013, Lee Jones wrote:

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap2420-h4.dts | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/arch/arm/boot/dts/omap2420-h4.dts 
 b/arch/arm/boot/dts/omap2420-h4.dts
 index 224c08f..34cdecb 100644
 --- a/arch/arm/boot/dts/omap2420-h4.dts
 +++ b/arch/arm/boot/dts/omap2420-h4.dts
 @@ -50,15 +50,15 @@
   label = bootloader;
   reg = 0 0x2;
   };
 - partition@0x2 {
 + partition@2 {
   label = params;
   reg = 0x2 0x2;
   };
 - partition@0x4 {
 + partition@4 {
   label = kernel;
   reg = 0x4 0x20;
   };
 - partition@0x24 {
 + partition@24 {
   label = file-system;
   reg = 0x24 0x3dc;
   };

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 18/22] ARM: dts: Remove '0x's from OMAP5 DTS file

2013-08-13 Thread Lee Jones
Tony, Benoit,

Poke

 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Tony Lindgren t...@atomide.com
 Cc: linux-omap@vger.kernel.org
 Signed-off-by: Lee Jones lee.jo...@linaro.org
 ---
  arch/arm/boot/dts/omap5.dtsi | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
 index e643620..be58604 100644
 --- a/arch/arm/boot/dts/omap5.dtsi
 +++ b/arch/arm/boot/dts/omap5.dtsi
 @@ -604,7 +604,7 @@
   ti,hwmods = wd_timer2;
   };
  
 - emif1: emif@0x4c00 {
 + emif1: emif@4c00 {
   compatible  = ti,emif-4d5;
   ti,hwmods   = emif1;
   phy-type= 2; /* DDR PHY type: Intelli PHY */
 @@ -615,7 +615,7 @@
   hw-caps-temp-alert;
   };
  
 - emif2: emif@0x4d00 {
 + emif2: emif@4d00 {
   compatible  = ti,emif-4d5;
   ti,hwmods   = emif2;
   phy-type= 2; /* DDR PHY type: Intelli PHY */

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: twl6030-irq: migrate to IRQ threaded handler

2013-07-24 Thread Lee Jones
);
   }
  
 - /*
 -  * NOTE:
 -  * Simulation confirms that documentation is wrong w.r.t the
 -  * interrupt status clear operation. A single *byte* write to
 -  * any one of STS_A to STS_C register results in all three
 -  * STS registers being reset. Since it does not matter which
 -  * value is written, all three registers are cleared on a
 -  * single byte write, so we just use 0x0 to clear.
 -  */
 - ret = twl_i2c_write_u8(TWL_MODULE_PIH, 0x00, REG_INT_STS_A);
 - if (ret)
 - pr_warning(twl6030: I2C error in clearing PIH ISR\n);
 -
 - enable_irq(irq);
 - }
 -
 - return 0;
 -}
 + /*
 +  * NOTE:
 +  * Simulation confirms that documentation is wrong w.r.t the
 +  * interrupt status clear operation. A single *byte* write to
 +  * any one of STS_A to STS_C register results in all three
 +  * STS registers being reset. Since it does not matter which
 +  * value is written, all three registers are cleared on a
 +  * single byte write, so we just use 0x0 to clear.
 +  */
 + ret = twl_i2c_write_u8(TWL_MODULE_PIH, 0x00, REG_INT_STS_A);
 + if (ret)
 + pr_warn(twl6030: I2C error in clearing PIH ISR\n);
  
 -/*
 - * handle_twl6030_int() is the desc-handle method for the twl6030 interrupt.
 - * This is a chained interrupt, so there is no desc-action method for it.
 - * Now we need to query the interrupt controller in the twl6030 to determine
 - * which module is generating the interrupt request.  However, we can't do 
 i2c
 - * transactions in interrupt context, so we must defer that work to a kernel
 - * thread.  All we do here is acknowledge and mask the interrupt and wakeup
 - * the kernel thread.
 - */
 -static irqreturn_t handle_twl6030_pih(int irq, void *devid)
 -{
 - disable_irq_nosync(irq);
 - complete(devid);
   return IRQ_HANDLED;
  }
  
 @@ -351,7 +312,6 @@ int twl6030_init_irq(struct device *dev, int irq_num)
  {
   struct  device_node *node = dev-of_node;
   int nr_irqs, irq_base, irq_end;
 - struct task_struct  *task;
   static struct irq_chip  twl6030_irq_chip;
   int status = 0;
   int i;
 @@ -396,36 +356,25 @@ int twl6030_init_irq(struct device *dev, int irq_num)
   irq_set_chip_and_handler(i, twl6030_irq_chip,
handle_simple_irq);
   irq_set_chip_data(i, (void *)irq_num);
 + irq_set_nested_thread(i, true);
   activate_irq(i);
   }
  
 - dev_info(dev, PIH (irq %d) chaining IRQs %d..%d\n,
 - irq_num, irq_base, irq_end);
 + dev_info(dev, PIH (irq %d) nested IRQs %d..%d\n,
 +  irq_num, irq_base, irq_end);
  
   /* install an irq handler to demultiplex the TWL6030 interrupt */
 - init_completion(irq_event);
 -
 - status = request_irq(irq_num, handle_twl6030_pih, 0, TWL6030-PIH,
 -  irq_event);
 + status = request_threaded_irq(irq_num, NULL, twl6030_irq_thread,
 +   IRQF_ONESHOT, TWL6030-PIH, NULL);
   if (status  0) {
   dev_err(dev, could not claim irq %d: %d\n, irq_num, status);
   goto fail_irq;
   }
  
 - task = kthread_run(twl6030_irq_thread, (void *)irq_num, twl6030-irq);
 - if (IS_ERR(task)) {
 - dev_err(dev, could not create irq %d thread!\n, irq_num);
 - status = PTR_ERR(task);
 - goto fail_kthread;
 - }
 -
   twl_irq = irq_num;
   register_pm_notifier(twl6030_irq_pm_notifier_block);
   return irq_base;
  
 -fail_kthread:
 - free_irq(irq_num, irq_event);
 -
  fail_irq:
   for (i = irq_base; i  irq_end; i++)
   irq_set_chip_and_handler(i, NULL, NULL);
 @@ -437,10 +386,13 @@ int twl6030_exit_irq(void)
  {
   unregister_pm_notifier(twl6030_irq_pm_notifier_block);
  
 - if (twl6030_irq_base) {
 + if (!twl6030_irq_base) {
   pr_err(twl6030: can't yet clean up IRQs?\n);
   return -ENOSYS;
   }
 +
 + free_irq(twl_irq, NULL);
 +

If request_threaded_irq() fails, isn't there a chance that
twl6030_irq_base will be allocated, but twl_irq will still be
undefined?

   return 0;
  }
  

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] mfd: twl6030-irq: convert to use linear irq_domain

2013-07-24 Thread Lee Jones
] = 0xFF;
 @@ -346,8 +365,6 @@ int twl6030_init_irq(struct device *dev, int irq_num)
   return status;
   }
  
 - twl6030_irq_base = irq_base;
 -
   /*
* install an irq handler for each of the modules;
* clone dummy irq_chip since PIH can't *do* anything
 @@ -357,20 +374,18 @@ int twl6030_init_irq(struct device *dev, int irq_num)
   twl6030_irq_chip.irq_set_type = NULL;
   twl6030_irq_chip.irq_set_wake = twl6030_irq_set_wake;
  
 - for (i = irq_base; i  irq_end; i++) {
 - irq_set_chip_and_handler(i, twl6030_irq_chip,
 -  handle_simple_irq);
 - irq_set_chip_data(i, (void *)irq_num);
 - irq_set_nested_thread(i, true);
 - activate_irq(i);
 + irq_domain = irq_domain_add_linear(node, nr_irqs,
 +twl6030_irq_domain_ops, NULL);
 + if (!irq_domain) {
 + dev_err(dev, Can't add irq_domain\n);
 + return -ENOMEM;
   }
  
 - dev_info(dev, PIH (irq %d) nested IRQs %d..%d\n,
 -  irq_num, irq_base, irq_end);
 + dev_info(dev, PIH (irq %d) nested IRQs\n, irq_num);
  
   /* install an irq handler to demultiplex the TWL6030 interrupt */
   status = request_threaded_irq(irq_num, NULL, twl6030_irq_thread,
 -   IRQF_ONESHOT, TWL6030-PIH, NULL);
 +   IRQF_ONESHOT, TWL6030-PIH, irq_domain);
   if (status  0) {
   dev_err(dev, could not claim irq %d: %d\n, irq_num, status);
   goto fail_irq;
 @@ -378,26 +393,19 @@ int twl6030_init_irq(struct device *dev, int irq_num)
  
   twl_irq = irq_num;
   register_pm_notifier(twl6030_irq_pm_notifier_block);
 - return irq_base;
 + return irq_num;

I think you need to change twl-core to now expect the total number of
IRQs rather than the base one now.

  fail_irq:
 - for (i = irq_base; i  irq_end; i++)
 - irq_set_chip_and_handler(i, NULL, NULL);
 -
 + irq_domain_remove(irq_domain);

Why do you kill the irqdomain here, but not in exit()?

   return status;
  }
  
  int twl6030_exit_irq(void)
  {
 - unregister_pm_notifier(twl6030_irq_pm_notifier_block);
 -
 - if (!twl6030_irq_base) {
 - pr_err(twl6030: can't yet clean up IRQs?\n);
 - return -ENOSYS;
 + if (twl_irq) {
 + unregister_pm_notifier(twl6030_irq_pm_notifier_block);
 + free_irq(twl_irq, NULL);
   }

Ah yes, that's better.

 -
 - free_irq(twl_irq, NULL);
 -
   return 0;
  }
  

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] mfd: twl6030-irq: Add interrupt mapping table for the twl6032

2013-07-24 Thread Lee Jones
);
 + return -EINVAL;
 + }
 +
 + irq_mapping_tbl = of_id-data;
  
   nr_irqs = TWL6030_NR_IRQS;
  

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: twl6030-irq: migrate to IRQ threaded handler

2013-07-24 Thread Lee Jones
On Tue, 23 Jul 2013, Grygorii Strashko wrote:

 From: Naga Venkata Srikanth V vnv.srika...@samsung.com
 
 1) Removed request_irq() and replaced it with request_threaded_irq().
 
 2) Removed generic_handle_irq() and replaced it with
 handle_nested_irq().
   Handling of these interrupts is nested, as we are handling an
 interrupt (for e.g rtc, mmc1) when we are still servicing TWL irq.
 
 3) Removed I2C read-retry logic for the case when twl_i2c_read() is
 failed inside IRQ handler - there is no sense to do that, so just report
 an error and return.
 
 Signed-off-by: Naga Venkata Srikanth V vnv.srika...@samsung.com
 Signed-off-by: Oleg_Kosheliev oleg.koshel...@ti.com
 Signed-off-by: Grygorii Strashko grygorii.stras...@ti.com
 ---
  drivers/mfd/twl6030-irq.c |  146 
 +++--
  1 file changed, 49 insertions(+), 97 deletions(-)
 
 diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c

snip

 + status = request_threaded_irq(irq_num, NULL, twl6030_irq_thread,
 +   IRQF_ONESHOT, TWL6030-PIH, NULL);

Oh, and please use managed resources for this: devm_*

   if (status  0) {
   dev_err(dev, could not claim irq %d: %d\n, irq_num, status);
   goto fail_irq;
   }
  

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] mfd: twl6030-irq: migrate to IRQ threaded handler

2013-07-24 Thread Lee Jones
 +   if (ret) {
 +   pr_warn(%s: I2C error %d reading PIH ISR\n, __func__, ret);
 
 Does the user really care which function we're returning from.
 
 Would it be better if you replace '__func__' with the device name?
 
 This module hasn't been converted to the device yet:(
 (I mean interrupt-controller).
 But I'm thinking about it as the next step :) and then It will be
 absolutely reasonable change to replace pr_*() with dev_*() and
 remove __func__.

I don't mean anything as compicated as that for 'this' patch. (NB: See my
comment in subsequent patches about creating a 'struct twl6030' where
you could store 'struct dev'.) In this patch I mean litterally
replacing %s: , with tw16030_irq: . Simples. :)

 Now, the pointer on dev (in our case twl-core device) isn't passed
 in IRQ handler, so It can't be used here.
 
 Of course it can be done, but would it make code better?
 My opinion - no.

 +   if (sts.bytes[2]  0x10)
 +   sts.bytes[2] |= 0x08;
 
 -   for (i = 0; sts.int_sts; sts.int_sts = 1, i++) {
 -   local_irq_disable();
 -   if (sts.int_sts  0x1) {
 -   int module_irq = twl6030_irq_base +
 +   for (i = 0; sts.int_sts; sts.int_sts = 1, i++)
 +   if (sts.int_sts  0x1) {
 
 I'm a little confused by this. Where does sts.int_sts come from?
 
 See my comment above, pls

Okay, that's my fault for not understanding unions properly as I've
never had to use one, but now I do, thanks.

 @@ -437,10 +386,13 @@ int twl6030_exit_irq(void)
   {
 unregister_pm_notifier(twl6030_irq_pm_notifier_block);
 
 -   if (twl6030_irq_base) {
 +   if (!twl6030_irq_base) {
 pr_err(twl6030: can't yet clean up IRQs?\n);
 return -ENOSYS;
 }
 +
 +   free_irq(twl_irq, NULL);
 +
 
 If request_threaded_irq() fails, isn't there a chance that
 twl6030_irq_base will be allocated, but twl_irq will still be
 undefined?
 
 Yes. A mess is here (historically:), thanks. Will use twl_irq
 instead of twl6030_irq_base (I did it, actually, in patch [3]:).

Yes, I saw it. It would be better if you still fixed up this patch to
be correct though. Even if you break it out and add it as [PATCH 1/x].

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


<    1   2   3   >