Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On 22 February 2013 17:24, Thierry Reding
 wrote:
...
>> I just tried update to latest linus tree, still did not find this API defined
>> in include/linux/io.h.
>> Would you mind point it out for me?
>
> Commit 75096579c3ac39ddc2f8b0d9a8924eba31f4d920 introduced it. The
> prototype is in include/linux/device.h and the implementation in
> lib/devres.c.
>
Got it.
Thanks.

Regards
Dong Aisheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Thierry Reding
On Fri, Feb 22, 2013 at 05:20:56PM +0800, Dong Aisheng wrote:
> On Fri, Feb 22, 2013 at 09:52:12AM +0100, Thierry Reding wrote:
> > On Fri, Feb 22, 2013 at 04:29:55PM +0800, Dong Aisheng wrote:
> > > On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
> > > ...
> > > > > > > Otherwise, i'm also ok with this patch.
> > > > > > > Acked-by: Dong Aisheng 
> > > > > > > 
> > > > > > > BTW, i did not see Samuel's tree having this new API.
> > > > > > > So, who will pick this patch?
> > > > > > 
> > > > > > I have same question.
> > > > > 
> > > > > I CCed Thierry and Greg who may know it.
> > > > 
> > > > Yes, devm_ioremap_resource() never returns NULL. You always need to
> > > > check the returned pointer with IS_ERR(). The value that you return
> > > > should be extracted from the pointer with PTR_ERR().
> > > 
> > > Thanks Thierry.
> > > Since Samuel's mdf tree does not have your patch introducing
> > > the new API of devm_ioremap_resource,
> > > do you know which tree this patch can go through, Greg's driver core tree?
> > 
> > I don't think it matters much at this point because Linus merged the
> > driver core tree yesterday, so anything that gets applied now should
> > automatically have the new API available.
> > 
> I just tried update to latest linus tree, still did not find this API defined
> in include/linux/io.h.
> Would you mind point it out for me?

Commit 75096579c3ac39ddc2f8b0d9a8924eba31f4d920 introduced it. The
prototype is in include/linux/device.h and the implementation in
lib/devres.c.

Thierry


pgpCxLjUEg8yF.pgp
Description: PGP signature


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 09:52:12AM +0100, Thierry Reding wrote:
> On Fri, Feb 22, 2013 at 04:29:55PM +0800, Dong Aisheng wrote:
> > On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
> > ...
> > > > > > Otherwise, i'm also ok with this patch.
> > > > > > Acked-by: Dong Aisheng 
> > > > > > 
> > > > > > BTW, i did not see Samuel's tree having this new API.
> > > > > > So, who will pick this patch?
> > > > > 
> > > > > I have same question.
> > > > 
> > > > I CCed Thierry and Greg who may know it.
> > > 
> > > Yes, devm_ioremap_resource() never returns NULL. You always need to
> > > check the returned pointer with IS_ERR(). The value that you return
> > > should be extracted from the pointer with PTR_ERR().
> > 
> > Thanks Thierry.
> > Since Samuel's mdf tree does not have your patch introducing
> > the new API of devm_ioremap_resource,
> > do you know which tree this patch can go through, Greg's driver core tree?
> 
> I don't think it matters much at this point because Linus merged the
> driver core tree yesterday, so anything that gets applied now should
> automatically have the new API available.
> 
I just tried update to latest linus tree, still did not find this API defined
in include/linux/io.h.
Would you mind point it out for me?

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 09:11:53AM +, Arnd Bergmann wrote:
> On Friday 22 February 2013, Thierry Reding wrote:
> > On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
> > > On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
> > > > > On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> > > > > > This patch allow using syscon driver from the platform data, i.e.
> > > > > > possibility using driver on systems without oftree support.
> > > > > > For search syscon device from the client drivers,
> > > > > > "syscon_regmap_lookup_by_pdevname" function was added.
> > > > > > 
> > > > > > Signed-off-by: Alexander Shiyan 
> > > > > 
> > > > > [...]
> > > > > 
> > > > > > +   syscon->base = devm_ioremap_resource(dev, res);
> > > > > > +   if (!syscon->base)
> > > > > 
> > > > > Is this correct?
> > > > 
> > > > Hmm, of course IS_ERR should be used here...
> > > > v5?
> > > > 
> > > 
> > > Yes.
> > > >From here:
> > > https://lkml.org/lkml/2013/1/21/140
> > > It seems it is.
> > 
> > Yes, devm_ioremap_resource() never returns NULL. You always need to
> > check the returned pointer with IS_ERR(). The value that you return
> > should be extracted from the pointer with PTR_ERR().
> > 
> 
> Well, devm_ioremap_resource also tries to request the resource, which
> as someone (Dong or Shawn?) pointed out, we should not do for the imx6q
> case. I think this has to be reverted to platform_get_resource
> and dev_ioremap.
> 

Yes, i did not see detailed devm_ioremap_resource implementation,
but if it requests the resource then right, it may fail on imx6q due to
request overlapped resources.

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Arnd Bergmann
On Friday 22 February 2013, Thierry Reding wrote:
> On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
> > On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
> > > > On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> > > > > This patch allow using syscon driver from the platform data, i.e.
> > > > > possibility using driver on systems without oftree support.
> > > > > For search syscon device from the client drivers,
> > > > > "syscon_regmap_lookup_by_pdevname" function was added.
> > > > > 
> > > > > Signed-off-by: Alexander Shiyan 
> > > > 
> > > > [...]
> > > > 
> > > > > +   syscon->base = devm_ioremap_resource(dev, res);
> > > > > +   if (!syscon->base)
> > > > 
> > > > Is this correct?
> > > 
> > > Hmm, of course IS_ERR should be used here...
> > > v5?
> > > 
> > 
> > Yes.
> > >From here:
> > https://lkml.org/lkml/2013/1/21/140
> > It seems it is.
> 
> Yes, devm_ioremap_resource() never returns NULL. You always need to
> check the returned pointer with IS_ERR(). The value that you return
> should be extracted from the pointer with PTR_ERR().
> 

Well, devm_ioremap_resource also tries to request the resource, which
as someone (Dong or Shawn?) pointed out, we should not do for the imx6q
case. I think this has to be reverted to platform_get_resource
and dev_ioremap.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Thierry Reding
On Fri, Feb 22, 2013 at 04:29:55PM +0800, Dong Aisheng wrote:
> On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
> ...
> > > > > Otherwise, i'm also ok with this patch.
> > > > > Acked-by: Dong Aisheng 
> > > > > 
> > > > > BTW, i did not see Samuel's tree having this new API.
> > > > > So, who will pick this patch?
> > > > 
> > > > I have same question.
> > > 
> > > I CCed Thierry and Greg who may know it.
> > 
> > Yes, devm_ioremap_resource() never returns NULL. You always need to
> > check the returned pointer with IS_ERR(). The value that you return
> > should be extracted from the pointer with PTR_ERR().
> 
> Thanks Thierry.
> Since Samuel's mdf tree does not have your patch introducing
> the new API of devm_ioremap_resource,
> do you know which tree this patch can go through, Greg's driver core tree?

I don't think it matters much at this point because Linus merged the
driver core tree yesterday, so anything that gets applied now should
automatically have the new API available.

Thierry


pgpPQ2v8Xnu9k.pgp
Description: PGP signature


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
...
> > > > Otherwise, i'm also ok with this patch.
> > > > Acked-by: Dong Aisheng 
> > > > 
> > > > BTW, i did not see Samuel's tree having this new API.
> > > > So, who will pick this patch?
> > > 
> > > I have same question.
> > 
> > I CCed Thierry and Greg who may know it.
> 
> Yes, devm_ioremap_resource() never returns NULL. You always need to
> check the returned pointer with IS_ERR(). The value that you return
> should be extracted from the pointer with PTR_ERR().

Thanks Thierry.
Since Samuel's mdf tree does not have your patch introducing
the new API of devm_ioremap_resource,
do you know which tree this patch can go through, Greg's driver core tree?

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
...
Otherwise, i'm also ok with this patch.
Acked-by: Dong Aisheng dong.aish...@linaro.org

BTW, i did not see Samuel's tree having this new API.
So, who will pick this patch?
   
   I have same question.
  
  I CCed Thierry and Greg who may know it.
 
 Yes, devm_ioremap_resource() never returns NULL. You always need to
 check the returned pointer with IS_ERR(). The value that you return
 should be extracted from the pointer with PTR_ERR().

Thanks Thierry.
Since Samuel's mdf tree does not have your patch introducing
the new API of devm_ioremap_resource,
do you know which tree this patch can go through, Greg's driver core tree?

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Thierry Reding
On Fri, Feb 22, 2013 at 04:29:55PM +0800, Dong Aisheng wrote:
 On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
 ...
 Otherwise, i'm also ok with this patch.
 Acked-by: Dong Aisheng dong.aish...@linaro.org
 
 BTW, i did not see Samuel's tree having this new API.
 So, who will pick this patch?

I have same question.
   
   I CCed Thierry and Greg who may know it.
  
  Yes, devm_ioremap_resource() never returns NULL. You always need to
  check the returned pointer with IS_ERR(). The value that you return
  should be extracted from the pointer with PTR_ERR().
 
 Thanks Thierry.
 Since Samuel's mdf tree does not have your patch introducing
 the new API of devm_ioremap_resource,
 do you know which tree this patch can go through, Greg's driver core tree?

I don't think it matters much at this point because Linus merged the
driver core tree yesterday, so anything that gets applied now should
automatically have the new API available.

Thierry


pgpPQ2v8Xnu9k.pgp
Description: PGP signature


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Arnd Bergmann
On Friday 22 February 2013, Thierry Reding wrote:
 On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
  On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
 This patch allow using syscon driver from the platform data, i.e.
 possibility using driver on systems without oftree support.
 For search syscon device from the client drivers,
 syscon_regmap_lookup_by_pdevname function was added.
 
 Signed-off-by: Alexander Shiyan shc_w...@mail.ru

[...]

 +   syscon-base = devm_ioremap_resource(dev, res);
 +   if (!syscon-base)

Is this correct?
   
   Hmm, of course IS_ERR should be used here...
   v5?
   
  
  Yes.
  From here:
  https://lkml.org/lkml/2013/1/21/140
  It seems it is.
 
 Yes, devm_ioremap_resource() never returns NULL. You always need to
 check the returned pointer with IS_ERR(). The value that you return
 should be extracted from the pointer with PTR_ERR().
 

Well, devm_ioremap_resource also tries to request the resource, which
as someone (Dong or Shawn?) pointed out, we should not do for the imx6q
case. I think this has to be reverted to platform_get_resource
and dev_ioremap.

Arnd
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 09:11:53AM +, Arnd Bergmann wrote:
 On Friday 22 February 2013, Thierry Reding wrote:
  On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
   On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
 On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
  This patch allow using syscon driver from the platform data, i.e.
  possibility using driver on systems without oftree support.
  For search syscon device from the client drivers,
  syscon_regmap_lookup_by_pdevname function was added.
  
  Signed-off-by: Alexander Shiyan shc_w...@mail.ru
 
 [...]
 
  +   syscon-base = devm_ioremap_resource(dev, res);
  +   if (!syscon-base)
 
 Is this correct?

Hmm, of course IS_ERR should be used here...
v5?

   
   Yes.
   From here:
   https://lkml.org/lkml/2013/1/21/140
   It seems it is.
  
  Yes, devm_ioremap_resource() never returns NULL. You always need to
  check the returned pointer with IS_ERR(). The value that you return
  should be extracted from the pointer with PTR_ERR().
  
 
 Well, devm_ioremap_resource also tries to request the resource, which
 as someone (Dong or Shawn?) pointed out, we should not do for the imx6q
 case. I think this has to be reverted to platform_get_resource
 and dev_ioremap.
 

Yes, i did not see detailed devm_ioremap_resource implementation,
but if it requests the resource then right, it may fail on imx6q due to
request overlapped resources.

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 09:52:12AM +0100, Thierry Reding wrote:
 On Fri, Feb 22, 2013 at 04:29:55PM +0800, Dong Aisheng wrote:
  On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
  ...
  Otherwise, i'm also ok with this patch.
  Acked-by: Dong Aisheng dong.aish...@linaro.org
  
  BTW, i did not see Samuel's tree having this new API.
  So, who will pick this patch?
 
 I have same question.

I CCed Thierry and Greg who may know it.
   
   Yes, devm_ioremap_resource() never returns NULL. You always need to
   check the returned pointer with IS_ERR(). The value that you return
   should be extracted from the pointer with PTR_ERR().
  
  Thanks Thierry.
  Since Samuel's mdf tree does not have your patch introducing
  the new API of devm_ioremap_resource,
  do you know which tree this patch can go through, Greg's driver core tree?
 
 I don't think it matters much at this point because Linus merged the
 driver core tree yesterday, so anything that gets applied now should
 automatically have the new API available.
 
I just tried update to latest linus tree, still did not find this API defined
in include/linux/io.h.
Would you mind point it out for me?

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Thierry Reding
On Fri, Feb 22, 2013 at 05:20:56PM +0800, Dong Aisheng wrote:
 On Fri, Feb 22, 2013 at 09:52:12AM +0100, Thierry Reding wrote:
  On Fri, Feb 22, 2013 at 04:29:55PM +0800, Dong Aisheng wrote:
   On Fri, Feb 22, 2013 at 08:27:19AM +0100, Thierry Reding wrote:
   ...
   Otherwise, i'm also ok with this patch.
   Acked-by: Dong Aisheng dong.aish...@linaro.org
   
   BTW, i did not see Samuel's tree having this new API.
   So, who will pick this patch?
  
  I have same question.
 
 I CCed Thierry and Greg who may know it.

Yes, devm_ioremap_resource() never returns NULL. You always need to
check the returned pointer with IS_ERR(). The value that you return
should be extracted from the pointer with PTR_ERR().
   
   Thanks Thierry.
   Since Samuel's mdf tree does not have your patch introducing
   the new API of devm_ioremap_resource,
   do you know which tree this patch can go through, Greg's driver core tree?
  
  I don't think it matters much at this point because Linus merged the
  driver core tree yesterday, so anything that gets applied now should
  automatically have the new API available.
  
 I just tried update to latest linus tree, still did not find this API defined
 in include/linux/io.h.
 Would you mind point it out for me?

Commit 75096579c3ac39ddc2f8b0d9a8924eba31f4d920 introduced it. The
prototype is in include/linux/device.h and the implementation in
lib/devres.c.

Thierry


pgpCxLjUEg8yF.pgp
Description: PGP signature


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-22 Thread Dong Aisheng
On 22 February 2013 17:24, Thierry Reding
thierry.red...@avionic-design.de wrote:
...
 I just tried update to latest linus tree, still did not find this API defined
 in include/linux/io.h.
 Would you mind point it out for me?

 Commit 75096579c3ac39ddc2f8b0d9a8924eba31f4d920 introduced it. The
 prototype is in include/linux/device.h and the implementation in
 lib/devres.c.

Got it.
Thanks.

Regards
Dong Aisheng
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-21 Thread Thierry Reding
On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
> On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
> > > On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> > > > This patch allow using syscon driver from the platform data, i.e.
> > > > possibility using driver on systems without oftree support.
> > > > For search syscon device from the client drivers,
> > > > "syscon_regmap_lookup_by_pdevname" function was added.
> > > > 
> > > > Signed-off-by: Alexander Shiyan 
> > > 
> > > [...]
> > > 
> > > > +   syscon->base = devm_ioremap_resource(dev, res);
> > > > +   if (!syscon->base)
> > > 
> > > Is this correct?
> > 
> > Hmm, of course IS_ERR should be used here...
> > v5?
> > 
> 
> Yes.
> >From here:
> https://lkml.org/lkml/2013/1/21/140
> It seems it is.
> 
> > > 
> > > > +   return -EBUSY;
> 
> Both this line could also be changed.
> 
> > > >
> > > 
> > > Otherwise, i'm also ok with this patch.
> > > Acked-by: Dong Aisheng 
> > > 
> > > BTW, i did not see Samuel's tree having this new API.
> > > So, who will pick this patch?
> > 
> > I have same question.
> 
> I CCed Thierry and Greg who may know it.

Yes, devm_ioremap_resource() never returns NULL. You always need to
check the returned pointer with IS_ERR(). The value that you return
should be extracted from the pointer with PTR_ERR().

Thierry


pgpzWfciBrHRC.pgp
Description: PGP signature


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-21 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
> > On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> > > This patch allow using syscon driver from the platform data, i.e.
> > > possibility using driver on systems without oftree support.
> > > For search syscon device from the client drivers,
> > > "syscon_regmap_lookup_by_pdevname" function was added.
> > > 
> > > Signed-off-by: Alexander Shiyan 
> > 
> > [...]
> > 
> > > + syscon->base = devm_ioremap_resource(dev, res);
> > > + if (!syscon->base)
> > 
> > Is this correct?
> 
> Hmm, of course IS_ERR should be used here...
> v5?
> 

Yes.
>From here:
https://lkml.org/lkml/2013/1/21/140
It seems it is.

> > 
> > > + return -EBUSY;

Both this line could also be changed.

> > >
> > 
> > Otherwise, i'm also ok with this patch.
> > Acked-by: Dong Aisheng 
> > 
> > BTW, i did not see Samuel's tree having this new API.
> > So, who will pick this patch?
> 
> I have same question.

I CCed Thierry and Greg who may know it.

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-21 Thread Dong Aisheng
On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> This patch allow using syscon driver from the platform data, i.e.
> possibility using driver on systems without oftree support.
> For search syscon device from the client drivers,
> "syscon_regmap_lookup_by_pdevname" function was added.
> 
> Signed-off-by: Alexander Shiyan 

[...]

> + syscon->base = devm_ioremap_resource(dev, res);
> + if (!syscon->base)

Is this correct?

> + return -EBUSY;
>

Otherwise, i'm also ok with this patch.
Acked-by: Dong Aisheng 

BTW, i did not see Samuel's tree having this new API.
So, who will pick this patch?

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-21 Thread Dong Aisheng
On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
 This patch allow using syscon driver from the platform data, i.e.
 possibility using driver on systems without oftree support.
 For search syscon device from the client drivers,
 syscon_regmap_lookup_by_pdevname function was added.
 
 Signed-off-by: Alexander Shiyan shc_w...@mail.ru

[...]

 + syscon-base = devm_ioremap_resource(dev, res);
 + if (!syscon-base)

Is this correct?

 + return -EBUSY;


Otherwise, i'm also ok with this patch.
Acked-by: Dong Aisheng dong.aish...@linaro.org

BTW, i did not see Samuel's tree having this new API.
So, who will pick this patch?

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-21 Thread Dong Aisheng
On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
  On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
   This patch allow using syscon driver from the platform data, i.e.
   possibility using driver on systems without oftree support.
   For search syscon device from the client drivers,
   syscon_regmap_lookup_by_pdevname function was added.
   
   Signed-off-by: Alexander Shiyan shc_w...@mail.ru
  
  [...]
  
   + syscon-base = devm_ioremap_resource(dev, res);
   + if (!syscon-base)
  
  Is this correct?
 
 Hmm, of course IS_ERR should be used here...
 v5?
 

Yes.
From here:
https://lkml.org/lkml/2013/1/21/140
It seems it is.

  
   + return -EBUSY;

Both this line could also be changed.

  
  
  Otherwise, i'm also ok with this patch.
  Acked-by: Dong Aisheng dong.aish...@linaro.org
  
  BTW, i did not see Samuel's tree having this new API.
  So, who will pick this patch?
 
 I have same question.

I CCed Thierry and Greg who may know it.

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4] mfd: syscon: Add non-DT support

2013-02-21 Thread Thierry Reding
On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
 On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
   On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
This patch allow using syscon driver from the platform data, i.e.
possibility using driver on systems without oftree support.
For search syscon device from the client drivers,
syscon_regmap_lookup_by_pdevname function was added.

Signed-off-by: Alexander Shiyan shc_w...@mail.ru
   
   [...]
   
+   syscon-base = devm_ioremap_resource(dev, res);
+   if (!syscon-base)
   
   Is this correct?
  
  Hmm, of course IS_ERR should be used here...
  v5?
  
 
 Yes.
 From here:
 https://lkml.org/lkml/2013/1/21/140
 It seems it is.
 
   
+   return -EBUSY;
 
 Both this line could also be changed.
 
   
   
   Otherwise, i'm also ok with this patch.
   Acked-by: Dong Aisheng dong.aish...@linaro.org
   
   BTW, i did not see Samuel's tree having this new API.
   So, who will pick this patch?
  
  I have same question.
 
 I CCed Thierry and Greg who may know it.

Yes, devm_ioremap_resource() never returns NULL. You always need to
check the returned pointer with IS_ERR(). The value that you return
should be extracted from the pointer with PTR_ERR().

Thierry


pgpzWfciBrHRC.pgp
Description: PGP signature