* [RESEND PATCH] pwm: pwm-atmel-tcb: pinctrl support
@ 2013-05-23 16:38 Boris BREZILLON
2013-05-23 19:35 ` Thierry Reding
0 siblings, 1 reply; 4+ messages in thread
From: Boris BREZILLON @ 2013-05-23 16:38 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-kernel, Nicolas Ferre, Jean-Christophe Plagniol-Villard
Hello,
I sent a patch 1 month ago to add pinctrl support to pwm-atmel-tcb
driver and didn't get any review.
Could you take a look?
This patch adds pins request for the pwm device exposed by the TC
block using the pinctrl subsystem.
Best Regards,
Boris
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
---
drivers/pwm/pwm-atmel-tcb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
index 16cb530..985b7bf 100644
--- a/drivers/pwm/pwm-atmel-tcb.c
+++ b/drivers/pwm/pwm-atmel-tcb.c
@@ -21,6 +21,7 @@
#include <linux/pwm.h>
#include <linux/of_device.h>
#include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
#define NPWM 6
@@ -365,6 +366,7 @@ static int atmel_tcb_pwm_probe(struct platform_device *pdev)
struct atmel_tcb_pwm_chip *tcbpwm;
struct device_node *np = pdev->dev.of_node;
struct atmel_tc *tc;
+ struct pinctrl *pinctrl;
int err;
int tcblock;
@@ -389,6 +391,13 @@ static int atmel_tcb_pwm_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ if (IS_ERR(pinctrl)) {
+ atmel_tc_free(tc);
+ dev_err(&pdev->dev, "failed to get pinctrl config\n");
+ return PTR_ERR(pinctrl);
+ }
+
tcbpwm->chip.dev = &pdev->dev;
tcbpwm->chip.ops = &atmel_tcb_pwm_ops;
tcbpwm->chip.of_xlate = of_pwm_xlate_with_flags;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] pwm: pwm-atmel-tcb: pinctrl support
2013-05-23 16:38 [RESEND PATCH] pwm: pwm-atmel-tcb: pinctrl support Boris BREZILLON
@ 2013-05-23 19:35 ` Thierry Reding
2013-05-24 8:15 ` boris brezillon
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2013-05-23 19:35 UTC (permalink / raw)
To: Boris BREZILLON
Cc: linux-kernel, Nicolas Ferre, Jean-Christophe Plagniol-Villard
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
On Thu, May 23, 2013 at 06:38:52PM +0200, Boris BREZILLON wrote:
> Hello,
>
> I sent a patch 1 month ago to add pinctrl support to pwm-atmel-tcb
> driver and didn't get any review.
>
> Could you take a look?
>
> This patch adds pins request for the pwm device exposed by the TC
> block using the pinctrl subsystem.
I was actually looking at this a few days back and thought I remembered
this being handled in the core now. There was some discussion about this
back in January (?) as far as I remember. I just verified that indeed
there is code in the driver core code to do this. See commit:
ab78029ecc347debbd737f06688d788bd9d60c1d drivers/pinctrl: grab default handles from device core
Are you sure this is really necessary in the driver?
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] pwm: pwm-atmel-tcb: pinctrl support
2013-05-23 19:35 ` Thierry Reding
@ 2013-05-24 8:15 ` boris brezillon
2013-05-24 19:45 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 4+ messages in thread
From: boris brezillon @ 2013-05-24 8:15 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-kernel, Nicolas Ferre, Jean-Christophe Plagniol-Villard
On 23/05/2013 21:35, Thierry Reding wrote:
> On Thu, May 23, 2013 at 06:38:52PM +0200, Boris BREZILLON wrote:
>> Hello,
>>
>> I sent a patch 1 month ago to add pinctrl support to pwm-atmel-tcb
>> driver and didn't get any review.
>>
>> Could you take a look?
>>
>> This patch adds pins request for the pwm device exposed by the TC
>> block using the pinctrl subsystem.
> I was actually looking at this a few days back and thought I remembered
> this being handled in the core now. There was some discussion about this
> back in January (?) as far as I remember. I just verified that indeed
> there is code in the driver core code to do this. See commit:
>
> ab78029ecc347debbd737f06688d788bd9d60c1d drivers/pinctrl: grab default handles from device core
>
> Are you sure this is really necessary in the driver?
No.
Thanks for pointing this commit out (I didn't notice the default handles
were grabbed
from device core).
I'll test it without this patch.
Best Regards,
Boris
> Thierry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] pwm: pwm-atmel-tcb: pinctrl support
2013-05-24 8:15 ` boris brezillon
@ 2013-05-24 19:45 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-24 19:45 UTC (permalink / raw)
To: boris brezillon; +Cc: Thierry Reding, linux-kernel, Nicolas Ferre
On 10:15 Fri 24 May , boris brezillon wrote:
> On 23/05/2013 21:35, Thierry Reding wrote:
> >On Thu, May 23, 2013 at 06:38:52PM +0200, Boris BREZILLON wrote:
> >>Hello,
> >>
> >>I sent a patch 1 month ago to add pinctrl support to pwm-atmel-tcb
> >>driver and didn't get any review.
> >>
> >>Could you take a look?
> >>
> >>This patch adds pins request for the pwm device exposed by the TC
> >>block using the pinctrl subsystem.
> >I was actually looking at this a few days back and thought I remembered
> >this being handled in the core now. There was some discussion about this
> >back in January (?) as far as I remember. I just verified that indeed
> >there is code in the driver core code to do this. See commit:
> >
> > ab78029ecc347debbd737f06688d788bd9d60c1d drivers/pinctrl: grab default handles from device core
> >
> >Are you sure this is really necessary in the driver?
> No.
>
> Thanks for pointing this commit out (I didn't notice the default
> handles were grabbed
> from device core).
>
> I'll test it without this patch.
You can drop it, it's handled at core level for every struct device
Best Regards,
J.
>
> Best Regards,
> Boris
> >Thierry
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-24 19:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 16:38 [RESEND PATCH] pwm: pwm-atmel-tcb: pinctrl support Boris BREZILLON
2013-05-23 19:35 ` Thierry Reding
2013-05-24 8:15 ` boris brezillon
2013-05-24 19:45 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox