Re: [PATCH] w1-gpio: Pinctrl-fy

2012-11-05 Thread Evgeniy Polyakov
Hi

On Tue, Oct 30, 2012 at 11:26:25AM -0700, Tony Lindgren (t...@atomide.com) 
wrote:
 * Pantelis Antoniou pa...@antoniou-consulting.com [121030 11:17]:
  Enable pinctrl for w1-gpio.
 
  Signed-off-by: Pantelis Antoniou pa...@antoniou-consulting.com
 
 Acked-by: Tony Lindgren t...@atomide.com

Acked-by: Evgeniy Polyakov z...@ioremap.net

Please submit patches through the appropriate tree, or you want me to
push them upstream?

-- 
Evgeniy Polyakov
--
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] w1-gpio: Simplify get rid of defines

2012-11-05 Thread Evgeniy Polyakov
Hi

On Wed, Oct 31, 2012 at 05:57:44PM +0200, Pantelis Antoniou 
(pa...@antoniou-consulting.com) wrote:
 There's no reason to have the OF defines; it complicates the driver.
 There's also no need for the funky platform_driver_probe.
 
 Add a few warnings in case there's a failure; helps us find out
 what went wrong.
 
 Signed-off-by: Pantelis Antoniou pa...@antoniou-consulting.com

Looks good to me, but I'm hardly an expert in omap platform.
Feel free to add my ack, but please submit this patch through
appropriate tree.
Thank you.

Acked-by: Evgeniy Polyakov z...@ioremap.net

-- 
Evgeniy Polyakov
--
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/6] w1: omap-hdq: add section annotation to remove

2012-07-31 Thread Evgeniy Polyakov
On Fri, Jul 27, 2012 at 10:04:44AM +0300, Felipe Balbi (ba...@ti.com) wrote:
  Feel free to add my acked-by: Evgeniy Polyakov z...@ioremap.net
 
 I thought you would :-p Then I guess Tony, maybe ?

Greg, will you pick this patchset?
It is fairly simple and without any behaviour changes, but things look
like being stuck here...


-- 
Evgeniy Polyakov
--
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/6] w1: omap-hdq: add section annotation to remove

2012-07-26 Thread Evgeniy Polyakov
Hi all

On Wed, Jul 25, 2012 at 03:05:27PM +0300, Felipe Balbi (ba...@ti.com) wrote:
 trivial patch, no functional changes.
 
 Signed-off-by: Felipe Balbi ba...@ti.com

Looks good to me
Who should pick it up?

Feel free to add my acked-by: Evgeniy Polyakov z...@ioremap.net

-- 
Evgeniy Polyakov
--
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] W1: OMAP HDQ1W: allow driver to be built on all OMAP2+

2012-05-02 Thread Evgeniy Polyakov
On Wed, May 02, 2012 at 02:08:36AM -0600, Paul Walmsley (p...@pwsan.com) wrote:
 
 Allow the OMAP HDQ1W driver to be built for all OMAP2+ SoCs by
 adjusting KConfig dependencies.  The previous dependency required
 either SOC_OMAP2430 or ARCH_OMAP3 to be set, but the HDQ IP block is
 present on OMAP2420 and OMAP44xx SoCs.  The driver was still
 selectable on multi-OMAP kernel configurations, however; so the
 previous prohibition was rather pointless.
 
 Signed-off-by: Paul Walmsley p...@pwsan.com
 Cc: Evgeniy Polyakov z...@ioremap.net

Well, looks good, although I know nothing about build deps for OMAP platform :)

-- 
Evgeniy Polyakov
--
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] ARM: omap_hdq: use wait_event_timeout to wait for read to complete.

2012-05-01 Thread Evgeniy Polyakov
On Wed, Apr 25, 2012 at 12:41:53PM +1000, NeilBrown (ne...@suse.de) wrote:
 There is no gain in having a loop - there is no risk of missing the
 interrupt with wait_event_timeout.
 
 Signed-off-by: NeilBrown ne...@suse.de

Both patches look good, thank you
Feel free to add my ack if needed

-- 
Evgeniy Polyakov
--
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] W1: OMAP HDQ1W: use 32-bit register accesses

2012-01-23 Thread Evgeniy Polyakov
Hi Paul

Patchset looks good, feel free to add my ack

On Sun, Jan 22, 2012 at 01:26:23PM -0700, Paul Walmsley (p...@pwsan.com) wrote:
 
 HDQ/1-wire registers are 32 bits long, even if the register contents
 fit into 8 bits, so accesses must be 32-bit aligned.  Evidently the
 OMAP2/3 interconnects allowed the driver to get away with 8 bit accesses,
 but the OMAP4 puts a stop to that:
 
 [1.488800] Driver for 1-wire Dallas network protocol.
 [1.495025] Bad mode in data abort handler detected
 [1.500122] Internal error: Oops - bad mode: 0 [#1] SMP
 [1.505615] Modules linked in:
 [1.508819] CPU: 0Not tainted  (3.3.0-rc1-8-g45030e9 #992)
 [1.515289] PC is at 0x0018
 [1.518615] LR is at omap_hdq_probe+0xd4/0x2cc
 
 The OMAP4430 ES2 Rev X TRM does warn about this restriction in section 
 23.2.6.2 HDQ/1-Wire Registers.
 
 Fixes the crash on OMAP4430 ES2 Pandaboard.  Tested also on OMAP34xx and 
 OMAP2420; it seems to work fine on those chips, although due to the lack 
 of boards with HDQ/1-wire devices here, a more indepth test was not 
 possible.
 
 ---
 Intended for the v3.4 merge window.
 
  drivers/w1/masters/omap_hdq.c |8 
  1 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
 index 63e3eda..291897c 100644
 --- a/drivers/w1/masters/omap_hdq.c
 +++ b/drivers/w1/masters/omap_hdq.c
 @@ -100,20 +100,20 @@ static struct w1_bus_master omap_w1_master = {
  /* HDQ register I/O routines */
  static inline u8 hdq_reg_in(struct hdq_data *hdq_data, u32 offset)
  {
 - return __raw_readb(hdq_data-hdq_base + offset);
 + return __raw_readl(hdq_data-hdq_base + offset);
  }
  
  static inline void hdq_reg_out(struct hdq_data *hdq_data, u32 offset, u8 val)
  {
 - __raw_writeb(val, hdq_data-hdq_base + offset);
 + __raw_writel(val, hdq_data-hdq_base + offset);
  }
  
  static inline u8 hdq_reg_merge(struct hdq_data *hdq_data, u32 offset,
   u8 val, u8 mask)
  {
 - u8 new_val = (__raw_readb(hdq_data-hdq_base + offset)  ~mask)
 + u8 new_val = (__raw_readl(hdq_data-hdq_base + offset)  ~mask)
   | (val  mask);
 - __raw_writeb(new_val, hdq_data-hdq_base + offset);
 + __raw_writel(new_val, hdq_data-hdq_base + offset);
  
   return new_val;
  }
 -- 
 1.7.8.3

-- 
Evgeniy Polyakov
--
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] W1: OMAP HDQ1W: use 32-bit register accesses

2012-01-23 Thread Evgeniy Polyakov
On Mon, Jan 23, 2012 at 11:57:09AM -0700, Paul Walmsley (p...@pwsan.com) wrote:
 http://www.spinics.net/lists/arm-kernel/msg156572.html

Well, if runtime PM does its job for clock manipulation properly, then
things should be fine. I suppose that -probe() will fire up first and
you say it boots and detects w1 properly, so patch looks good.
Feel free to add my ack

-- 
Evgeniy Polyakov
--
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 0/6] OMAP: Make OMAP LDP boot succussfuly

2008-11-20 Thread Evgeniy Polyakov
Hi.

On Wed, Nov 19, 2008 at 12:01:06PM -0800, Tony Lindgren ([EMAIL PROTECTED]) 
wrote:
  I've just pushed w1 patch (did I understand it right that there is only
  one in the given set, all others touch very different areas).
 
 Yes, that's correct. The other patches are for LDP specific board support,
 and will be merged with the arm patches.

Patch is in the mainline tree.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] OMAP: Make OMAP LDP boot succussfuly

2008-11-19 Thread Evgeniy Polyakov
On Wed, Nov 19, 2008 at 10:13:08AM -0800, Tony Lindgren ([EMAIL PROTECTED]) 
wrote:
  If w1 part does not depend on any upstream changes not yet in the tree,
  I will forward it for inclusing, but if it requires some external update
  to be pushed first, I would like to add w1 part into that merge.
 
 Yes, please include it into your queue, it does not have any other
 omap dependencies. And we are trying to move all the omap driver
 development to the appropriate driver lists to get in sync with the
 mainline tree.

Ok, I will push this patch series upstream.
Thank you.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] OMAP: Make OMAP LDP boot succussfuly

2008-11-19 Thread Evgeniy Polyakov
On Wed, Nov 19, 2008 at 11:14:20AM -0800, Tony Lindgren ([EMAIL PROTECTED]) 
wrote:
 Thanks! The rest of the omap w1 patche should be coming to you via LKML
 then ;)

I've just pushed w1 patch (did I understand it right that there is only
one in the given set, all others touch very different areas).

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] OMAP: Make OMAP LDP boot succussfuly

2008-11-14 Thread Evgeniy Polyakov
Hi Tony.

On Thu, Nov 13, 2008 at 02:40:54PM -0800, Tony Lindgren ([EMAIL PROTECTED]) 
wrote:
 Evgeniy, can you please confirm you're adding the Stanley's 1w patch to your
 upstream queue? Or else let Stanley know if he needs to repost it to
 LKML.

If w1 part does not depend on any upstream changes not yet in the tree,
I will forward it for inclusing, but if it requires some external update
to be pushed first, I would like to add w1 part into that merge.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] OMAP: Make OMAP LDP boot succussfuly

2008-11-11 Thread Evgeniy Polyakov
Hi Stanley.

On Tue, Nov 11, 2008 at 07:50:52PM +0800, Stanley.Miao ([EMAIL PROTECTED]) 
wrote:
 Changes since v1:
 
 1, fix all the patch format problem.
 
 2, split the defconfig patch from code patches.
 
 3, put a twl4030keypad bug fix into a single patch.
 
 4, Add a persistent bit in the keypad map, and prune off #ifdef(OMAP_LDP)
 from the keypad driver.
 
 
 Now there is only basic support for OMAP LDP in linux-omap-2.6, LDP can't boot
 up, even crash at boot time(because of omap_hdq problem).
 
 Add the following patches to fix the boot crash and let LDP boot succussfuly.

I have no objections against w1 changes.
I have no objections against other changes too, since I do not know what it is.

Feel free to add my ack if needed.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430

2008-10-14 Thread Evgeniy Polyakov
On Tue, Oct 14, 2008 at 07:30:58AM -0700, Andrew Morton ([EMAIL PROTECTED]) 
wrote:
  Why not just skipping the waiting and returning error pretending user
  really sent a signal?
 
 Better than nothing, but because signal_pending() isn't actually true,
 upper layers wil behave differently.

If they check... 

For example omap_hdq_break() can be interrupted and omap_hdq_probe()
does not check its return value.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430

2008-10-14 Thread Evgeniy Polyakov
Hi.

On Tue, Oct 14, 2008 at 05:50:02AM -0700, Andrew Morton ([EMAIL PROTECTED]) 
wrote:
 I think it's reasonable to permit the driver's operations to be interrupted
 in this manner.  It's done in quite a few other places.  But the problem is
 actually *testing* it.

Why not just skipping the waiting and returning error pretending user
really sent a signal?

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] HDQ Driver for OMAP2430/3430

2008-10-13 Thread Evgeniy Polyakov
Hi.

On Mon, Oct 13, 2008 at 06:55:43PM +0530, Madhusudhan Chikkature ([EMAIL 
PROTECTED]) wrote:
  +static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
  +{
  +   int ret;
  +   u8 tmp_status;
  +   unsigned long irqflags;
  +
  +   *status = 0;
  +
  +   spin_lock_irqsave(hdq_data-hdq_spinlock, irqflags);
  +   /* clear interrupt flags via a dummy read */
  +   hdq_reg_in(hdq_data, OMAP_HDQ_INT_STATUS);
  +   /* ISR loads it with new INT_STATUS */
  +   hdq_data-hdq_irqstatus = 0;
  +   spin_unlock_irqrestore(hdq_data-hdq_spinlock, irqflags);
  +
  +   hdq_reg_out(hdq_data, OMAP_HDQ_TX_DATA, val);
  +
  +   /* set the GO bit */
  +   hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, 
  OMAP_HDQ_CTRL_STATUS_GO,
  +   OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO);
  +   /* wait for the TXCOMPLETE bit */
  +   ret = wait_event_interruptible_timeout(hdq_wait_queue,
  +   hdq_data-hdq_irqstatus, OMAP_HDQ_TIMEOUT);
  +   if (ret  0) {
  +   dev_dbg(hdq_data-dev, wait interrupted);
  +   return -EINTR;
  +   }
  
  Is this desirable?  The user hits ^C and the driver bails out?
  
  I assume so, but was this tested?
 
 Andrew, What is the test scenario you mean here? A user hitting ^C when the 
 driver is waiting for the TXCOMPLETE bit?

Just plain return looks suspicious, is there some kind of a race between
calling code (which for example frees hdq_data) and the path, which sets
the bit and wakes up this thread?

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/10] HDQ driver: Remove global pointer

2008-09-25 Thread Evgeniy Polyakov
Hi.

On Thu, Sep 25, 2008 at 12:19:44PM +0530, Gadiyar, Anand ([EMAIL PROTECTED]) 
wrote:
 From: Madhusudhan Chikkature [EMAIL PROTECTED]
 
 This patch provides the necessary modifications to the driver to
 remove the global ptr hdq_data.
 
 Signed-off-by: Madhusudhan Chikkature [EMAIL PROTECTED]

Looks ok, IA ck the whole serie.
Thank you.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/9] HDQ driver fixes

2008-09-24 Thread Evgeniy Polyakov
On Wed, Sep 24, 2008 at 02:55:35PM +0300, Felipe Balbi ([EMAIL PROTECTED]) 
wrote:
 If you fix the comments I gave now, I think the patches should be
 applied unless someone else has any comments to them. After that, you
 could also prepare a patch sending this particular driver to
 Evgeniy Polyakov [EMAIL PROTECTED] Cc:ing
 [EMAIL PROTECTED] and linux-omap@vger.kernel.org

I checked patches and do not see any objections, so feel free to add my
ack if you want.

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH]OMAP HDQ driver ioremap changes

2008-09-22 Thread Evgeniy Polyakov
Hi.

On Mon, Sep 22, 2008 at 03:45:57PM +0530, Madhusudhan Chikkature ([EMAIL 
PROTECTED]) wrote:
 This patch provides the HDQ driver modifications to use ioremap for the base
 address.

Looks good.
Couple of small comments inline.

 --- linux-omap-2.6.orig/drivers/w1/masters/omap_hdq.c 2008-08-18
 14:48:26.0 +0530
 +++ linux-omap-2.6/drivers/w1/masters/omap_hdq.c  2008-09-22 
 14:56:28.0
 +0530
 @@ -53,7 +53,7 @@ DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
  int W1_ID;
 
  struct hdq_data {
 - resource_size_t hdq_base;
 + void __iomem*hdq_base;
   struct  semaphore   hdq_semlock;

Shouldn't it use mutex or it does counting?

 @@ -577,7 +577,7 @@ static int __init omap_hdq_probe(struct
   return -ENXIO;
   }
 
 - hdq_data-hdq_base = res-start;
 + hdq_data-hdq_base = ioremap(res-start, SZ_4K);

Suppose it does not fail on this arch?

   /* get interface  functional clock objects */
   hdq_data-hdq_ick = clk_get(pdev-dev, hdq_ick);
 @@ -588,12 +588,14 @@ static int __init omap_hdq_probe(struct
   if (IS_ERR(hdq_data-hdq_ick)) {
   ret = PTR_ERR(hdq_data-hdq_ick);
   platform_set_drvdata(pdev, NULL);
 + iounmap(hdq_data-hdq_base);
   kfree(hdq_data);
   return ret;
   }
   if (IS_ERR(hdq_data-hdq_fck)) {
   ret = PTR_ERR(hdq_data-hdq_fck);
   platform_set_drvdata(pdev, NULL);
 + iounmap(hdq_data-hdq_base);
   kfree(hdq_data);
   return ret;
   }

Don't you want to use goto and single exit path here and in other places?

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH]OMAP HDQ driver ioremap changes

2008-09-22 Thread Evgeniy Polyakov
On Mon, Sep 22, 2008 at 05:37:41PM +0300, Felipe Balbi ([EMAIL PROTECTED]) 
wrote:
 +/*
 + * Used to control the call to omap_hdq_get and omap_hdq_put.
 + * HDQ Protocol: Write the CMD|REG_address first, followed by
 + * the data wrire or read.
 + */
 +static int init_trans;

This variable is not protected against simultaneous master's access
afaics, isn't it possible to have multiple w1 masters on given board?

-- 
Evgeniy Polyakov
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html